clockSet (Function) |
Top Previous Next |
This function can be used to set the real time clock on the RTCU device. If any of the input parameters are not referenced in the call, they will not be modified in the real time clock.
Input: year : INT (-1, 2000 .. 2048) (Default -1) The current year - if "-1", then not updated.
month : SINT (-1, 1 .. 12) (Default -1) The current month - if "-1", then not updated.
day : SINT (-1, 1 .. 31) (Default -1) The current date - if "-1", then not updated.
hour: SINT (-1 .. 23) (Default -1) The current hour - if "-1", then not updated.
minute : SINT (-1 .. 59) (Default -1) The current minute - if "-1", then not updated.
second : SINT (-1 .. 59) (Default -1) The current second - if "-1", then not updated.
linsec : DINT (-1 .. 2147483647) (Default -1) Seconds since 1980-1-1 00:00:00. If all other input variables are set to their default state (-1), and Linsec is set to something different than -1, the new time will be calculated as Linsec numbers of seconds since 1980-1-1 00:00:00.
Returns: None
Declaration: FUNCTION clockSet;
Example: INCLUDE rtcu.inc |