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

Parameter | Parameter Type | Data Type | Description | |
---|---|---|---|---|
EN | Input | BOOL | When set to true, the instruction is enabled.
| |
i1 | Input | SINT USINT BYTE INT UINT WORD DINT UDINT DWORD | LINT ULINT LWORD REAL LREAL TIME DATE STRING | Any non-Boolean value. |
o1 | Output | BOOL | Boolean value. |
ANY_TO_BOOL structured text example
ares := ANY_TO_BOOL (10); | (* ares is TRUE *) |
tres := ANY_TO_BOOL (t#0s); | (* tres is FALSE *) |
mres := ANY_TO_BOOL ('FALSE'); | (* mres is FALSE *) |
Provide Feedback