-

RTC_WS

Type Function block
Description Reads the local date and time configuration from the controller and writes it to a wstring variable. The local time is the UTC (Universal Time Coordinated) time plus the time zone configured on the controller. If the parameter EN is set to TRUE, the local date and time configuration of the controller is written in the date and time format into the connected output string. If EN is set to FALSE, the string is not changed.

The output string is written according to the IEC 61131-3 short prefix date and time notation.
Example: DT#1998-11-21-15:27:56.46
Notes
  • The function block is only supported on systems with an available realtime clock.
  • Function blocks have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.
Parameters Input

EN

Outputs

Q

CDT
Example Example