rchTimeGet (Function) |
|
This function requests the current time, expressed as seconds since 1980-1-1 00:00:00 (LINSEC), from the RTCU Communication Hub. The time requested can be either UTC or the Local time of the server. This function is functionally identical to and interchangeable with the gwTimeGet function.
Note: the time service functionality must be available and enabled in the connected RTCU Communication Hub.
Input: UTC : BOOL (Default FALSE) The format of the time fetched from the RTCU Communication Hub.
Returns: DINT The current time as seconds since 1980-1-1 00:00:00 (LINSEC).
Declaration: FUNCTION rchTimeGet : DINT;
Example: INCLUDE rtcu.inc |