OTSTRUCT_TO_TIME

OTSTRUCT_TO_TIME 1:

The "OTSTRUCT_TO_TIME" function allows the structure with milliseconds, seconds, minutes, hours, days and weeks to be converted to the TIME format usual in a PLC.

FUNCTION OTSTRUCT_TO_TIME : TIME

VAR_INPUT
    OTIN        : OTSTRUCT;
END_VAR

OTIN: 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)