ClearSCADA

There are several things to be aware of when writing logical expressions.

AND operations take precedence over OR operations in expressions.

The following expression:

".P1" OR ".P2" AND ".P3"

will behave as follows

".P1" OR (".P2" AND ".P3")

If it is your intention that ".P1" OR ".P2" is then ANDed with ".P3" you will need the following.

(".P1" OR ".P2") AND ".P3"
NOT ".P1" will do a logical operation as expected.

For a digital point

NOT ".P1"
  • returns TRUE if ".P1" is 0
  • returns FALSE if ".P1" is 1 (or more)

For analogue and counter points

NOT ".P1"
  • returns TRUE if ".P1" is 0
  • returns FALSE if ".P1" is non-zero

The expression

(".P1"=2) AND (".P2"=5)

requires the brackets.