AND_THEN

Definition

This operator is not specified by the IEC 61131-3 standard. It is only allowed for programming in structured text (ST).

The AND_THEN performs an AND-operation of operands of type BOOL and BIT with short-circuiting mode. This has the following effect:

If all operands are TRUE, then the result of the operation is TRUE, otherwise it is FALSE.

When one operand is FALSE, then the expressions at the other operands are not evaluated (lazy evaluation). In this regard, the AND_THEN operator differs from the AND operator as defined in the standard IEC-61131-3. AND always evaluates all expressions.

In contrast to this, when using the standard IEC-operator AND, always all operands are evaluated.