562
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
21 Real Time Clock Control – FNC160 to FNC169
21.1 FNC160 – TCMP / RTC Data Compare
Explanation of function and operation
1. 16-bit operation (TCMP)
The comparison time (hour, minute, and second) stored in , , and is compared with the time data
(hour, minute, and second) stored in , +1, and +2. Three devices starting from turn ON or
OFF according to the comparison result.
Cautions
1) Number of occupied devices
Three devices are occupied respectively by and .
Make sure that these devices are not used in other controls for the machine.
2) When utilizing the time (hour, minute, and second) of the real time clock built in a PLC
Read the values of special data registers by TRD (FNC166) instruction, and then specify those word devices as
the operands.
Program example
S
1
S
2
S
3
S
S
S
D
Turns ON in the case of " "
Turns ON in the case of " "
Turns ON in the case of " "
Command
input
FNC160
TCMP
S
1
S
2
S
3
S
D
>
=
<
↑
Even if the command contact turns OFF from ON and TCMP instruction is not
executed, , +1 and +2 hold the status before the command
contact turned OFF.
D
+1D
+2D
(minute)
(hour)
(second)
S
1
S
2
S
3
(minute)
(hour)
(second)
S
1
S
2
S
3
(minute)
(hour)
(second)
S
1
S
2
S
3
S
+1(minute)
(hour)
+2(second)
S
S
S
+1(minute)
(hour)
+2(second)
S
S
S
+1(minute)
(hour)
+2(second)
S
S
D
D
D
S
D
S
S
S
S
1
S
2
S
3
: Specifies "hour" of the comparison
time.
: Specifies "minute" of the
comparison time.
: Specifies "second" of the comparison
time.
: Specifies "hour" of the time data.
+1
+2
: Specifies "minute" of the time data.
: Specifies "second" of the time data.
X000
FNC160
TCMP
K10 K30 K50 D0 M0
S
1
S
2
S
3
S
D
10:30:50
M0
Turns ON in the case of "10:30:50 > "
M1
Turns ON in the case of "10:30:50 = "
M2
Turns ON in the case of "10:30:50 < "
↑
Even if X000 is OFF and TCMP instruction is not executed, M0 to
M2 hold the status before X000 turned OFF.
D1 (minute)
D0 (hour)
D2 (second)
D1 (minute)
D0 (hour)
D2 (second)
D1 (minute)
D0 (hour)
D2 (second)
: Three bit devices turn ON or OFF
according to the comparison result.
D
+1,D
+2D
,