TIME_TO_OTSTRUCT
The "TIME_TO_OTSTRUCT" function allows a PLC variable in TIME format to be converted to a structure with milliseconds, seconds, minutes, hours, days and weeks.
FUNCTION TIME_TO_OTSTRUCT : OTSTRUCT
VAR_INPUT
TIN :TIME;
END_VAR
TIN: The value to be converted.
Requirements
Development environment | Target system type | PLC libraries to include |
---|---|---|
TwinCAT v2.7.0 | PC or CX (x86) | Standard.Lib; PLCSystem.Lib; TcPLCAds.Lib; PLCHelper.Lib; TcPlcUtilities.Lib |
TwinCAT v2.8.0 and above | PC or CX (x86) | TcUtilities.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib are included automatically ) |
TwinCAT v2.10.0 Build >= 1301 | CX (ARM) |