Mitsubishi MELSEC Q Series Programming Manual page 408

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

BKXNR(P)
(2) The constant designated by
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• The n-bit range from the
• The device range for n points starting from the device designated by
device range for n points starting from the device designated by
device is specified for
• The device range for n points starting from the device designated by
device range for n points starting from the device designated by
device is specified for
Program Example
(1) The following program performs an exclusive NOR operation on the data stored at D100 to
D102 and the data stored at R0 to R2 when X20 is turned ON, and stores the operation
result into the area starting from D200.
[Ladder Mode]
[Operation]
D100
D101
D102
7-34
S2
b15
b8
b7
S1
0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
S1
+ 1
+ 2
1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1
S1
S1
+(n 2)
1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0
+(n 1)
S1
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
D
D
+ 1
D
+ 2
D
+(n 2)
+(n 1)
D
,
S1
and
S1
and
S2
b15
b8
b7
b0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
b15
D200
1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1
D201
1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1
D202
0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0
can be between
32768 and 32767 (BIN 16-bit data).
b0
b15
n
S2
XNR
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
b15
b8
b7
b0
0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
1 1 0 0 0 0 1 1 0 0 1 1 1 1 0 0
1 1
0 0 0 0 1 1
1 1 0 0
0 0
1 1
0 0 0 0 0 0 0 0
1 1 1 1
1 1 1 1
, or
device exceeds the range of that device.
S2
D
)
D
)
D
[List Mode]
Step
Instruction
b15
b8 b7
R0
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
XNR
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
R1
R2
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
b8 b7
b0
D0
b8b7
b0
n
(Error code: 4101)
overlaps with the
S1
. (except when the same
D
(Error code: 4101)
overlaps with the
S2
. (except when the same
D
(Error code: 4101)
Device
b0
3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents