Part 4 Commands
1.2 Arithmetic Operation
ADD (Add)
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Output
(Output, flag)
Operand 1 Operand 2
Optional Optional ADD
Variable
number
Data ZR
Add the content of the variable specified in operand 1 and the value specified in operand
2, and assign the result to the variable specified in operand 1.
The output will turn ON when the operation result becomes 0.
Add 2 to the content of variable 1 (3).
5 (3+2=5) will be stored in variable 1.
Add the content of variable 3 (2) to the content of
variable 1 (variable 2).
5 (3+2=5) will be stored in variable 2.
SUB (Subtract)
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Output
(Output, flag)
Operand 1 Operand 2
Optional Optional SUB
Variable
number
Data ZR
Subtract the value specified in operand 2 from the content of the variable specified in
operand 1, and assign the result to the variable specified in operand 1.
The output will turn ON when the operation result becomes 0.
Subtract 2 from the content of variable 1 (3).
1 (3–2=1) will be stored in variable 1.
Subtract the content of variable 3 (2) from the
content of variable 1 (variable 2).
1 (3–2=1) will be stored in variable 2.
Commentaires sur ces manuels