Geo SCADA Knowledge Base
Access vast amounts of technical know-how and pro tips from our community of Geo SCADA experts.
Link copied. Please paste this link to share this article on your social media post.
Originally published on Geo SCADA Knowledge Base by Anonymous user | June 10, 2021 04:10 AM
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.
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).
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.
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.
Go: Home Back
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.