ANY_TO_TIME
The ANY_TO_TIME instruction converts a non-Time or non-Date value to a Time value.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
ANY_TO_TIME

Parameter | Parameter Type | Data Type | Description | |
---|---|---|---|---|
EN | Input | BOOL | When set to true, the instruction is enabled.
| |
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 | Enables output. Applies to ladder diagram programs. |
ANY_TO_TIME structured text example
ares := ANY_TO_TIME (1256); | (* ares := t#1s256ms *) |
rres := ANY_TO_TIME (1256.3); | (* rres := t#1s256ms *) |
Provide Feedback