DVP-ES2/EX2/EC5/SS2/SA2/SX2/SE&TP Operation Manual - Programming
API
Mnemonic Operands Function
87 D
ABS P
Absolute Value
Type
OP
Bit Devices Word devices Program Steps
X Y M S K H KnX
KnY
KnM
KnS
T C D E F
ABS, ABSP: 3 steps
DABS, DABSP: 5 steps
D * * * * * * * *
SS2
SX2
SS2
SX2
SS2
SX2
Operands:
D: Device for absolute value operation
Explanation
1. The instruction conducts absolute value operation on D
2. This instruction is generally used in pulse execution mode (ABSP, DABSP).
3. If operand D uses index F, then only 16-bit instruction is available.
4. When it comes to the signed minimum value -32768, whether it is in 16-bit or 32-bit format,
there is no absolute value. The signed minimum value stays -32768.
Program Example:
When X0 goes from OFF to ON, ABS instruction obtains the absolute value of the content in D0.
Before the execution of this instruction, the value in D0 is -1234, and after the execution of this
instruction, the value in D0 is 1234.