Define whether a Logic Program Executes when the Quality of an Input Changes

You can configure a Logic program so that it is executed whenever one of its inputs is processed and/or the quality of any of its inputs changes. This is useful if you need to use your Logic program to provide certain behavior in the event of a quality change.

Example:

A Logic program is configured to execute On Input Processed and has Execute on Quality Change enabled. It is coded so that it reads the values of 4 points on an outstation.

When the point values change, the Logic program calculates the total value of the points and writes the result to another point (a derived point). The Logic program also includes code that sets the program to exclude any points that have Bad quality from its calculation. If any of the points are excluded due to Bad quality, the Logic program is set to write ‘Bad’ to the Current Quality property of the derived point.

When the value of any of the 4 input points changes, the Logic program executes, calculates the total value and writes the result to the derived point. The Logic program also executes if the quality of any of the input points changes.

There is a power failure and the outstation goes offline. Geo SCADA Expert detects the fault and changes the quality of the 4 points to Bad as they may be inaccurate or out of date. But the current values of the points remain the same as before the power failure.

As Execute on Quality Change is enabled and 1 or more of the 4 input points have changed quality, the Logic program executes. The 4 input points now have Bad quality and so they are excluded from the Logic program’s calculation. This means that the result of the calculation is 0 and this is the value that is written to the derived point. As one or more of the inputs also have Bad quality, the Logic program sets the Current Quality value of the derived point to Bad. This means that the Current Value and Current Quality of the derived point indicates that there may be a problem with the Logic program or its inputs.

If the Execute on Quality Change feature was disabled, the Logic program would only execute whenever Geo SCADA Expert processed a value from one of the inputs (triggered by the Geo SCADA Expert server receiving a value for that input). So when the outstation failed, the Logic program would not execute as Geo SCADA Expert would not have processed any further input point values (the Geo SCADA Expert server would not have received further values for the points on the failed outstation, so would not perform further processing of those points). Consequently, the value of the derived point would remain the same - there would be no indication that the values used to calculate the derived point value are now unreliable.

To choose whether a Logic program executes when the quality states of its inputs have changed, you need to use the Execute on Quality Change check box on the Logic tab of Logic Program Form:

Further Information

Display the Logic Program Form: see Configure an ST Program, Ladder Diagram, SFC or FBD.


Disclaimer

Geo SCADA Expert 2022