Rockwell Automation GMLC Reference Manual User Manual
Page 508
Publication GMLC-5.2 - November 1999
Expression Operators
471
The first expression evaluates to 1 (true) if the sum of the cut length
variable and 10 equals the actual position of Axis 0. Otherwise it is 0
(false). However, the second expression evaluates to 11, if the actual
position of Axis 0 equals the cut length (Actual Position of Axis 0 = Cut
Length is true (1); then 1 + 10 = 11) and 10 if not (Actual Position of Axis
0 = Cut Length is false (0); then 0 + 10 = 10).
You can use parentheses to change the default left-to-right precedence of
operations, as explained earlier in this section. Continuing the example
above, the following two expressions do produce the same result—the
parentheses force the addition to be performed before the comparison.
Cut_Length + 10 = Actual_Position_AXIS0
Actual_Position_AXIS0 = (Cut_Length + 10)
Both expressions evaluate as 1 (true) if the sum of the cut length variable
and 10 is equal to the actual position of Axis 0 and 0 (false) otherwise.
Equal to
=
Use the equal sign to determine if an element or expression is equal to
another element or expression. If the two are equal (have the same value),
the comparison is true (1), and if not it is false (0). For example, the
following expression has a value of 1 (true) if the current value of the
input group Input_Group is 13 and 0 (false) otherwise.
Input_Group = 13
Not Equal to
!
Use an exclamation point in front of an equal sign to determine if an
element or expression is not equal to another element or expression. If the
two are not equal (do not have the same value), the comparison is true (1).
If they are equal, it is false (0). For example, the following expression has
a value of 0 (false) if the current value of the input group Input_Group is
13 and 1 (true) otherwise.
Input_Group != 13