FILETIME_TO_DCTIME64

FILETIME_TO_DCTIME64 1:

The function converts a 64-bit Windows file time variable of type T_FILETIME to a 64-bit distributed clock system time variable of type T_DCTIME64. In the event of a conversion error the function returns the value zero.

FUNCTION FILETIME_TO_DCTIME64: T_DCTIME64

FILETIME_TO_DCTIME64 2: Inputs

VAR_INPUT
    in : T_FILETIME;
END_VAR

Name

Type

Description

in

T_FILETIME

The "Windows File Time" variable to be converted

Sample:

PROGRAM P_TEST
VAR
    fbSysFileTime : GETSYSTEMTIME;
    ft : T_FILETIME;
    dct : T_DCTIME64;
END_VAR

fbSysFileTime(timeLoDW=>ft.dwLowDateTime, timeHiDW=>ft.dwHighDateTime);
dct := FILETIME_TO_DCTIME64(ft);

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_EtherCAT