EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 205

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6 BASIC INSTRUCTIONS
6.1 Comparison Operation Instructions
203
6
The results of the comparison operations for the individual instructions are as follows:
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.
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.
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.
Instruction symbol Condition Comparison
operation result
Instruction symbol Condition Comparison
operation result
DBKCMP= (S1)=(S2) ON (1) DBKCMP= (S1)(S2) OFF (0)
DBKCMP<> (S1)(S2) DBKCMP<> (S1)=(S2)
DBKCMP> (S1)>(S2) DBKCMP> (S1)(S2)
DBKCMP<= (S1)(S2) DBKCMP<= (S1)>(S2)
DBKCMP< (S1)<(S2) DBKCMP< (S1)(S2)
DBKCMP>= (S1)(S2) DBKCMP>= (S1)<(S2)
No. Number When all results of comparison operations are on(1) When results of comparison operations have a result
of off(0)
Initial execution/
Scan
Interrupt (other
than l45)/Fixed
scan execution
Interrupt(l45) Initial execution/
Scan
Interrupt (other
than l45)/Fixed
scan execution
Interrupt(l45)
1 SM704 ON ON ON OFF OFF OFF
2SM716 ON OFF 
3SM717
ON

OFF
4SM718 ON OFF
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
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.

[Ladder Mode] [List Mode]
[Operation]
Step
Instruction
Device
(0)
OFF
(1)
ON
(1)
ON
Y1
Y0
Y2
b31 b0
-2147483000
1
2147482999
b31 b0
-2147483000
0
2147483000
R3,R2
R5,R4
R1,R0
D23,D22
D25,D24
D21,D20

Table of Contents

Related product manuals