any_to_bool
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
IN |
ANY |
|
|
|
Input value. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Q |
BOOL |
|
|
Value converted to Boolean. |
Remarks
- For DINT, REAL, and TIME input data types, the result is FALSE if the input is 0 (zero).
- The result is TRUE in all other cases.
- For STRING inputs, the output is TRUE if the input
string is not empty.
- The output is FALSE if the string is empty.
FBD Language
FFLD Language
- In the FFLD language, the conversion is executed
only if the input rung (EN) is TRUE.
- The output rung is the result of the conversion.
- The output rung is FALSE if the EN is FALSE.
IL Language
- In the IL "Instruction list" This is a low-level language and resembles assembly Language, the any_to_bool function converts the current result.
Op1: FFLD IN
ANY_TO_BOOL
ST Q
ST Language
Q := ANY_TO_BOOL (IN);
See Also