Programming manual of IVC series small PLC
6.3.7
DEC: Decrement integer instruction
LAD:
IL: DEC (D)
Operand Type
D
INT
Operand description
D: destination operand
Function description
When the power flow is valid, D
decreases 1.
6.3.8
VABS: Integer absolute value instruction
LAD:
IL: VABS (S) (D)
Operand Type
S
INT Constant
D
INT
Operand description
S: source operand
D: destination operand
Function description
When the power flow is valid, get the
absolute value of S and assign it to D.
6.3.9
NEG: Negative integer instruction
LAD:
IL: NEG (S) (D)
Operand Type
S
INT Constant
D
INT
Operand description
S: source operand
D: destination operand
Function description
When the power flow is valid, get the
negative value of S and assign the
result to D.
KnY
KnM
KnS
Note
This instruction is a cyclic decrease instruction, with the range of -32768~32767.
Example
When X0 is ON, D0 (1000) decreases 1. After the execution, D0=999.
KnX
KnY
KnM
KnS
KnY
KnM
KnS
Note
The range of S shall be -32767~32767. When S is -32768, the system will report
operand error, and the instruction will not be executed.
Example
When X0 is ON, get the absolute value of D0 (-1000), and assign the result to D10.
D10=1000.
KnX
KnY
KnM
KnS
KnY
KnM
KnS
Note
The range of S shall be -32767~32767. When S is -32768, the system will report
operand error, and the instruction will not be executed.
Example
When X0 is ON, get the negative value of D0 (1000) and assign the result to D10.
D10=-1000.
Chapter 6 Application instructions
Applicable to
Influenced flag bit
Program steps
Applicable elements
KnLM
D
Applicable to
Influenced flag bit
Program steps
Applicable elements
KnLM KnSM
D
SD
KnLM
D
Applicable to
Influenced flag bit
Program steps
Applicable elements
KnLM KnSM
D
SD
KnLM
D
IVC1 IVC1S IVC1L IVC2L IVC2H
3
C
T
V
Z
R
LD X0
DEC D0
IVC1 IVC1S IVC1L IVC2L IVC2H
Zero, carry, borrow
5
C
T
V
Z
R
C
T
V
Z
R
LD X0
VABS D0 D10
IVC1 IVC1S IVC1L IVC2L IVC2H
Zero, carry, borrow
5
C
T
V
Z
R
C
T
V
Z
R
LD X0
NEG D0 D10
86
Indexed
addressing
√
Indexed
addressing
√
√
Indexed
addressing
√
√
Need help?
Do you have a question about the IVC2H and is the answer not in the manual?