DCTIME_TO_SYSTEMTIME

DCTIME_TO_SYSTEMTIME 1:

This function converts the 64 bit "Distributed Clock System Time" variable to structured "Windows System Time" variable.

FUNCTION DCTIME_TO_SYSTEMTIME: TIMESTRUCT

TIMESTRUCT

VAR_INPUT
    in : T_DCTIME;
END_VAR

in: "Distributed Clock System Time" variable to be converted.

Example:

PROGRAM P_TEST
VAR
    syst : TIMESTRUCT;
END_VAR
syst := DCTIME_TO_SYSTEMTIME( F_GetCurDcTickTime() );

Requirements

Development environment

Target system type

PLC libraries to be linked

TwinCAT v2.10.0 Build > 1340
TwinCAT v2.11.0 Build > 1536

PC or CX (x86, ARM)

TcEtherCAT.Lib
( Standard.Lib; TcBase.Lib; TcSystem.Lib, TcUtilities.Lib are included automatically )