6 - 33
6   Drive Programming Commands
Drive Programming User’s Manual  (I580-E2)
6-5  Arithmetic Operation and Logical Operation Commands
6
 
 Example
Not (Negation in binary format)
Command Description Argument
Negation on <value 1> in binary format (bit 
reversal)
not (Negation)
Result: any variable except variables with bit 
data size
*1
Value: any variable except variables and con-
stants with bit data size
*1
(range 2,147,483,648 to 2,147,483,647)
Format
Flowchart method Text language method
<result> :  not <value>
*1. You cannot obtain a correct result with commands such as UB(1)  not UB(0).
Use “xor” command to reverse variables with bit data size as shown in the following examples.
• Example 1: UB(1)  UB(0) xor 1
• Example 2: UB(2)  X(00) xor 1
Note If an overflow or underflow occurs, the Drive Programming 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 12 to U(03).
2 Assigns 65523 (binary: 111110011), which is the result of negation (bit reversal) on 12 (U(03) 
binary: 00000110), to U(04).
3 Jumps to the block 3: loop_ unconditionally.