Program instructions
7.8 Math
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
305
INC_W
INCW OUT
INCD OUT
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.
DEC_W
DECW OUT
DECD OUT
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.
Non-fatal errors with ENO = 0
• 0006H Indirect address
• SM1.1 Overflow
• SM1.0 Result of operation = zero
• SM1.1 Overflow, illegal value generated during the operation, or illegal input
• SM1.2 Negative result
IN
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, AIW, *VD, *LD, *AC, Constant
ID, QD, VD, MD, SMD, SD, LD, AC, HC, *VD, *LD, *AC, Constant
OUT
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *AC, *LD
IW, QW, VW, MW, SMW, SW, T, C, LW, AC,*VD, *LD, *AC
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC