Mitsubishi MELSEC Q Series Programming Manual page 400

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

Advertisement

BKXOR(P)
(2) The constant designated by
S1
S1
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
same 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
same device is specified for
Program Example
(1) The following program performs an exclusive OR 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-26
S2
b15
b8
b7
S1
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
S1
+ 1
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
+ 2
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
S1
1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1
+(n 2)
+(n 1)
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
b15
D
0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0
D
+ 1
1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 0
D
+ 2
1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1
D
0 1
+(n 2)
+(n 1)
D
1 1 1 1 1 1 1 1
,
S1
b15
b8
b7
b0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1
b15
D200
1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1
D201
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
D202
0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1
can be between
32768 and 32767 (BIN 16-bit data).
b0
b15
n
S2
XOR
1
0
1
b8
b7
b0
n
0 1 0 1 0 1
1 0 1 0
0 1
0 1
1 1 1 1
1 1 1 1
, or
device exceeds the range of that device.
S2
D
and
)
S1
D
and
)
S2
D
[List Mode]
Step
Instruction
b15
b8
b7
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
R0
XOR
R1
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
R2
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
b8
b7
b0
D0
b8 b7
b0
0
1
0
1
0
1
0
1
0
1
0
1
0
(Error code: 4101)
overlaps with the
S1
. (except when the
D
(Error code: 4101)
overlaps with the
S2
. (except when the
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