Knowledge Base
cancel
Showing results for 
Search instead for 
Did you mean: 

How does the Execution Precedence affect the program operation?

Issue

Can the Execution Precedence determine the priority of a program binding to a value?

Environment

SBO Function Block and Script programs

Cause

Clarification on the function of Execution Precedence is required.

Resolution

In both Function Block and Script programs there is an attribute called Execution Precedence, this can be set in the program "Properties", Basic tab.

For a Function Block program: 

 

For a Script Program:

Execution Precedence determines the order that the programs will be run, the lowest numbers will be run first.

In the 2 screenshots above the Function block program (Value 1) will be run before the Script program (Value 20).

This can be used for applications where a calculation is done to generate a value, that is then used in a second program e.g. Calculation of a compensated setpoint, that is then used in a PID control program as the reference value. The PID program must have a higher Execution Precedence than the setpoint calculation.

Execution Precedence does not affect priority. If the outputs of 2 programs are bound to a single value, both programs will be trying to control the value and give an indeterminate result.

 

To combine the outputs of 2 programs the programmer must use the appropriate logic to determine how the 2 signals should be combined for the application.

So for Binary values use one of the logical operators: AND, OR, XOR etc, For Analog values combine the 2 results with Max, Min, Average etc as required.

Tags (6)
Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎2018-09-06 11:59 AM
Updated by: