200
6 BASIC INSTRUCTIONS
6.1 Comparison Operation Instructions
• The results of the comparison operations for the individual instructions are as follows:
• If all comparison results stored n points from (D) are ON (1), SM704 (block comparison signal) turns ON.
• 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 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.
Instruction symbol Condition Comparison
operation result
Instruction symbol Condition Comparison
operation result
BKCMP= (S1)=(S2) ON (1) BKCMP= (S1)(S2) OFF (0)
BKCMP<> (S1)(S2) BKCMP<> (S1)=(S2)
BKCMP> (S1)>(S2) BKCMP> (S1)(S2)
BKCMP<= (S1)(S2) BKCMP<= (S1)>(S2)
BKCMP< (S1)<(S2) BKCMP< (S1)(S2)
BKCMP>= (S1)(S2) BKCMP>= (S1)<(S2)
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4101 The points specified in n exceed those of the corresponding device specified
in (S1), (S2), or (D).
The ranges of devices starting from the one specified in (S1) and (D) overlap
by n points.
The ranges of devices starting from the one specified in (S2) and (D) overlap
by n points.
[Ladder Mode] [List Mode]
[Operation]
4D0
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