Mitsubishi Electric MELSEC-Q/L Programming Manual page 202

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

• The results of the comparison operations for the individual instructions are as follows:
Instruction symbol
BKCMP=
BKCMP<>
BKCMP>
BKCMP<=
BKCMP<
BKCMP>=
• If all comparison results stored n points from (D) are ON (1), SM704 (block comparison signal) turns ON.
Operation error
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
Error details
code
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.
Program example
• 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]
[Operation]
b15
b0
D100
1000
(BIN)
D101
2000
(BIN)
D102
3000
(BIN)
D103
4000
(BIN)
D0
4
6 BASIC INSTRUCTIONS
200
6.1 Comparison Operation Instructions
Condition
Comparison
operation result
(S1)=(S2)
ON (1)
(S1)(S2)
(S1)>(S2)
(S1)(S2)
(S1)<(S2)
(S1)(S2)
b15
R0
1000
R1 2000
R2
5000
R3
4000
Instruction symbol
BKCMP=
BKCMP<>
BKCMP>
BKCMP<=
BKCMP<
BKCMP>=
Q00J/
Q00/
Q01
[List Mode]
Step
Instruction
b0
(BIN)
M10
(BIN)
M11
(BIN)
M12
(BIN)
M13
Condition
Comparison
operation result
(S1)(S2)
OFF (0)
(S1)=(S2)
(S1)(S2)
(S1)>(S2)
(S1)(S2)
(S1)<(S2)
QnH
QnPH
QnPRH
Device
ON
ON
OFF
ON
QnU
LCPU

Advertisement

Table of Contents
loading

Table of Contents