Comparison Functions and Operators

Help Contents


Comparison functions and operators compare two or more variables returning a BOOL value (TRUE or FALSE).

Fernhill SCADA supports these comparison functions and operators:

GT>Greater than
GE>=Greater than or equal to
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.


ExampleReturn Value
1 > 2FALSE
'IoT' = 'IoT'TRUE

Standards Compliance

Table 28 - IEC 61131-3 Second Edition.

Table 33 - IEC 61131-3 Third Edition.

Further Information

Common Elements

To learn about other language Common Elements.


For the meaning of terms used in Fernhill SCADA.