clockLinsecToTime (Functionblock) |
Top Previous Next |
This function block can be used to convert number of seconds since 1980-1-1 00:00:00 to year, month, day, hour, minute, second, and weekday format
Input: linsec : DINT Number of seconds since 1980-1-1 00:00:00
Output: year : INT (1980 .. 2048) The current year.
month : SINT (1 .. 12) The current month.
day : SINT (1 .. 31) The current date.
hour: SINT (0 .. 23) The current hour.
minute : SINT (0 .. 59) The current minute.
second : SINT (0 .. 59) The current second.
dayofweek : SINT (1 .. 7) The current day of week, 1 = Monday, 2 = Tuesday... 7 = Sunday.
Declaration: FUNCTION_BLOCK clockLinsecToTime;
Example: INCLUDE rtcu.inc |