gwTimeGet (Function) |
Top Previous Next |
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.
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 gwTimeGet : DINT;
Example: INCLUDE rtcu.inc |