Word Increment and Decrement Integer Math

Inputs/Outputs Operands Data Types
IN VW, IW, QW, MW, SW, SMW, AC, AIW, LW, T, C, Constant, *VD, *AC, *LD INT
OUT VW, IW, QW, MW, SW, SMW, LW, AC, T, C, *VD, *AC, *LD INT

Memory Ranges ENO Errors Instruction Support for S7-200 CPUs SIMATIC/International Mnemonics
The Increment Word and Decrement Word instructions add or subtract 1 to or from the input word (IN) and place the result in OUT.

Increment and decrement word operations are signed (16#7FFF > 16#8000).

In LAD and FBD: IN + 1 = OUT

IN - 1 = OUT

In STL: OUT + 1 = OUT

OUT - 1 = OUT

Error Conditions that Set ENO = 0:

SM1.1 (overflow), SM4.3 (run-time), 0006 (indirect address)

These instructions affect the following Special Memory bits:

SM1.0 (zero); SM1.1 (overflow); SM1.2 (negative)