Mitsubishi MELSEC QS Series Programming Manual page 149

Hide thumbs Also See for MELSEC QS Series:
Table of Contents

Advertisement

(2) For bit devices, the bit devices below the points designated by digit specification are regarded as
"0" in the operation.
Operation Error
(1) There are no operation errors associated with the WXOR(P) or DXOR(P) instructions.
Program Example
(1) The following program performs an exclusive OR operation on the data at D10 and D20
when XA is ON, and stores the result at D10.
[Ladder Mode]
[Operation]
D10
D20
D10
(2) The following program compares the bit pattern of the 32-bit data from X20 to X3F with the
bit pattern of the data at D9 and D10 when X6 is ON.
[Ladder Mode]
[Operation]
X20 0
X3F
D10,D9 1
D10,D9 1
b15
b8
0
1
0
1
0
1
0
1
XOR
b15
b8
0
0
1
1
1
0
0
1
b15
b8
0
1
1
0
1
1
0
0
S
+ 1
X3F
X3C X3B X38 X37 X34 X33
1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
D
+ 1
b31
0
1 1 1 0 0 1 1 1 0 0 0 0 0 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 0 1
D
+ 1
b31
1
1 0 1 1 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 1 1 0 0 0
7.1.3 16-bit and 32-bit exclusive OR operations (WXOR(P), DXOR(P))
b7
b0
0
1
0
1
0
1
0
1
b7
b0
0
0
1
1
1
0
0
1
b7
b0
0
1
1
0
1
1
0
0
S
X30
X2F
X2CX2B X28 X27 X24 X23
XOR
D
b16
b15
D
b16
b15
7.1 Logical Operation Instructions
WXOR(P), DXOR(P)
X20
b0
b0
7-13
7

Advertisement

Table of Contents
loading

Table of Contents