325
WXNR, WXNRP, DXNR, DXNRP
1
2
3
4
4
6
7
8
7.1 Logical operation instructions
7.1.7 WXNR, WXNRP, DXNR, DXNRP
DXNR
(1) Conducts an exclusive NOR operation on the 32-bit data of the device designated by and the 32-bit data of the device
designated by , and stores the results at the device designated by .
(2) For bit devices, the bit devices after the points designated by digit specification are regarded as "0" in the operation.
Operation Error
(1) There is no operation error in the WXNR(P) or DXNR(P) instruction.
Program Example
(1) The following program compares the bit patterns of the 16-bit data located from X30 to X3F with the bit patterns of the
16-bit data at D99 when XC is ON, and stores the number of identical bit patterns at D7.
[Ladder Mode] [List Mode]
[Operation]
(2) The following program compares the bit patterns of the 32-bit data located from X20 to X3F with the bit patterns of the
data at D16 and D17 when X6 is ON, and stores the number of identical bit patterns at D18.
[Ladder Mode] [List Mode]
D
S
D
1111 000011 1100
b0b15b31 b16
XNR
1100 000000 0011
b0b15b31 b16
11
00
1111
00 0000
b31 b16 b0b15
+ 1
+ 1
+ 1
D
S
D
D
S
D
D
S
D
Step Instruction Device
1100100110101011
0
11
000
11
0000000
1
b15 b8 b0b7
b0b7b15 b8
XNR
010101010101010
1
X30X37X3F X38
D99
D99
X3CX3B X34X33
5D7
X3F to X30
Step Instruction Device