Mitsubishi MELSEC-Q/L Programming Manual page 589

Table of Contents

Advertisement

(a) The following figure shows the comparison example of time.
A
0 Midnight
6:00
4:50:55
The following table shows the conductive states resulting from performing the comparison operation of the dates A,
B, and C shown above.
Even if the objects to be compared are under the same condition, the comparison operation results vary depending
on the objects selected.
Comparison objects
Second
Month
Month, day
Hour
Hour, second
Hour, minute
Hour, minute, second
No objects
Operation Error
(1) There is no operation error in the TM=, TM<>, TM>, TM<=, TM<, or TM>= instruction.
Program Example
(1) The following program compares the data stored in D0 with the data (hour, minute, and second) stored in D10, and
makes Y33 be conductive status when the data stored in D0 meet the data stored in D10.
[Ladder Mode]
(2) The following program compares the data stored in D0 with the current time data (hour and minute), and makes Y33 be
conductive status when the data stored in D0 do not meet the current date data, when M0 is turned on.
[Ladder Mode]
(3) The following program compares the data stored in D0 with the data (hour and second) stored in D10, and makes Y33 be
conductive status when the data value stored in D10 is smaller than the data value stored in D0, when M0 is turned on.
[Ladder Mode]
B
C
N00n
18:00
0 Midnight
14:08:58
22:47:05
Comparison condition
A<B
B<C
: Conductive : No-conductive
[List Mode]
Step
Instruction
[List Mode]
Step
Instruction
[List Mode]
Step
Instruction
TM=, TM<>, TM>, TM<=, TM<, TM>=
A<C
Device
Device
Device
1
2
3
4
4
6
7
8
587

Advertisement

Table of Contents
loading

Table of Contents