RRTC: Reading the system date
Original instructions
Description of the function
The function RRTC captures the current date from the PLC real-time clock. It is a function used to convert PL7 applications.
The additional parameters EN and ENO can be configured.
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
RRTC
ST Result_Date
Representation in ST
Representation:
RRTC(Result_Date);
Description of parameters
The following table describes the output parameters:
Parameter
Type
Comment
Result_Date
ARRAY [0...3] OF INT
Result_Date contains the current date value in PL7 DT format (array of 4 integers).
PL7 DATE_AND_TIME format
The PL7 DATE_AND_TIME (DT) format is displayed as follow:
yyyy-mm-dd-hh:mm:ss
example 2000-05-18-15:45:22
the value is BCD coded on 64 bit. The result is an array of 4 integers.
With the previous example in hexadecimal.
NOTE: Only the DT included between [1990-01-01-00:00:00, 2099-12-31-23:59:59] are allowed.