F_ConvTcTimeToExtTime64

F_ConvTcTimeToExtTime64 1:

The function F_ConvTcTimeToExtTime64 converts the TwinCAT distributed clock system time to an external time.

FUNCTION F_ConvTcTimeToExtTime64: T_DCTIME64

F_ConvTcTimeToExtTime64 2: Inputs

VAR_INPUT
   TcTime            : T_DCTIME64;
   DcToTcTimeOffset  : ULINT;
   DcToExtTimeOffset : ULINT;
END_VAR

Name

Type

Description

TcTime

T_DCTIME64

TwinCAT system time in "Distributed Clock" format

DcToTcTimeOffset

ULINT

Time offset between the TwinCAT "Distributed Clock" system time and the TwinCAT system time

DcToExtTimeOffset

ULINT

Time offset between the TwinCAT "Distributed Clock" system time and an external time

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_EtherCAT