Operators

Below we provide a description of the operators that can be used in the formulas.

Logical operations:

Table: Logical operations of the programmable controller

< Returns the value 1 if the value to the left of the operator is smaller than the value to the right of the operator. Otherwise, the returned value is 0.
<=Returns the value 1 if the value to the left of the operator is smaller than or equal to the value to the right of the operator. Otherwise, the returned value is 0.
> Returns the value 1 if the value to the left of the operator is larger than the value to the right of the operator. Otherwise, the returned value is 0.
>=Returns the value 1 if the value to the left of the operator is larger than or equal to the value to the right of the operator. Otherwise, the returned value is 0.
=Returns the value 1 if the value to the left of the operator is equal to the value to the right of the operator. Otherwise, the returned value is 0.
<> Returns the value 1 if the value to the left of the operator is not equal to the value to the right of the operator. Otherwise, the returned value is 0.
ANDReturns the value 1 if the value to the left and right of the operator is 1. Otherwise, the returned value is 0.
ORReturns the value 1 if the value to the left or right of the operator is 1. Otherwise, the returned value is 0.
NOTReturns the value 1 if the value to the right of the operator is 0. Otherwise, the returned value is 0.

Mathematical operations:

+Returns a value which is the sum of the values to the left and right of the operator.
–Returns a value which is the difference between the values to the left and right of the operator.
/Returns a value which is the quotient of the values to the left and right of the operator.
*Returns a value which is the product of the values to the left and right of the operator.
%Returns a value which is the integer quotient of the values to the left and right of the operator.
^Returns a value which is the power of the values to the left and right of the operator.

Expressions can be grouped and evaluated before others using brackets “( … )“. The formulas are evaluated in the following order:

  1. ^
  2. * , /, %
  3. +, –
  4. <, , >, <=, >=, <>
  5. =
  6. NOT
  7. AND
  8. OR