A
A-4 CP1L Programming Examples
SYSMAC CP1L Getting Started Guide
129
Ap
pend
ix
z
Time Comparison Instructions
Time comparison instructions allow for easy comparisons of time.
E.g. If 0.00 is ON and the time is 13:00:00, turn 100.00 ON.
The hour, minute, and second of the current time in the CPU unit's built-in
clock (A351 to A352) and set time (D100 to D102) will be compared.
- - 1 1 1 0 0 0
D100
=DT
D0
A351
100.00
0.00
S2
C
S1
Set D0=0038Hex
7 6 5 4 3 2 1 0
D0
Compare seconds
Mask years
Mask months
Mask days
Compare hours
Compare minutes
Compare highlighted data
A351
A353
A352
15 9 7 0
Minute
Year
S2 :D100
S2+2:D102
S2+1:D101
15 9 7 0
00 00
- -
- 13
Reflected on condition flag when power is turned ON
Hour
Day
Second
Month
W07E-EN-02+CP1L+GettingStartedGuide.book Seite 129 Montag, 15. September 2008 11:15 11