Inc and Dec
Inc:
Increments an integer value.
Dec:
Decrements an integer value.
Instruction
Inc
Increment
Dec
Decrement
Variables
Name
Meaning
InOut
Target data
Out
Return
value
Bit strings
InOut
Out
OK
Function
Inc
The Inc instruction increments target data InOut. If the result exceeds the maximum value of InOut,
InOut returns to the minimum value.
Dec
The Dec instruction decrements target data InOut. If the result exceeds the minimum value of InOut,
InOut returns to the maximum value.
NJ-series Instructions Reference Manual (W502)
Name
FB/FUN
FUN
FUN
I/O
Description
In-out
Target data
Output
Always TRUE
OK OK OK OK OK OK OK OK
Graphic expression
(@)Inc
EN
ENO
InOut
(@)Dec
EN
ENO
InOut
Valid range
Depends on data type.
TRUE only
Integers
2 Instruction Descriptions
ST expression
Inc(InOut);
Out
Dec(InOut);
Out
Unit
Default
---
---
---
---
Times, durations,
dates, and text strings
2
2-189