Clock Instructions; Clock Instructions; Reading Clock Data - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

7.15

Clock Instructions

Reading clock data

DATERD(P)
High
Basic
Process
Redundant Universal
performance
DATERD
DATERDP
(D): Head number of the devices where the read clock data will be stored (BIN 16 bits)
Setting
Internal device
data
Bit
Word
(D)
Processing details
• 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 (D) or later device.
D
D
+1
D
+2
Clock element
Hour (24-hour clock)
D
+3
D
+4
D
+5
Day of week
D
+6
• 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.
Day of week
Stored data
• Compensation is made automatically for leap years.
Operation error
• In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
Error details
code
4101
The range of the device specified by (D) exceeds the range of the
corresponding device.
LCPU
Command
Command
R, ZR
J\
Bit
Year
(1980 to 2079)
Month
(1 to 12)
Day
(1 to 31)
(0 to 23)
Minute
(0 to 59)
Second
(0 to 59)
(0 to 6)
Sun
Mon
0
1
DATERD
DATERDP
U\G
Word
Tue
Wed
Thu
2
3
4
Q00J/
QnH
Q00/
Q01
7 APPLICATION INSTRUCTIONS
D
D
Zn
Constant
Others
Fri
Sat
5
6
QnPH
QnPRH
QnU
LCPU

7.15 Clock Instructions

7
683

Advertisement

Table of Contents
loading

Table of Contents