Mitsubishi Electric MELSEC-Q/L Programming Manual page 205

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
Condition
DBKCMP=
(S1)=(S2)
DBKCMP<>
(S1)(S2)
DBKCMP>
(S1)>(S2)
DBKCMP<=
(S1)(S2)
DBKCMP<
(S1)<(S2)
DBKCMP>=
(S1)(S2)
• If all comparison results stored into the devices starting from the device specified by (D) to nth device are on(1), or one of
the results is off(2), the special relays will be on or off in accordance with the conditions as follows.
No.
Number
When all results of comparison operations are on(1)
Initial execution/
Scan
1
SM704
ON
2
SM716
ON
3
SM717
4
SM718
In a standby program, a special relay depending on the caller program turns on or off.
• If the value specified by n is 0, the instruction will be not processed.
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
4100
A negative value is specified for n.
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 the value data stored at R0 to R5 with the value data stored at D20 to D25, and then
stores the operation result into Y0 to Y2, when M0 is turned on.
[Ladder Mode]
[Operation]
b31
b0
R1,R0
-2147483000
0
R3,R2
R5,R4
2147483000
Comparison
operation result
ON (1)
Interrupt (other
Interrupt(l45)
than l45)/Fixed
scan execution
ON
ON
ON
ON
b31
b0
D21,D20
-2147483000
1
D23,D22
D25,D24
2147482999
Instruction symbol
Condition
DBKCMP=
(S1)(S2)
DBKCMP<>
(S1)=(S2)
DBKCMP>
(S1)(S2)
DBKCMP<=
(S1)>(S2)
DBKCMP<
(S1)(S2)
DBKCMP>=
(S1)<(S2)
When results of comparison operations have a result
of off(0)
Initial execution/
Interrupt (other
Scan
than l45)/Fixed
scan execution
OFF
OFF
OFF
OFF
Q00J/
QnH
QnPH
Q00/
Q01
[List Mode]
Step
Instruction
Y0
(0)
OFF
(1)
Y1
ON
(1)
Y2
ON
6.1 Comparison Operation Instructions
Comparison
operation result
OFF (0)
Interrupt(l45)
OFF
OFF
QnPRH
QnU
LCPU
Device
6 BASIC INSTRUCTIONS
6
203

Advertisement

Table of Contents
loading

Table of Contents