T_DCTIME

The data type T_DCTIME represents the Distributed Clock System Time (known as DC Time for short) in the form of a linear, 64-bit integer value. The time is expressed in nanoseconds since 1.1.2000 UTC.
The data type is implemented as two 32-bit DWORD variables, which simplifies processing in the PLC.  With the ui64-bit functions from the  TcUtilities.Lib you can  execute simple mathematical operations (addition and subratction of times) with this data type.

TYPE T_DCTIME : T_ULARGE_INTEGER;
END_TYPE

 

Useful "Distributed Clock System Time" constants

Description

EC_DCTIME_DELTA_OFFSET

Number of 100 nanosecond ticks between 1.1.1601 and 1.1.2000
It's the difference between "Windows File Time" and "Distributed Clock System Time".

EC_DCTIME_DATEDELTA_OFFSET

Number of past days since year zero until 1 January 2000

EC_DCTIME_TICKSPERMSEC

Number of nanosecond ticks per millisecond

EC_DCTIME_TICKSPERSEC

Number of nanosecond ticks per second

EC_DCTIME_TICKSPERDAY

Number of nanosecond ticks per day

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v2.10.0 Build > 1310 or higher

PC or CX (x86, ARM)

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