To_bool conversions, L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual

Page 1068

Advertising
background image

L-force | PLC Designer

Programming Reference

1066

DMS 4.1 EN 03/2011 TD29

Examples in FBD:

(* Result is 1 *)

(* Result is 'TRUE' *)

(* Result is T#1ms *)

(* Result is TOD#00:00:00.001 *)

(* Result is D#1970-01-01 *)

(* Result is DT#1970-01-01-00:00:01 *)

TO_BOOL Conversions
IEC Operator: Converting from another variable type to BOOL
Syntax for a TO_BOOL conversion operator:
<data type>_TO_BOOL
The result is TRUE when the operand is not equal to 0. The result is FALSE when the
operand is equal to 0.
The result is TRUE for STRING type variables when the operand is "TRUE", otherwise the
result is FALSE.
Examples in IL:

(* Result is TRUE *)

(* Result is FALSE *)

(* Result is TRUE *)

(* Result is TRUE *)

Advertising