Geo SCADA Expert

General Execution

On Input Processed execution is usually described as a method of executing a logic program if the inputs change. This isn't quite accurate, it is when an object that a property belongs to is processed. This means that only certain types of actions on the system will trigger the execution.

The following items when updating value/state will trigger an on-input processed execution.

  • Point receiving a new value.
  • The quality of a point changes (from ClearSCADA 2009 R1 onwards)

For example, if a structured text program refers to a point's value when the point value updates the logic will trigger, e.g. a simple point reflect:

 PROGRAM PointReflect

 VAR
  OldPoint AT %I(.OldPoint.CurrentValue) : LREAL;
  NewPoint AT %M(.NewPoint.CurrentValue) : LREAL;
 END_VAR

  NewPoint := OldPoint;

 END_PROGRAM

If however you wanted to reflect the number of alarms in a group to an analogue you could not use On Input Processed. As the group doesn't "process", it will not trigger an on-input processed execution, e.g.:

 PROGRAM AlarmReflect

 VAR
  AlarmCount AT %I(..SomeGroup.AlarmSetCount) : LREAL; (* Number of unaccepted alarms on a group *)
  NewPoint AT %M(.NewPoint.CurrentValue) : LREAL;
 END_VAR

  NewPoint := AlarmCount;

 END_PROGRAM

The above code will have to be on interval (but you can use the input change detection to minimise impact, see Logic Execution).

Multiple Inputs from the Same Object

Taking this further, if you have multiple inputs from the same object (i.e. CurrentTime, CurrentValue and CurrentQuality) if any of these properties update then it will only execute the logic once as it's the source object that triggers the processed trigger and not the individual properties.

When is an Input not an Input?

If the input object is also an output and the output causes a processing then the input is ignored for on-input processing requirements. If not, you'd risk getting infinite loops. E.g.:

 PROGRAM PointReflect

 VAR
  Point AT %M(.Point.CurrentValue) : LREAL;
 END_VAR

  Point := Point + 1;

 END_PROGRAM

The above code will, if configured to run on-input processed, never execute. You need to execute on interval.