7.14.2 RD_CLOLCKINFO
Function
This instruction reads the system clock status and outputs it, as well as returning the execution status of the instruction.
LD graphics

Parameter description
| Interface variables | Declaration | Data type | Description |
|---|---|---|---|
| RD_CLOCKINFO | Return value | INT | Return command status |
| CLOCKINFO | Out_Put | WORD | Status of the internal CPU clock |
Internal CPU clock status description:
- Bit0: Information about whether time synchronization is lost
- Bit0 = 1: One or more time synchronizations are lost.
- Bit0 = 0: Time synchronization is not lost.
Bit0 will be reset to 0 in the following cases: No time synchronization is started, or after a CPU restart, or after setting the time
-
Bit1 = 1: Time synchronization is enabled.
-
Bit2: Information about currently activated daylight saving time or standard time
-
Bit2 =1: Activate Daylight Saving Time (DST)
-
Bit2 =0: Activate Standard Time
-
-
Bit3 to Bit15: 0 (reserved)
Return value: RD_CLOCKINFO (...)
Return command status (W#16#....)
Return instruction status description:
- 0000 No error.
- FF00 Unable to read system clock status.
- In the program editor, error codes can be displayed as integers or hexadecimal.
Example
- An LD example is shown in the following animation:

- ST example is shown in the following code:
Definition reference
Out:INT;
Word1:WORD;
Code implementation:
OUT2:=RD_CLOCKINFO(CLOCKINFO=>Word1);