Clock; Read Of Clock Data - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS

5.20 Clock

5.20.1 Read of clock data

The "year, month, day, hour, minute, second, day of week" is read from the clock element of the QCPU/LCPU.
They are stored into the specified destination as BIN values.
Function definition
5- 107
DATERD_MD
BOOL DATERD_MD (BOOL EN, ANY16(7) S);
Argument Name
IN/OUT
EN
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the "year, month, day, hour, minute,
(* second, day of week" are read from the clock element of the QCPU/LCPU,
(* and stored into the device specified in TimeData as BIN values.
DATERD_MD (X0, TimeData);
Corresponding MELSEC command
DATERD (Read of clock data)
Execution condition (Function is executed only when the
IN
result is TRUE)
Read clock data
OUT
(ARRAY [0..6]
OF ANY16)
For the usable data type, refer to "3.2.2
About ANY type".
Description
D [0]
Year (1980 to 2079)
D [1]
Month (1 to 12)
D [2]
Day (1 to 31)
D [3]
Hour (0 to 23)
D [4]
Minute (0 to 59)
D [5]
Second (0 to 59)
D [6]
Day of week (0 to 6)
Description
*)
*)
*)
5- 107

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents