Sepasoft MES Module Suite
system.mes.batch.queue.getBatchEBR(batchID, includeIdleSteps, includeSystemParameters, timeoutSeconds)
Retrieves details in a python dictionary of a batch that is in the queue or has completed and is no longer in the queue. Min and max parameter settings are only included if they differ from default values.
Use the system utility jsonEncode to convert the python dictionary to a JSON format. See Electronic Batch Record for steps.
getBatchEBR(batchID, includeIdleSteps, includeSystemParameters, timeoutSeconds) → Python dictionary
Syntax
getBatchEBR(batchID, includeIdleSteps, includeSystemParameters, timeoutSeconds)
Parameters
string batchID - The target batch ID to retrieve. This is the Batch ID entered in the Batch header information in the Batch List component.
boolean includeIdleSteps - If True, include information for the steps that have not started execution.
boolean includeSystemParameters - Optional. Whether built-in system parameters should be included in the parameters list. Defaults to True if not specified.
Integer timeoutSeconds - Optional
- Optional amount of time in seconds to wait for a batch to enter Running state before returning the EBR. Defaults to 5 seconds if a value is not provided.
- Default:
None
Returns
A Python dictionary containing the details of the target batch.
Scope
All
Return EBR in JSON
|
Scripting function queue.getBatchEBR() is available in versions:
|
This script returns EBR based on batchID. Min and max parameter settings are only included if they differ from default values.
Python |
ebr = system.mes.batch.queue.getBatchEBR('0001') json_ebr = system.util.jsonEncode(ebr,4) print(json_ebr) ##Can then write the EBR to a file using Ignition file scripting functions such as: ##system.file.writeFile() |
Output
JSON |
|
Sepasoft MES Module Suite