Accessing Parameters | Recipe and Phase Level

Sepasoft MES Module Suite

Note

In MES 3.81.12 SP3, MES 4.83.1 SP3, and later, pass the batch ID directly to getParameterValue or getParameterValueAsString. The batch does not have to be running.

Batch queue function pages whose first argument is still documented as only a BatchQueueEntry. Add: In MES 3.81.12 SP3, MES 4.83.1 SP3, and later, pass a batch ID or a BatchQueueEntry. getEntry stays batch ID only. QA covered assignUnit, changeActiveStep, changeEntryPriority, completeDocumentStep, executeEntryCommand, executeEntryCommandAsync, executeEntryCommandBlocking, executeStep, executeStepCommand, exitCommandLoop, forceStepComplete, getActiveSteps, getBatchBOM, getBatchEBR, getBatchObjects, getParameterOptions, getPendingTransitions, getStatus, getStepDocument, getSyncGroups, getTransitionStatus, getValidNextSteps, removeEntry, setBatchBOM, setMode, setParameterValue, setResourceParameter, skipTransition, and syncPLIStepState.

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