DCTIMESTRUCT

Structured TwinCAT "Distributed Clock System Time" time format. The smallest unit is nanosecond. This data type represents the number of nanoseconds since 01.01.2000 (GMT).

TYPE DCTIMESTRUCT :
STRUCT
    wYear           : WORD; 
    wMonth          : WORD;
    wDayOfWeek      : WORD;
    wDay            : WORD;
    wHour           : WORD;
    wMinute         : WORD;
    wSecond         : WORD;
    wMilliseconds   : WORD;
    wMicroseconds   : WORD;
    wNanoseconds    : WORD;
END_STRUCT
END_TYPE

wYear : Specifies the year: 2000 ~ 2584;

wMonth : Specifies the month: 1 ~ 12 (January = 1, February = 2 and so on); 

wDayOfWeek : Specifies the day of the week: 0 ~ 6 (Sunday = 0, Monday = 1 and so on );

wDay : Specifies the day of the month: 1 ~ 31;

wHour : Specifies the hour: 0 ~ 23;

wMinute : Specifies the minute: 0 ~ 59;

wSecond : Specifies the second: 0 ~ 59;

wMilliseconds : Specifies the millisecond: 0 ~ 999;

wMicroseconds : Specifies the microsecond: 0 ~ 999;

wNanoseconds : Specifies the nanosecond: 0 ~ 999;

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v2.10.0 Build > 1316 or higher

PC or CX (x86, ARM)

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