Clock Instructions - Mitsubishi MELSEC Q Series Programming Manual

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

7.15

Clock instructions

7.15.1
Reading clock data (DATERD(P))
DATERD(P)
DATERD
DATERDP
Setting
Data
D
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
(2) The "year" at
(3) The "day of week" at
Day of week
Stored data
(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
(For the Universal model QCPU, LCPU.)
Command
Command
: Head number of the devices where the read clock data will be stored (BIN 16 bits)
D
Internal Devices
R, ZR
Bit
Word
––
Clock element
is stored as 4-digit year indication.
D
+6 is stored as 0 to 6 to represent the days Sunday to Saturday.
D
Sun
Mon
Tue
Wed
Thu
0
1
2
3
4
exceeds the range of the corresponding device.
D
High
Basic
performance
J
\
U
\G
Bit
Word
––
D
Year
(1980 to 2079)
D
+1
Month
(1 to 12)
D
+2
Day
(1 to 31)
D
+3
Hour (24-hour clock)
(0 to 23)
Minute
D
+4
(0 to 59)
Second
D
+5
(0 to 59)
D
+6
Day of week
(0 to 6)
Fri
Sat
5
6
DATERD(P)
Process
Redundant Universal
LCPU
DATERD
D
DATERDP
D
Zn
Constants
Other
or later device.
D
(Error code: 4101)
7-343
1
2
3
4
6
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents