ANY_TO_TIME
Converts variables to TIME variables, except for TIME and DATE variables. The SUB_DATE_DATE function enables the conversion of a DATE to TIME format.

Arguments | ||
---|---|---|
i1 | BOOL - SINT - USINT - BYTE - INT - UINT - WORD - DINT - UDINT - DWORD - LINT - ULINT - LWORD - REAL - LREAL - TIME - DATE - STRING | Any value i1 (or integer part of i1 if it is real) is the number of milliseconds STRING (number of milliseconds, for example, a value of 300032 represents 5 minutes and 32 milliseconds) |
o1 | TIME | time value represented by i1. A value of 1193h2m47s295ms indicates an invalid time. |
Example
(* FBD example with "Convert to Timer" Operators *)

(* ST Equivalence: *)
ares := ANY_TO_TIME (1256); | (* ares := t#1s256ms *) |
rres := ANY_TO_TIME (1256.3); | (* rres := t#1s256ms *) |
Provide Feedback