7 APPLICATION INSTRUCTIONS
7.16 Expansion Clock Instructions
709
7
7.16 Expansion Clock Instructions
Reading expansion clock data
S(P).DATERD
• Reads "year, month, day, hour, minute, second, day of the week, and millisecond" from the clock element of the CPU
module, and stores it as BIN value into the device specified by (D) or later device.
• The "year" at (D) is stored as 4-digit year indication.
• The "day of week" at (D)+6 is stored as 0 to 6 to represent the days Sunday to Saturday.
• Compensation is made automatically for leap years.
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
• High Performance model QCPU: The serial number (first five digits) is "07032" or later.
• Process CPU: The serial number (first five digits) is "07032" or later.
• Redundant CPU: The serial number (first five digits) is "07032" or later.
(D): Head number of the devices where the read clock data will be stored (BIN 16 bits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant Others
Bit Word Bit Word
(D)
Day of week Sunday Monday Tuesday Wednesday Thursday Friday Saturday
Stored data 0123456
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4101 The range of the device specified by (D) exceeds the range of the
corresponding device.
Basic
Process
High
performance
Redundant
Universal
LCPU
Ver. Ver. Ver.
S.DATERD
SP.DATERD
Command
Command
S.DATERD
SP.DATERD
D
D
Year
Month
Day
+1
+2
(1980 to 2079)
(1 to 12)
(1 to 31)
+3
(0 to 23)
+4
(0 to 59)
+5
(0 to 59)
+6
(0 to 6)
Hour (24-hour clock)
Minute
Second
Day of week
Clock element
D
D
D
D
D
D
D
+7 (0 to 999)
Millisecond
D