21 Applied Instructions (Real Time Clock Control)
21.2 TZCP / RTC Data Zone Compare
546
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Program example
The range of "hour" is 0 to 23.
The range of "minute" is 0 to 59.
The range of "second" is 0 to 59.
[Structured ladder/FBD] [ST]
TZCP(X000,D20,D30,D0,M3);
+1, +2
,
+1,
+2
,
+1, +2
,
+1, +2
,
d d d
s ss
s1 s1 s1
s2 s2 s2
:Comparison time lower limit is specified by "hour," "minute," "second."
:Comparison time upper limit is specified by "hour," "minute," "second."
:Time data is specified by "hour," "minute," "second."
:Three bit devices are turned ON or OFF depending on the comparison result.
X000
M3
M4
M5
If TZCP instruction is not executed when X000 is changed from ON to OFF,
M3 to M5 are holding the state before X000 is turned OFF.
D1
D0
D2
D21
D20
D22
D31
D30
D32
and then turned ON
and then turned ON
and then turned ON
D21
D20
D22
D1
D0
D2
D1
D0
D2
D31
D30
D32
TZCP
EN
s1
s2
ENO
d
M3D20
D30
s
D0
↑
>
>
≤≤
(hour)
(minute)
(second)
(hour)
(minute)
(second)
(hour)
(minute)
(second)
(hour)
(minute)
(second)
(hour)
(minute)
(second)
(hour)
(minute)
(second)
(hour)
(minute)
(second)