DCTIMESTRUCT

Structured TwinCAT "Distributed Clock System Time" format. The smallest unit is a 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

Name

Type

Description

wYear

WORD

Year: 2000 ~ 2584

wMonth

WORD

Month: 1 ~ 12 (January = 1, February = 2 etc.)

wDayOfWeek

WORD

Day of the week: 0 ~ 6 (Sunday = 0, Monday = 1 etc.)

wDay

WORD

Day of the month: 1 ~ 31

wHour

WORD

Hour: 0 ~ 23

wMinute

WORD

Minute: 0 ~ 59

wSecond

WORD

Second: 0 ~ 59

wMilliseconds

WORD

Millisecond: 0 ~ 999

wMicroseconds

WORD

Microsecond: 0 ~ 999

wNanoseconds

WORD

Nanosecond: 0 ~ 999

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_EtherCAT