183
BKCMP
, BKCMP
P
1
2
3
4
6
7
8
6.1
C
ompar
ison Operat
ion In
str
uctions
6.1.6
BKCMP
, B
K
C
M
P
P
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.
Program Example
(1) The following program compares, when X20 is turned ON, the data stored at D100 to D103 with the data stored at R0 to
R3 and stores the operation result into the area starting from M10.
[Ladder Mode]
[List Mode]
[Operation]
(2) The following program compares, when X1C is turned ON, the constant K1000 with the data stored at D10 to D13, and
stores the operation result at b4 to b7 in D0.
[Ladder Mode]
[List Mode]
[Operation]
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4101
The points specified in n exceeds those of each device specified in ,
, or .
The ranges of devices starting from the one specified in and
overlap by n points.
The ranges of devices starting from the one specified in and
overlap by n points.
––
––
––
––
S1
S2
D
S1
D
S2
D
Step
Instruction
Device
4
D0
b15
b0
(
BIN
)
D101
(
BIN
)
(
BIN
)
1000
2000
4000
3000
(
BIN
)
D100
D102
D103
b15
b0
1000
(
BIN
)
R1
2000
(
BIN
)
4000
(
BIN
)
5000
(
BIN
)
R0
R2
R3
ON
M11
ON
ON
OFF
M10
M12
M13
Step
Instruction
Device
b15
b0
2000
(
BIN
)
D11
1000
(
BIN
)
2222
(
BIN
)
1000
(
BIN
)
D10
D12
D13
(
BIN
)
b15
b0
1000
b15
b4
0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0
b7
b0
D0 after
operation
b15
b4
0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0
b7
b0
D0 before
operation