omron — Logical (Boolean) Expressions

Logical (Boolean) Expressions Logical (Boolean) Expressions The next two sections discuss program control structures whose execution depends on an expression or variable that takes on a Boolean value (a variable that is either true or false, or an expression that resolves to true or false). An expression can take into account any number of variables or digital input signals as long as the final resolution of the expression is a Boolean value. In eV+, any number (real or integer) can satisfy this requirement. Zero is considered false; any nonzero number is considered true. There are four system constants, TRUE and ON that resolve to -1, and FALSE and OFF, that resolve to 0.

Examples of valid Boolean expressions: y > 32 NOT(y > 32) x == 56 x AND y (x AND y) OR (var1 var2) -1 For details on eV+ relational operators, see Relational Operators on page 51. eV+Language User's Guide, v2.x, 18318-000 Rev A Page 68