EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 372

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
370
7 APPLICATION INSTRUCTIONS
7.1 Logical Operation Instructions
Operation error
There is no operation error in the WXOR(P) or DXOR(P) instruction.
Program example
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.
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, and stores the number of differing bits at D16.
*1
*1 See Page 421 16-bit data bit check, 32-bit data check for more information on the DSUMP instruction.
[Ladder Mode] [List Mode]
[Operation]
[Ladder Mode] [List Mode]
[Operation]
Step Instruction Device
00111001 00111001
0 110 11000110 1100
b15 b8 b0b7
b0b7b15 b8
XOR
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
b0b7b15 b8
D10
D20
D10
Step Instruction Device
0D10,D9 1111001110 0000110 1 1110 110 1 0 110 1
b31 b16
b0
b15
1D10,D9 110 110 0 1 001 0 1 0 0 1110 1 000 11111000
X3F X30 X20X2F
1
X3F to X20
00
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
X3C X3B X38 X37 X34 X33 X2C X2B X28X27X24 X23
XOR
b31 b16
b0
b15
17
+ 1
+ 1
+ 1
D16
D
S
D
D
S
D

Table of Contents

Related product manuals