587
TM=, TM<>, TM>, TM<=, TM<, TM>=
1
2
3
4
4
6
7
8
7.15
Clock instr
uct
ions
7.15.8
T
M=, TM<
>
, TM>, TM<=, TM<, TM>
=
(a) The following figure shows the comparison example of time.
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.
Operat
i
on
E
rror
(1) There is no operation error in the TM=, TM<>, TM>, TM<=, TM<, or TM>= instruction.
Program
E
xamp
l
e
(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]
[List 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]
[List 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]
[List Mode]
Comparison objects
Comparison condition
A<B
B<C
A<C
Second
Month
Month, day
Hour
Hour, second
Hour, minute
Hour, minute, second
No objects
: Conductive : No-conductive
B
14:08:58
A
4:50:55
22:47:05
C
0 Midnight
18:00
N00n
6:00
0 Midnight
Step
I
nstruct
i
on
De
vi
ce
Step
I
nstruct
i
on
De
vi
ce
Step
I
nstruct
i
on
De
vi
ce