DCTIME_TO_STRING
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'
- YYYY: Year;
- MM: Month;
- DD: Day;
- hh: Hour;
- mm: Minute;
- ss: Second;
- nnnnnnnnn: Nanosecond;
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 |