Increment Byte And Decrement Byte; Increment Word And Decrement Word - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Increment Byte and Decrement Byte

L
A
D
EN
F
B
IN
D
EN
IN
S
INCB
T
L
DECB
221
222 224
Inputs/Outputs
IN
VB, IB, QB, MB, SB, SMB, LB, AC, Constant, *VD, *AC, *LD
OUT
VB, IB, QB, MB, SB, SMB, LB, AC,*VD, *AC, *LD

Increment Word and Decrement Word

L
A
D
EN
F
B
IN
D
EN
IN
S
INCW
T
L
DECW
221
222 224
Inputs/Outputs
IN
VW, IW, QW, MW, SW, SMW, AC, AIW, LW, T, C, Constant, *VD,
*AC, *LD
OUT
VW, IW, QW, MW, SW, SMW, LW, AC, T, C, *VD, *AC, *LD
S7-200 Programmable Controller System Manual
A5E00066097-02
The Increment Byte and Decrement Byte instructions
add or subtract 1 to or from the input byte (IN) and place
INC_B
the result into the variable specified by OUT.
ENO
Increment and decrement byte operations are unsigned.
OUT
In LAD and FBD: IN + 1 = OUT
DEC_B
ENO
In STL:
OUT
Error conditions that set ENO = 0: SM1.1 (overflow),
SM4.3 (run-time), 0006 (indirect address)
OUT
These instructions affect the following Special Memory
OUT
bits: SM1.0 (zero); SM1.1 (overflow)
226
Operands
The Increment Word and Decrement Word instructions
add or subtract 1 to or from the input word (IN) and place
INC_W
the result in OUT.
ENO
Increment and decrement word operations are signed
OUT
(16#7FFF > 16#8000).
In LAD and FBD: IN + 1 = OUT
DEC_W
ENO
In STL:
OUT
Error conditions that set ENO = 0: SM1.1 (overflow),
OUT
SM4.3 (run-time), 0006 (indirect address)
OUT
These instructions affect the following Special Memory
bits: SM1.0 (zero); SM1.1 (overflow); SM1.2 (negative)
226
Operands
SIMATIC Instructions
IN - 1 = OUT
OUT+ 1 = OUT
OUT - 1 = OUT
BYTE
BYTE
IN - 1 = OUT
OUT + 1 = OUT
OUT - 1 = OUT
INT
INT
Data Types
Data Types
9-79

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents