DECOMPOSETIME

DECOMPOSETIME

PROGRAM DECOMPOSETIME_DEMO
 VAR
     DT1: DT;
        O1,MS:INT;
      H,M,S:SINT;
 END_VAR
 O1 := DECOMPOSETIME(T := DT1, HOURS => H, MINUTES => M, SECONDS => S, MILLISECONDS => MS);
END_PROGRAM

Converts a DATETIME variable to individual time components as integer values.

InputTypeDescription
T DT Input value
Output TypeDescription
INT Output value, 1 means that the conversion has been executed successfully
HOURS INT number of hours
MINUTES SINTnumber of minutes
SECONDS SINTnumber of seconds
MILLISECONDSINT number of miliseconds

  • © Energocentrum Plus, s.r.o. 2017 - 2024