Справочник Пользователя для Mitsubishi Electronics QCPU
7-344
DATERD(P)
7.15
Clock instructions
7.15.1
Reading clock data (DATERD(P))
DATERD(P)
Function
(1) Reads "year, month, day, hour, minute, second, and day of week" from the clock element of
the CPU module and stores it as BIN value to the device designated by
or later device.
(2) The "year" at
is stored as 4-digit year indication.
(3) The "day of week" at
+6 is stored as 0 to 6 to represent the days Sunday to Saturday.
(4) Compensation is made automatically for leap years.
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error
code is stored into SD0.
• The device specified by
exceeds the range of the corresponding device.
(For the Universal model QCPU only.)
(Error code: 4101)
: Head number of the devices where the read clock data will be stored (BIN 16 bits)
Setting
Data
Internal Devices
R, ZR
J
\
U
\G
Zn
Constants
Other
Bit
Word
Bit
Word
––
––
Day of week
Sun Mon
Tue Wed Thu
Fri
Sat
Stored data
0
1
2
3
4
5
6
Basic
Process
High
performance
Redundant Universal
DATERD
DATERDP
Command
Command
DATERD
DATERDP
D
D
D
D
D
Year
Month
Day
+1
+2
+2
(1980 to 2079)
(1 to 12)
(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
D
D
D
D
D