Comparison functions and operators compare two or more variables returning a BOOL value (TRUE or FALSE).
Fernhill SCADA supports these comparison functions and operators:
Function | Operator | Description |
---|---|---|
GT | > | Greater than |
GE | >= | Greater than or equal to |
EQ | = | Equal |
LE | <= | Less than or equal to |
LT | < | Less than |
NE | <> | Not equal to |
In IEC 61131-3, all comparison operators can be called as a function using the function table above. For example:
GE( A, B ) is equivalent to A >= B.
All IEC 61131-3 comparison operators, except NE (Not Equal) can be cascaded to operate on 2 or more parameters. For example:
A > B > C returns TRUE if A is greater than B and B is greater than C.
Example | Return Value |
---|---|
1 > 2 | FALSE |
'Abc' = 'Abc' | TRUE |
Table 28 - IEC 61131-3 2nd Edition.
Table 33 - IEC 61131-3 3rd Edition.
To learn about other language Common Elements.
For definitions of the terms used in Fernhill SCADA.