DCTIME_TO_DCTIMESTRUCT

DCTIME_TO_DCTIMESTRUCT 1:

DCTIME_TO_DCTIMESTRUCT 2:

Outdated function

This function is outdated. Use the function DCTIME64_TO_DCTIMESTRUCT instead.

The function converts a 64-bit distributed clock system time variable of type T_DCTIME to a structured variable of type DCTIMESTRUCT.

FUNCTION DCTIME_TO_DCTIMESTRUCT: DCTIMESTRUCT

DCTIME_TO_DCTIMESTRUCT 3: Inputs

VAR_INPUT
    in : T_DCTIME;
END_VAR

Name

Type

Description

in

T_DCTIME

The "Distributed Clock System Time" variable to be converted.

Sample:

PROGRAM P_TEST
VAR
    dcStruct : DCTIMESTRUCT;
    dcTime : T_DCTIME;
END_VAR

dcTime := F_GetCurDcTickTime();
dcStruct := DCTIME_TO_DCTIMESTRUCT(dcTime);

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_EtherCAT