7. APPLICATION INSTRUCTIONS
7 − 20
MELSEC-A
7.1.5 BIN 16-bit data 2’s complement
(NEG, NEGP)
Available Device
Bit device Word (16-bit) device Constant Pointer
Level
Carry
flag
Error
flag
X Y M L S B F T C D W R A0 A1 Z V K H P I N
Digit specification
Index
M9012 (M9010, M9011)
(D) O O O O O O O O O O O O O O O O O
Functions (1) Reverses the sign of the 16-bit data of device specified at (D) and stores the
result in device specified at (D).
(2) Used to reverse the positive sign to the negative sign and vice versa.
Execution Conditions
Applicable
CPU
All CPUs
K1 to
K4
(D)
Head number of device
which stores data for
which 2’s complement will
be performed
Setting data
2’s complement execution commands
(D) NEG
(D) NEGP
OFF
ON
Executed
per scan
Executed
per scan
Executed
only once
Executed
only once
NEG
NEGP
2’s complement
execution command
16 bits
-21846
21846
…………………
………………….
Before execution (D)
After execution (D)
Sign conversion
-