Accessing Parameters | Recipe and Phase Level

Sepasoft MES Module Suite

Accessing Recipe Level Parameter Example

In this batch there is a Recipe, or called Procedure, level parameter that we would like to read.  The parameter is called "MatSerialNum_B".

Python
##Identify or retrieve the Batch ID, typically from a tag, on-screen component, or user selection.
batchID = 'BatchID_12345'

##Define the path to the parameter.  Note carefully the syntax.
path = "/Hot Chocolate Powder.MatSerialNum_B"

##Retrieve the Batch Queue Entry based upon the unique Batch ID.
bqe = system.mes.batch.queue.getEntry(batchID)

##Call the function to the get the parameter value.
val = system.mes.batch.queue.getParameterValueAsString(bqe, path)

Accessing Phase Level Parameter Example

In this batch there is a Unit Procedure with a phase with a parameter that we would like to read.  The parameter is called "LotId_A".

Python
##Identify or retrieve the Batch ID, typically from a tag, on-screen component, or user selection.
batchID = 'BatchID_12345'

##Define the path to the parameter.  Note carefully the syntax.

##Note that the Procedure Level (the "Hot Chocolate Powder" Recipe), then the Unit Procedure ("P2"), then the Phase ("UP2"), 

##then finally the  Parameter ("LotId_A") are listed in the path. Note the colon after the Unit Procedure level.
path = "/Hot Chocolate Powder/P2:UP2.LotId_A"

##Retrieve the Batch Queue Entry based upon the unique Batch ID.
bqe = system.mes.batch.queue.getEntry(batchID)

##Call the function to the get the parameter value.
val = system.mes.batch.queue.getParameterValueAsString(bqe, path)

Sepasoft MES Module Suite