6 - 71 6 - 71
MELSEC-Q/QnA
6 BASIC INSTRUCTIONS
High Performance
QnA Q4AR
Basic
QCPU
PLC CPU
Process CPU
6.3.9 Complement of 2 of BIN 16- and 32-bit data (sign reversal)
(NEG, NEGP, DNEG, DNEGP)
Usable Devices
Internal Devices
(System, User)
MELSECNET/10(H)
Direct J
\
Set
Data
Bit Word
File
Register
Bit Word
Special
Function
Module
U
\G
Index
Register
Zn
Constant
K, H
Other
D
[Instruction Symbol] [Execution Condition]
indicates NEG or DNEG
Command
Command
P
NEG, DNEG
NEGP, DNEGP
D
D
[Set Data]
Set Data Meaning Data Type
D
Head number of device storing data for the complement of 2 operation BIN 16/32 bits
[Functions]
NEG
(1) Reverses the sign of the 16-bit device designated by
D
and stores at the device designated by
D
.
16 Bit
10
1 0 1 0 1 0 1 0 1 0 1 0 10
000 0 0 0 0 0 0 0 0 0 0 0 00
101 0 1 0 1 0 1 0 1 0 1 0 10
1
1 1 1 1 1 1 1 1
Sign conversion
-21846
21846
00000000
Before execution
D
.............
.............
-
After execution
D
b15- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -b0
b15- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -b0
(2) Used when reversing positive and negative signs.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com