6
-
16
(b) Reading clock data
To read clock data to the data register, use either of the following instructions in the program.
• DATERD (instruction for reading clock data)
• S(P).DATERD (instruction for reading extended clock data)
Figure 6.12 shows a program for storing the clock data read with the DATERD instruction to D10 to D16.
*1: Figure 6.13 shows the clock data stored in D10 to D16.
For details of the DATERD and S(P).DATERD instructions, refer to the following.
MELSEC-Q/L Programming Manual (Common Instruction)
Clock data can also be written or read by the special relay (SM210 to SM213) and special register (SD210 to SD213).
For details of the special relay and special register, refer to the following.
QCPU User's Manual (Hardware Design, Maintenance and Inspection)
Figure 6.12 Program example for storing clock data
Figure 6.13 Clock data stored
Read request
X1
DATERD
D10
Stores clock data to D10
to D16.
*1
D10
D11
D12
D13
D14
D15
D16
2004
4
1
11
35
24
2
Year (four digits)
Month
Date
Hour
Minute
Second
Day of the week
(