Relational operators describe the relationship between two values. The relationship is expressed as one value being larger than, the same as, or smaller than another. You can use relational operators for both numeric and string variables, however you can only test variables of the same type. A numeric variable cannot be compared with a string variable.
Operator |
Description |
= |
Is equal to |
<> |
Is not equal to |
< |
Is less than |
> |
Is greater than |
<= |
Is less than or equal to |
>= |
Is greater than or equal to |
For example:
Command |
IF Message = "Alarm Active" THEN ... |
Expression |
PV12 <> PV10; |
Command |
IF (Total + Count) / Avg < 10 THEN ... |
Expression |
Counter > 1; |
Command |
IF PV12 <= PV10 THEN ... |
Expression |
Total >= Shift * Hours; |
See Also