Rockwell-automation 1771-DB Basic Module User Manual - Series A Manual de usuario Pagina 86

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 167
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 85
Operating Functions
Chapter 5
5–49
Relational expressions involve the operators =, tu, u, u=, t, and t=.
These operators are typically used to “test” a condition. In the BASIC
Module relational operations are typically used to “test” a condition. In the
BASIC Module relational operators return a result of 665535 (OFFFFH) if
the relational expression is true, and a result of 0, if the relation expression
is false. The result is returned to the argument stack. Because of this, it is
possible to display the result of a relational expression.
Examples:
PRINT 1=0 PRINT 1u0 PRINT A tu A PRINT A=A
0 65535 0 65535
You can “chain” relational expressions together using the logical operators
.AND., .OR., and .XOR.. This makes it possible to test a complex
condition with ONE statement.
Example:
u10 IF ([AuB].AND. [AuC]) .OR.[AuD] THEN
Additionally, you can use the NOT([expr]) operator.
Example:
u10 IF NOT(AuB).AND.(AuC) THEN
By “chaining” together relational expressions with logical operators, you
can test particular conditions with one statement.
Important: When using logical operators to link together relational
expressions, you must be sure operations are performed in the proper
sequence.
5.5.4
How
Relational Expressions
Work
Vista de pagina 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 166 167

Comentarios a estos manuales

Sin comentarios