Sepasoft MES Module Suite
Syntax for Referencing Parameters
You can reference any parameter in a Batch Recipe with the paths below. The same paths are used in calculation expressions, transition expressions, and the Parameter_Path of a Set Parameter or Value Prompt phase.
A calculation expression is one line of Python and calls param with the path in quotes:
JSON |
param("/Procedure/UnitProcedure/Operation:Step.Parameter") |
|
In MES 3.81.12 SP5, MES 4.83.1 SP5, and later, shorter paths are accepted. A leading / is optional when the path already contains / or :. {} stands for the current Procedure, Unit Procedure, Operation, or step. After the recipe is saved, the editor shows the path again in the shortest friendly form. |
Path pieces
Piece | Meaning |
|---|---|
/ | Separates the Procedure, Unit Procedure, and Operation. Optional at the start of the path. /{}/P2.Param and {}/P2.Param are the same path. |
{} | The current item at that position. /{}.Param is a parameter on this Procedure. /{}/{}.Param is a parameter on this Unit Procedure. /{}/{}/{}.Param is a parameter on this Operation. |
: | A step on the logic to the left of the colon. /{}/P2:UP2.Complete is the Complete parameter on step UP2 inside Unit Procedure step P2. |
. | A parameter, and an optional sub-parameter. /{}/{}.UP_Param is parameter UP_Param on this Unit Procedure. /{}.Param.SubParam is sub-parameter SubParam of Param. |
The full path, from the recipe root, is:
JSON |
/Procedure/UnitProcedure/Operation:Step.Parameter.SubParameter |
Levels that do not apply to the parameter are left out. A parameter on the Procedure has no Unit Procedure or Operation segment. A parameter on a Unit Procedure has no Operation segment.
Same level: {}
Use {} when the parameter is on the same Procedure, Unit Procedure, Operation, or step as the expression you are editing.
Path | Where it is used | What it references |
|---|---|---|
{}.Param | A parameter on a Procedure, Unit Procedure, Operation, or step | Parameter Param on that same logic item or step. A leading / is not added. |
param("{}.SomeParam") | Calculation on a Unit Procedure or Operation, or on a step of that logic | Parameter SomeParam on that Unit Procedure or Operation, or on that step. |
/{}/{}/{}.Param | A step inside an Operation | Parameter Param on that Operation. Each {} is the current Procedure, Unit Procedure, and Operation. |
{} can replace any segment, not only the first one. From a step inside an Operation, param("/{}/{}/{}.SomeParam") references a parameter on that Operation. From a step inside a Unit Procedure, param("/{}/{}.SomeParam") references a parameter on that Unit Procedure.
Shorter paths
These forms are equivalent. The editor stores the reference and shows the short friendly path.
You can enter | Shown as | Meaning |
|---|---|---|
/Procedure.Param or Procedure.Param | /{}.Param | Parameter Param on the Procedure. The Procedure name in the step position is the logic item, not a phase step. |
/Procedure:P6.Complete or Procedure:P6.Complete or /{}:P6.Complete or {}:P6.Complete | P6.Complete | Parameter Complete on step P6 of the Procedure, when the expression is on that Procedure. |
/{}:{}.Complete or {}:{}.Complete or {}.Complete | {}.Complete | Parameter Complete on the current step. |
P2.Param | P2.Param | Parameter Param on Unit Procedure step P2. The Procedure segment can be omitted. |
/Procedure/P2.Param or Procedure/P2.Param | P2.Param | Same Unit Procedure parameter, written with the Procedure name. |
P2:UP2.Complete | P2:UP2.Complete | Parameter Complete on step UP2 inside Unit Procedure step P2. |
A step on the same logic can be referenced by step name and parameter only, for example P6.Complete or O2.Complete.
Examples
Assume this recipe:
Procedure parameter BatchSize
Procedure step P2, a Unit Procedure, with parameter TargetTemp
Step UP2 inside P2, an Operation, with parameter AgitatorSpeed
Step O2 inside that Operation, with parameter Duration
Procedure step P6, a phase, with parameter Complete
Path | References |
|---|---|
/{}.BatchSize | BatchSize on this Procedure |
{}.BatchSize | BatchSize on this Procedure, from an expression on the Procedure |
P2.TargetTemp | TargetTemp on Unit Procedure step P2 |
/{}/P2.TargetTemp | Same parameter, written from the recipe root |
P2:UP2.AgitatorSpeed | AgitatorSpeed on Operation step UP2 inside P2 |
/{}/P2/UP2:O2.Duration | Duration on phase step O2 |
/{}/P2/{}.AgitatorSpeed | AgitatorSpeed on the current Operation inside Unit Procedure step P2 |
/{}/{}/{}.AgitatorSpeed | AgitatorSpeed on the current Operation inside the current Unit Procedure |
/{}/{}:UP2.Complete | Complete on step UP2 inside the current Unit Procedure |
/{}/{}/{}:O2.Duration | Duration on step O2 inside the current Operation |
{}.Duration | Duration |
Transition expressions and Parameter_Path
In a Transition expression, and in Parameter_Path on a Set Parameter or Value Prompt phase, a parameter on the current logic or step can be named by itself. No step name and no logic name are required.
JSON |
MyParam MyParam = True P2.Complete |
MyParam is the parameter MyParam on the current step or logic. P2.Complete is parameter Complete on step P2.
Calculation expressions still use param("..."). A bare name is not valid inside a calculation expression.
Unit Procedure and Operation templates
A Unit Procedure template or Operation template can refer to a parameter that exists only after the template is placed in a recipe, such as a Procedure parameter or a parameter on another Unit Procedure.
Validation of the template does not flag that reference. The reference is validated when the template is used in a recipe. This applies to:
Calculation expressions
Transition_Expression
Parameter_Path on Set Parameter and Value Prompt phases
Calculation errors
|
In MES 3.81.12 SP5, MES 4.83.1 SP5, and later:
|
Sepasoft MES Module Suite