Rockwell-automation GMLC Reference Manual Manual de usuario Pagina 508

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 958
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 507
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
Vista de pagina 507
1 2 ... 503 504 505 506 507 508 509 510 511 512 513 ... 957 958

Comentarios a estos manuales

Sin comentarios