7-8
7.1 Logical Operation Instructions
7.1.2 Logical AND operation on block data
BKAND
O
peration Error
In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and
the corresponding error code is stored to SD0.
• The range of n points from the device specified for
,
or
exceeds the
corresponding device.
(Error code: 4101)
• The device range of n points from the device specified for
overlaps with the device
range of n points from the device specified for
.
(Except when the same device is specified for
and
)
(Error code: 4101)
• The device range of n points from the device specified for
overlaps with the device
range of n points from the device specified for
.
(Except when the same device is specified for
and
)
(Error code: 4101)
Program Example
In the following program, the logical AND operation is performed on the data in the devices from
D100 to D102 and the data in the devices from R0 to R2 when X20 turns ON, and the results are
stored to D200 and the following devices.
[Structured ladder]
[ST]
D0:=K3
BKANDP(X20,D100,R0,Var_D0,D200);
[Operation]
s1
s2
d
s1
d
s1
d
s2
d
s2
d
BKAND
b15
b8
1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
b7
b0
0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
D201
D202
D200
b15
b8
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1
b7
b0
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
D101
D102
D100
b15
b8
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
b7
b0
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 1 1
R1
R2
R0
Var_D0
3
Содержание MELSEC Q Series
Страница 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Страница 2: ......
Страница 14: ...A 12 MEMO ...
Страница 340: ...6 178 MEMO MTR ...
Страница 708: ...7 368 MEMO ...
Страница 776: ...8 68 MEMO ...
Страница 796: ...9 20 MEMO ...
Страница 804: ...App 8 MEMO ...
Страница 812: ...Index 8 MEMO ...
Страница 815: ......