7-10
BKAND(P)
(2) The constant designated by can be between -32768 and 32767 (BIN 16-bit data).
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 , , or device exceeds the range of that device.
(Error code: 4101)
The device range for n points starting from the device designated by overlaps with the
device range for n points starting from the device designated by .
(except when the same device is specified for and ) (Error code: 4101)
The device range for n points starting from the device designated by overlaps with the
device range for n points starting from the device designated by .
(except when the same device is specified for and ) (Error code: 4101)
Program Example
(1) The following program performs a logical product 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] [List Mode]
[Operation]
S2
b15 b8
001 1 0 0 1 1 0 0 0000 1 1
b7 b0
11 1 1 0 0 0 0 0 0 0 011 1 1
00 0 0 0 0 0 0 0 0 0 011 1 1
+ 1
+ 2
01 0 10 1 0 1 0 00 001 0 1
11 1 1 0 0 00 0 0 0 0000 0
b15 b8
0011 0 0 11 0 01 1 001 1
b7 b0
11 1 1 0 0 0 0 0 0 0 011 1 1
00 00 0 0 0 01 1 1 111 1 1
+ 1
+ 2
0101010101010101
11 1 1 0 0 0 0 1 1 1 100 0 0
+ (n
1)
+ (n
2)
nBKAND
b15 b8b7 b0
11 1 11 1 1 1 0 0 00 11 1 1
n
+ (n
1)
+ (n
2)
D
S1
S2
S1
S1
D
D
D
D
S1
S1
S1
S2
D
S1
D
S1 D
S2
D
S2
D
Step Instruction Device
BKAND
b15 b8
11 1 1 0 0 0 0 0 00 000 0 0
b7 b0
0 0 0 0 1 1 1 1 0 0 0 000 0 0
0 0 0 0 0 0 0 0 1 1 1 111 1 1
D201
D202
D200
b15 b8
11 1 1 0 0 0 0 1 1 1 111 1 1
b7 b0
1 1 1 11 1 1 1 0 0 0 00 00 0
0 0 0 0 0 0 0 0 1 1 1 11111
D101
D102
D100
b15 b8
11 1 1 11 1 1 0 0 0 000 0 0
b7 b0
0 0 0 0 1 1 1 1 0 0 0 000 0 0
0 0 0 0 1 1 11 1 1 1 11111
R1
R2
R0
D0 3