FILETIME64_TO_TOD
This function can be used to extract the 'Time of Day' from a time in FILETIME format.
FUNCTION FILETIME64_TO_TOD: TOD
Inputs
VAR_INPUT
fileTime : T_FILETIME64;
END_VAR
Name | Type | Description |
---|---|---|
fileTime | The time to be converted in FILETIME format |
Return parameter | Description |
---|---|
0 | Error. The function fails if the most significant bit of the 64-bit fileTime variable is set. |
> 0 | No error. The time of day is displayed. |
Example:
PROGRAM MAIN
VAR
timeAsFileTime : T_FILETIME64;
timeOfDay : TOD;
END_VAR
timeAsFileTime := F_GetSystemTime();
timeOfDay := FILETIME64_TO_TOD( timeAsFileTime );
Requirements
Development environment | Target platform | PLC libraries to be integrated (category group) |
---|---|---|
TwinCAT v3.1.4024.0 | PC or CX (x86, x64, ARM) | Tc2_Utilities (System) >= 3.7.3.0 |
See also