DCTIME_TO_STRING

DCTIME_TO_STRING 1:

This function converts a  "Distributed Clock System Time" variable to a string .

After conversion the resulting string has the following format: 'YYYY-MM-DD-hh:mm:ss.nnnnnnnnn'

FUNCTION DCTIME_TO_STRING: STRING(29)

VAR_INPUT
    in : T_DCTIME;
END_VAR

in: "Distributed Clock System Time" variable to be converted.

 

Example:

See description of: F_GetCurDcTickTime.

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 )