ANY_TO_INT
The ANY_TO_INT instruction converts a value to a 16-bit Integer value.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
ANY_TO_INT

Parameter | Parameter Type | Data Type | Description | |
---|---|---|---|---|
EN | Input | BOOL | When set to true, the instruction is enabled.
| |
i1 | Input | BOOL SINT USINT BYTE UINT WORD DINT UDINT DWORD | LINT ULINT LWORD REAL LREAL TIME DATE STRING | Any non-16-bit Integer value. |
o1 | Output | INT | A 16-bit Integer value. | |
ENO | Output | BOOL | Enables output. Applies to ladder diagram programs. |
ANY_TO_INT structured text example
bres := ANY_TO_INT (true); | (* bres is 1 *) |
tres := ANY_TO_INT (t#0s46ms); | (* tres is 46 *) |
mres := ANY_TO_INT ('0198'); | (* mres is 198 *) |
Provide Feedback