Manual
34
12. SEL Language
● SUB (Subtract)
[Function] Adds the value in operand 2 to the contents of the variable in operand 1, then stores this in the
variable in operand 1. The output turns ON when the result of the operation is 0.
[Example1] LET 1 3 Assign 3 to variable 1.
ADD 1 2 Add 2 to 3 (content of variable 1).
3+2 is 5 which is entered in variable1.
[Example 2] LET 1 2 Assign 2 to variable 1.
LET 2 3 Assign 3 to variable 2.
LET 3 2 Assign 2 to variable 3.
ADD *1 *3 Add 2 (content of variable 3) to variable 2 (content of variable 1).
3+2 is 5 which is entered in variable 2.
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC
tsoP
)galF·troptuptuO(
dnammoC 1dnarepO 2dnarepO
lanoitpOlanoitpODDA.oNelbairaVataDRZ
● ADD (Add)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC
tsoP
)galF·troptuptuO(
dnammoC 1dnarepO 2dnarepO
lanoitpOlanoitpOBUS.oNelbairaVataDRZ
[Function] Subtracts the value in operand 2 from the contents of the variable in operand 1, then stores
this in the variable in operand 1. The output turns ON when the result of the operation is 0.
[Example 1] LET 1 3 Assign 3 to variable 1.
ADD 1 2 Subtract 2 from 3 (content of variable 1).
[Example 2] LET 1 2 Assign 2 to variable 1.
LET 2 3 Assign 3 to variable 2.
LET 3 2 Assign 2 to variable 3.
ADD *1 *3 Subtract 2 (content of variable 3) from variable 2
(content of variable 1).
3-2 is 1 which is entered in variable 2.
12.2 Arithmatic calculation commands