6
- 17
6.5 Clock Function
6
FUNCTIONS
(b) Reading Time Data
When reading the time data to the data register, use the time data read instruction
(DATERD) from the program.
The figure below shows an example of a program used to read the clock data with
the DATERD instruction and then store it in D10 to D16.
* : Diagram 6.13 shows the clock data stored in D10 to 16.
Refer to the following manual for details of the DATERD instruction.
Q QCPU (Q Mode)/QnACPU Programming Manual (Common Instructions)
POINT
Time Data can be written to and read from by special relays (SM210 to SM213)
and special registers (SD210 to SD213).
See Appendix 1 for details on special relay. See Appendix 2 for details on special
registers.
Diagram 6.12 Program that stores clock data
Diagram 6.13 Clock data read
Read request
X1
DATERD
D10
The time data is read and
then stored in D10 to 16.
D10
D11
D12
D13
D14
D15
D16
2004
4
1
11
35
24
2
( (3) in this section)
4 digits in AD
Month
Date
Hour
Minute
Second
Day of the week