TIME_TO_OTSTRUCT

TIME_TO_OTSTRUCT 1:

The function "TIME_TO_OTSTRUCT" can be used to convert a TIME constant or variable into a structure with the resolved milliseconds, seconds, minutes, hours, days and weeks.

FUNCTION TIME_TO_OTSTRUCT : OTSTRUCT

OTSTRUCT

VAR_INPUT
    TIN             :TIME;
END_VAR

TIN: the TIME variable to be converted.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v2.7.0 and above

BCxxxx (165)

Standard.Lb6, PlcSystemBC.Lb6, TcPlcUtilitiesBC.Lb6