2 boolean operators, 5 comparison operators, Programming – Lenze PM94P01C User Manual
Page 39
![background image](/manuals/566062/39/background.png)
PM94P01C
37
Programming
2.4.2 Boolean Operators
Table 10 lists the boolean operators supported by the Indexer program. Boolean operators are used in logical
expressions.
Table 10: Supported Boolean Operators
Operator
Symbol
AND
&&
OR
||
NOT
!
Examples:
IF APOS >2 && APOS <6 || APOS >10 && APOS <20
{statements if true}
ENDIF
The above example checks if APOS (actual position) is within one of two windows; 2 to 6 units or 10 to 20 units.
In other words:
If (APOS is more than 2 AND less than 6)
OR
If (APOS is more than 10 AND less then 20)
THEN the logical expression is evaluated to TRUE. Otherwise it is FALSE
2.5
Comparison Operators
Table 11 lists the comparison operators supported by the Indexer program.
Table 11: Supported Comparison Operators
Operator
Symbol
More
>
Less
<
Equal or more
>=
Equal or less
=<
Not Equal
<>
Equal
==
Examples:
IF APOS <=10
; If Actual Position equal or less than 10
IF APOS > 20
; If Actual Position greater than 20
IF V0 ==5
; If V0 equal to 5
IF V1<2 && V2 <>4 ; If V1 less than 2 and V2 doesn’t equal 4