Sepasoft MES Module Suite
Returning a List of Phases within a Unit Class
This script returns all the phases, inherited, and not inherited, that are grouped within a Unit Class.
Where 'Reactor' is the name of the Unit Class.
Python |
uc = system.mes.batch.unitclass.getLink('Reactor') phases = system.mes.batch.phase.getUnitProcedurePhaseLinks(uc) for p in phases: print(p.getMESObjectType(), p) #Returns: (Batch Phase, Heat Reactor) (Batch Phase, No Action) (Batch Phase, Pump Out) (Batch Phase, Reactor Transfer In) (Batch Phase, Recirculate) (Batch Phase, Synchronize) (Batch Phase, SyncManual2) (Batch Phase, User Message) (Batch Phase, Value Prompt) |
Returning the List of Phases and Parameters within a Unit Class
This script returns each phase and its parameters within a unit class.
Where 'Option A' is the name of the Unit Class
Returning a List of Phases and their Parameters within a Unit Class
Python |
uc = system.mes.batch.unitclass.getLink('Option A') phases = system.mes.batch.phase.getUnitProcedurePhaseLinks(uc) phases.get(0).getMESObject().getParameterList() for p in phases: print(p.getMESObjectType(), p) params = p.getMESObject().getParameterList() for param in params: print('\t%s' % param) #Returns a comma separated list of parameters for each phase within the unit class #Example of one parameter: {ParamUUID=ec8e184e-f22d-4ef6-a2b0-fac8499a6cc9, ParamFriendlyName=Date_Time, ParamImmutable=true, ParamKind=6, ParamTagType=0, ParamRecordingType=4, ParamDataType=Date, ParameterValueSource=7, ParamEnumDefRef=Enum Definition, null, ParamEnumDefRefUUID=null, ParamValue=, ParamUnits=, ParamMinimumValue=, ParamMaximumValue=, ParamEnableExpression=, ParamCalculation=} |
Sepasoft MES Module Suite