Rockwell-automation FactoryTalk View Site Edition Users Guide Bedienungsanleitung Seite 553

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 696
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 552
20 CREATING EXPRESSIONS
20–7
• • • • •
20 • Placeholder
Relational operators
Relational operators compare two numeric or string values, to provide a true or false
result. If the statement is true, the expression returns a value of 1. If the statement is false,
the expression returns a value of 0.
The following table describes the relational operators, with examples. (For the numeric
examples, tag1 = 5 and tag2 = 7. For the string examples, serial_no = ST009.)
How string operands are evaluated
String operands are evaluated by case and by alphabetical order. Lower case letters are
greater than upper case letters. For example, h is greater than H. Letters later in the
alphabet are greater than those earlier in the alphabet. For example, B is greater than A.
Logical operators
Logical operators determine the validity of one or more statements. There are three logical
operators: AND, OR, and NOT. If the expression is true, the operators return a non-zero
value. If the expression is false, the operators return 0.
The following table describes the logical operators, with examples. (In the examples,
tag1 = 5 and tag2 = 7.)
Symbol Operator Numeric examples String examples
EQ, == equal tag1==tag2
false
serial_no==“ST011”
false
NE, <> not equal tag1<>tag2
true
serial_no<>“ST011”
true
LT, < less than tag1<tag2
true
serial_no<“ST011”
true
GT, > greater than tag1>tag2
false
serial_no>“ST011”
false
LE, <= less than or equal to tag1<=tag2
true
serial_no<=“ST011”
true
GE, >= greater than or equal to tag1>=tag2
false
serial_no>=“ST011”
false
Symbols Operator Action Example
AND, && and If the statements to the right and to the left
of the operator are both true, returns a 1.
(tag1<tag2) AND (tag1==5)
Both statements are true; returns a 1.
Seitenansicht 552
1 2 ... 548 549 550 551 552 553 554 555 556 557 558 ... 695 696

Kommentare zu diesen Handbüchern

Keine Kommentare