Increment And Decrement - Siemens Simatic S7 Series System Manual

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

Program instructions
7.8 Math
Non-fatal errors with ENO = 0
0006H Indirect address
SM1.1 Overflow
Input / outputs
Data type
IN
REAL
1
OUT
REAL
1
Real (or floating-point) numbers are represented in the format described in the ANSI/IEEE 754-1985 standard (single-
1
precision). Refer to that standard for more information.
7.8.4

Increment and decrement

LAD / FBD
STL
INCB OUT
INCW OUT
INCD OUT
INC_W
INC_DW
DECB OUT
DECW OUT
DECD OUT
DEC_W
DEC_DW
Non-fatal errors with ENO = 0
0006H Indirect address
SM1.1 Overflow
266
SM bits affected
SM1.0 Result of operation = zero
SM1.1 Overflow, illegal value generated during the operation, or illegal input
SM1.2 Negative result
Operand
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC, Constant
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC
Description
The increment instructions add 1 to the input value IN and place the result into the
location at OUT.
LAD and FBD: IN + 1 = OUT
STL: OUT + 1 = OUT
Increment byte (INC_B) operations are unsigned. Increment word (INC_W) operations
are signed. Increment double word (INC_DW) operations are signed.
The decrement instructions subtract 1 from the input value IN and place the result into
the location at OUT.
LAD and FBD: IN - 1 = OUT
STL: OUT - 1= OUT
Decrement byte (DEC_B) operations are unsigned. Decrement Word (DEC_W) opera-
tions are signed. Decrement double Word (DEC_D) operations are signed.
SM bits affected
SM1.0 Result of operation = zero
SM1.1 Overflow, illegal value generated during the operation, or illegal input
SM1.2 Negative result
System Manual, 09/2015, A5E03822230-AC
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents