Mitsubishi Electric MELSEC-Q/L Programming Manual page 378

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Operation error
• There is no operation error in the WXNR(P) or DXNR(P) instruction.
Program example
• 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]
[Operation]
X3F
X3F to X30
0
1
b15
D99
1
1
b15
D99
0
1
• 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]
[Operation]
X3F
X3C X3B X38 X37 X34 X33
X3F to X20
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 0 1
b31
D17,D16 1
1
0 0 1 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 1 1 0 0 1 0 0 1 1 0 1 1
b31
D17,D16 0
1
1 0
*1 See Page 421 16-bit data bit check, 32-bit data check for more information on the SUMP/DSUMP instructions.
7 APPLICATION INSTRUCTIONS
376
7.1 Logical Operation Instructions
X3CX3B
X38
X37
0
1
0
1
0
1
0
XNR
b8
b7
0
0
1
0
0
1
1
b8
b7
1
0
0
0
1
1
0
D7
5
S
+ 1
X30
X2F
X2C X2B X28 X27 X24 X23
XOR
D
+ 1
b16
b15
D
+ 1
b16
b15
1 1 0 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 1 1 0 0 0 1
0 0
1 1
D18
15
[List Mode]
Step
X34X33
X30
1
0
1
0
1
0
1
b0
0
1
0
1
0
1
1
b0
0
0
0
0
0
0
1
[List Mode]
Step
S
X20
D
b0
D
b0
*1
Instruction
Device
*1
Instruction
Device

Advertisement

Table of Contents
loading

Table of Contents