6 - 25
6 DriveProgramming Commands
DriveProgramming User’s Manual (I622-E1)
6-5 Arithmetic Operation and Logical Operation Commands
6
Example
− (Subtraction)
Command Description Argument
Subtracts <value 2> from <value 1>. Result: any variable
Value 1
: any variable or constant (range
−
128 to 127)
Value 2: any variable or constant
(range −2,147,483,648 to 2,147,483,647)
Format
Flowchart method Text language method
↓
<result> : = <value 1> − <value 2>
Note If an overflow or underflow occurs, the DriveProgramming detects it as an error. Take neces-
sary measures in the application so that they do not occur.
Flowchart Text
Block number
Operation
1 Assigns 200 to U(00).
2 Assigns 500 to U(01).
3 Assigns the difference between U(01) and U(00) to U(02).
<result> : = <value 1> − <value 2>