Chapter 12 Data conversion instructions
290 Rockwell Automation Publication 2080-RM001D-EN-E - February 2015
ANY_TO_TIME converts a non-Time or non-Date value to a Time value.
Arguments
Parameter Parameter Type Data Type Description
EN Input BOOL Function enable.
When Enable = TRUE, execute the conversion to the Time computation.
When Enable = FALSE, there is no computation.
Applies only to LD programs.
i1 Input BOOL - SINT - USINT - BYTE - INT -
UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - STRING
Any positive value other than a Time or Date data type.
IN (or integer part of IN 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 Output TIME Time value represented by IN. A value of 1193h2m47s295ms indicates an
invalid time.
ENO Output BOOL Enable out.
Applies only to LD programs.
ANY_TO_TIME operator ST language example
(* ST Equivalence: *)
ares := ANY_TO_TIME (1256);
rres := ANY_TO_TIME (1256.3);