hit counter script

Increment And Decrement - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

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
Input / output
Data type
IN
BYTE
INT
DINT
OUT
BYTE
INT
DINT
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
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
Operand
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
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
Program instructions
7.8 Math
305

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents

Save PDF