DCTIME_TO_DCTIMESTRUCT
This function converts the 64 bit "Distributed Clock System Time" variable to structured variable of type: DCTIMESTRUCT.
FUNCTION DCTIME_TO_DCTIMESTRUCT: DCTIMESTRUCT
VAR_INPUT
in : T_DCTIME;
END_VAR
in: "Distributed Clock System Time" variable to be converted;
Example:
PROGRAM P_TEST
VAR
dcStruct : DCTIMESTRUCT;
dcTime : T_DCTIME;
END_VAR
dcTime := F_GetCurDcTickTime();
dcStruct := DCTIME_TO_DCTIMESTRUCT(dcTime);
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 |