FILETIME_TO_DCTIME

FILETIME_TO_DCTIME 1:

FILETIME_TO_DCTIME 2:

Outdated function

The function is outdated. Use the function FILETIME_TO_DCTIME64 instead.

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_DCTIME. In the event of a conversion error the function returns the value zero.

FUNCTION FILETIME_TO_DCTIME: T_DCTIME

FILETIME_TO_DCTIME 3: 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_DCTIME;
END_VAR

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

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_EtherCAT