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
ANY_TO_BOOL
ANY_TO_BOOL parameters
Parameter
Parameter Type
Data Type
Description
EN
Input
BOOL
When set to true, the instruction is enabled.
  • TRUE: Execute the current computation.
  • FALSE: There is no computation.
Applies to ladder diagram programs.
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

(* ST Equivalence: *)
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
Have questions or feedback about this documentation? Please submit your feedback here.
Normal