State Handling Parameters

Sepasoft MES Module Suite

State Handling Parameters in Batch Procedure

Parameter Name
Phases with this parameter:
State_Transition_Handling

Auto/PLI

Auto: When State_Transition_Handling is set to Auto, the Batch Engine drives the Command and the Command drives the State

PLI: State_Transition_Handling is set to PLI, the Batch Engine drives the Command, and the equipment PLC drives the State .

See Batch Command-State Sequence.

Equipment
Synchronize
Transfer In
Transfer Out

Messages_Require_Ack

Displays in a view with the Message List component.

These phases have a Message parameter that when set with a message (typically set by the PLC), appear in the Message List and Batch Controller components.


If the Message parameter is changed before the user acknowledges the message, then the new message appears.


When the user acknowledges the message, the Message_Ack_Confirm parameter is set to true. Also, the Message_Ack_Date_Time and Message_Ack_By parameters are set.


The Message_Ack_Confirm parameter can be set as an OPC tag type so that the PLC can know when the user acknowledged the message.


In MES 3.81.12 SP2, MES 4.83.1 SP2, and later, Equipment, Synchronize, Transfer In, and Transfer Out phases omit 

  • Message_Ack_By, Message_Ack_Confirm, and 
  • Message_Ack_Date_Time 

from the EBR at the start of the step when Message_Requires_Ack is false.

Equipment
Synchronize
Transfer In
Transfer Out


Disable_CompleteDefault is false. Set to True to loop through a phase.

Equipment
Synchronize


Shared_Unit_PathThe units must have the Shared Unit property set to True in the Equipment Manager: equipment displayed in tree.Allocate
Deallocate
Sync_GroupUse synchronization groups to pass values among phases.

Synchronize
Transfer In
Transfer Out


Syn_Mode

Auto/Manual

In Auto, Synchronization Manager starts the Sync_Flag_Complete process.

In Manual, another input starts the Sync_Flag_Complete.


Process:

A Sync_Mode = Auto sets the Sync_Flag_Complete = True.

When all the phases within a Sync_Group have  Syn_Flag_Complete = True, then the Synchronization Manager sets the Sync_Confirm_Complete = True.

When the Phase sees Sync_Confirm_Complete = True, it sets Complete = True.


A Transition uses the Complete parameter to continue the execution of a recipe.

Synchronize

State_Number

Tag Type property is configurable. Value changes are not saved.

Warning

MES 3.81.9 RC 5 and later

For phases that are Exposed and do not have a State_Transition_Handling parameter, the state cannot be set by the user or application.

For these phases the State_Number and therefore the State is set by Batch Engine.

Error in Logs:

Phase cannot set the State_Number manually.

Error in Tag Browser:

Error writing to State_Number.value: Bad

See Equipment PLC Commands and States and Batch Command-State Sequence for more information.

State_Number_Ack

Integer.

In MES 3.81.12 SP2, MES 4.83.1 SP2, and later, the batch engine writes State_Number_Ack after it receives, verifies, and processes a State_Number change. The value written is that same State_Number. Created for Equipment, Transfer In, Transfer Out, and Synchronize phases when Exposed is True.


Used when State_Transition_Handling is PLI. When State_Transition_Handling is Auto, State_Number_Ack does not echo State_Number.


The PLC writes the next State_Number only when State_Number_Ack equals the State_Number it last wrote. If the two values differ, the PLC holds the current State_Number. If State_Number is invalid, State_Number_Ack does not change.


StepPLC writes State_NumberBatch engine writes State_Number_AckPLC action
1
5 (Resetting)
3 (unchanged)
Not equal. Wait.
2
5
5
Equal. The PLC can write the next state.
3
1 (Idle)
5 (unchanged)
Not equal. Wait.
4
1
1
Equal. State processed.


Recipes created before this parameter existed keep running. The Gateway log records a warning, at most once every 10 minutes for each Batch ID, and State_Number_Ack is not updated. Sync and save the master recipe to add the parameter. Recipes created after the upgrade include it.


  • Equipment Phases
  • Transfer In Phases
  • Transfer Out Phases
  • Synchronize Phases
Step_Path

String

Added in 3.81.13 SP5 and 4.83.3 SP5. While the phase is active, this is the path to that step, for example /{}/UP1/OP1:Phase1. It is set when the step starts and is not written again if the step is resumed. Values are not saved. Edit the phase and push the parameter to recipes that should receive it. A recipe that has not been updated still runs; that step has no Step_Path. On an exposed phase, the value is available on the phase UDT under the Unit.

phase UDT

Unit

Unique Parameters for each Phase Type

Expand to learn about phases

What is a Phase

A phase is the lowest level of work effort in a process.  In Sepasoft Batch Procedure, phases are used in recipes as reusable blocks of functionality for any type of manufacturing process. 

There are two main categories of phases: Equipment Phases that map to physical equipment and Non-Equipment Phases that offer functionality.

Phases can be created, configured, exported, and removed in Phase Manager.  In Batch Recipe Editor, phases are added to define a process with data flows and automation.

How to Organize Phases

This organization of steps

Is

produce_solution, assemble_engineProbably too large
initialize, open_valve, set_timer, close_valve, reset, inspect gasket

Probably too small

Safety

Warning

Controls must be programmed in the equipment for safety.

Any type of network outage could cause dangerous situations if controls are set
in the application.

Add_h20, Add_Material_A, Heat, Transfer, Assembly Station A Instructions

Probably about right

These steps are considered the smallest work effort in a recipe.

Interfacing Batch Procedure Phases with PLCs

An Equipment Phase is the link between a Unit in the Equipment Production Model and the physical equipment. Phases between the batch system and PLC have a one-to-one mapping. Each phase provides parameters. The parameter mappings are based on standard ISA88 and Sepasoft extended features. You can also add parameters to phases.

PDF Download

Default parameters:

  • ISA88 Standard Parameters

  • Sepasoft Extended Parameters
User-Defined Parameters

Mapping Batch Phase Parameters with PLC Equipment Phase Parameters

Batch Procedure Equipment Phase Structure

        • Default Parameters.
        • User-Defined Parameters can be configured on all phase types.

Exposed set to True provides another set of parameters and creates UDT members for binding to PLCs. Provides ISA88 standards with Sepasoft extended parameters used for mapping in PLI (Phase Logic Interface).

Base Phases

Base Phases are provided in the batch system for two uses: 

  • User Phase: To customize a phase based on a set of functionality, such as a phase designed to allocate a piece of equipment or a phase to capture a signature for authorization. In Phase Manager, you choose a phase as a base. Doing this provides the necessary ISA88 parameters and other parameters based on configuration.

  • Built-In Phase: these commonly used phases are provided in the relevant configuration, such as Unit Class Manager and Batch Recipe Editor without customization. 

Use Batch Phase Manager to create, edit and delete phases.

Success Renaming a phase in a Recipe or Template in the Recipe Editor also updates any references to that phase automatically.  When attempting to delete a phase that is referenced, a dialog displays listing all the references that still exist for that phase.
Warning

You cannot delete a phase that is used in recipes or batches.

Base Phases

Provided in Recipe Editor as Built-In Phase

Summary

Allocate

Yes

Use this phase to allocate a shared resource. Typically, the shared resource is shared equipment, but it can be used as general locking. The Deallocate Phase should be used to release the shared resource and make it available to other allocation requests.

A shared equipment unit is a Unit defined in the Production Equipment Model with the Shared property set to True. If set to True, then only shared equipment functionality applies.

DeallocateYesUse this phase to release the shared resource and make it available to other allocation requests.

Document

Yes

Document Phases provides displaying documents to the end user when the phase is activated. This supports work instructions that include check boxes, entry fields, content driven by tag values, and content driven by a Phase.

Videos can be played by using the HTML5 video element. Unlike images, videos are not embedded directly in the document. This is for two reasons including the size of video files and for best results a video streaming server should be used.

EquipmentNo, only used to create custom user-defined phases

A phase that can connect to equipment controls within the PLC and allow parameter values to flow bidirectionally.


This phase type can also use memory and reference tag types.

E Signature


Yes

Use this phase to add authorization challenges to a batch recipe.

Version Specific

Warning

E-Signature is supported in 3.81.6 RC 1 and later.

No ActionYes

No-Action Phases are used to do nothing until the following transition evaluates to true.

Evaluates conditions and releases allocations.

OperationYes

The Operation within a Batch ISA88 framework is to provide a standard way of defining and controlling operations within Unit Procedures in batch processes. An Operation element is valid within a Unit Procedure. The phases associated to the Unit Procedure, via a Unit Class, is provided in the palette to be used in the Operation.

See Batch Procedure Framework.

ScriptYes

Supports custom Ignition scripts to be run on the Ignition server. Note that client-side scripts are set up in a tag change event.

When the script is run, all input parameters of the Batch, Procedure, Unit Procedure, Operation and Script Phase are passed to the script function as a Python dictionary.

When the script has successfully completed, all values returned by the script, as a Python dictionary, are assigned to the output parameters.

Set ParameterYesThe Set Parameter Phase is used to set any parameter value within a recipe.
SynchronizeYes

Use to synchronize conditions for units when transferring material. Sync_Group with Transfer phases.

Use with the transfer phases.

TimerYes

Consists of a timer that can be used by the recipe. The duration can be specified in Days, Hours, Minutes, Seconds or any combination of them. A mode controls the action it must take in the event that the phase goes into the Held state and then is restarted.

All timer phases will retain their current state in the event of a power outage.

Transfer InNo, only used to create custom user-defined phases

Used to transfer materials from a unit with a Transfer Out phase. The Sync_Group parameter is the key for grouping units for material transfer.

Set Value Source to Synchronization Manager on the receiving phase within a Sync Group of Synchronize Phases

Use the transfer phases together.

Transfer OutNo, only used to create custom user-defined phases

Used to transfer materials to a unit with a Transfer Out phase. The Sync_Group parameter is the key for grouping units for material transfer.

User MessageYesConfigures a message to display in the Message List.
Value PromptYesProvides the batch operator a prompt to enter a value for a batch run.

Exposed

Default Parameters when a Phase has Exposed set to True. When set to Exposed these parameters can be seen in the Ignition Tag Browser.

Expand to learn about parameters when Exposed = True

Phase Parameters Exposed to Ignition Tag Ignition

Batch Phase Parameters map to OPC devices or Ignition Tags as defined in standard PLI (Phase Logic Interface).

When Phases are added to Units in the batch system, Batch Engine creates Batch Phases under the Unit in Ignition Tag Browser. Each Phase has parameters that are used to transfer data values back and forth between the Unit and the equipment module. The values going from the Unit to the equipment PLC-control component are called Output Parameters. The values coming in from the PLC-control component are called Input Parameters.

Success A Phase must be within a Unit Class assigned to a Unit for the Batch Engine to create Phase tags within the Ignition Tag Browser.

The batch system has a set of pre-defined parameters such as COMMAND and STATUS, but also allows user-defined parameters that you can configure for values such as Add Amount and Amount Added.

Note

Update in 3.81.11 SP11 and later

MES-7291

  • Documentation: A text field allowing users to provide descriptive information about the parameter's purpose, usage, or any special considerations. This field is written to Ignition tags as the "Documentation" property.

  • Engineering Units: A text field to specify the engineering units (e.g., "psi", "°C", "kg/h") for the parameter value, which will be displayed in the user interface and used for clarity in parameter configuration. This field is written to Ignition tags as the "EngUnit" property.

Phase Manager > Phase Edit > set Exposed to True.

Parameter Name Data Type
Begin_Date_Time Date Tag Type property is configurable. Set to Memory by default to create a tag in the Ignition tag browser and saves to the cache and history.
Command String

Tag Type property is configurable. Value Source is driven by Batch Engine or Manually. See Equipment PLC Commands and States and Batch Command-State Sequence for more information.

Command_Number Integer

Tag Type property is configurable. Value source is from execution. Values are not saved.

The batch engine writes Command_Number. The PLC reads Command_Number. The system changes the value of the Command parameter based on the value of Command_Number.

See Equipment PLC Commands and States and Batch Command-State Sequence for more information.

Complete Boolean

Tag Type property is configurable. Saved to cache and history.

Used in the handshake between phases, see Sync Flags.

Disable_Complete Boolean

True/False | When set to True the equipment does not stop when the step is complete and additional adjustments to parameter values can occur for subsequent instances of the same equipment phase.

When the Disable Complete parameter is set to False, the step waits for the State phase parameter to be set to Complete before the step completes.

Related Topic: Using a Phase in Multiple Steps.

Duration Long

Tag Type property is configurable. Saves the last value to history. Time in seconds the phase was active (End_Date_Time minus Begin_Date_Time). By default, Duration updates while the phase is running. Added in

3.81.13 SP5 and 4.83.3 SP5: Duration can be written only when the phase completes. See Duration updates on State Handling Parameters.

End_Date_Time Date Tag Type property is configurable. Saved to the cache and history.
Execute_Count Long

Increments each time the phase is run. Commonly used to iterate through a process.

Tag Type property is configurable. Saved to the cache and history.

Handshake_Ack Integer Tag Type property is configurable. Value source is from execution. Values are not saved. The PLC writes Handshake_Ack. Set Handshake_Ack to the current Handshake_Value.
Handshake_Valid Boolean Tag Type property is configurable. Saved to History. The batch engine sets Handshake_Valid to true when Handshake_Ack has a value and the absolute difference between Handshake_Value and Handshake_Ack is less than 5.
Handshake_Value Integer

Tag Type property is configurable. Values are not saved.

PLC detects whether the batch engine is responding using this parameter. If not, then batch engine sets the Command the phase is set to Held.

The batch engine writes Handshake_Value about once a second while it is waiting on the phase. The PLC reads Handshake_Value.

Message String

Tag Type property is configurable. Saved to the cache and history.

  • For equipment phases, when a message is written to the Message parameter, that message is recorded in the vertical tables.
  • For other phases, exceptions can be captured and exposed in this parameter.
  • The Set Parameter phase can be used to write to another phase's Message parameter.
  • For the script phase, the parameter can be set via the return parameters.

When the Message parameter on the Equipment Phase is set to a value, it is recorded and no other functions are done. It can be set in the PLC, from script function, or using the Set Parameter phase.


The PLC writes Message while the step is active. When Message_Requires_Ack is true, the PLC waits until Message_Ack_Confirm is true before writing a new Message or clearing Message. Write an empty string to clear Message.

Message_Ack_By String Who acknowledged the message by Ignition user roles.
Message_Ack_Confirm Boolean

Confirmation flag that the message was acknowledged. The batch engine sets Message_Ack_Confirm to true when the message is acknowledged. A new Message value sets Message_Ack_Confirm to false.

Message_Ack_Date_Time Date Time stamp of when the message was acknowledged.
Message_Date_Time Date

Date stamp of message display

Message_Requires_Ack Boolean

True/False to require the acknowledgement of a message. 

The PLC writes an empty string to clear Message. When Message_Requires_Ack is true, the PLC waits until Message_Ack_Confirm is true before writing a new Message or clearing Message.

Mode String

Tag Type property is configurable. Saved to the cache and history.


Auto:
The elements in a Batch Recipe named Transitions end automatically when the condition is True, which allows the next phase to start.


Semi Auto:
Enforces that the recipe move through each Transition; You cannot force execute phases out of order.


Manual:
You can force execute these phases: e-Signature, Equipment Phase, Script, Set Parameter, User Message, Value Prompt. For more information, see Execution in Manual Mode and Force Complete.

Phase_Exception
Tag Type property is configurable. Saved to History.
Propagate_Hold_To_Parent Boolean

When a Phase state changes to HELD, the HELD state is propagated to the Unit Procedure and Operation. If this parameter is set to True, then the HELD state is passed up to the parent level.

Keep in mind that when you restart the unit procedure and operation, the batch is not restarted. Restart the batch from Batch Controller or Batch Monitor.

State String

Tag Type property is configurable. Saved to the cache and history.

Batch Command-State Sequence for more information.

State_Number Integer

Tag Type property is configurable. Value changes are not saved. The PLC writes State_Number. The batch engine reads State_Number. The system changes the value of the State parameter based on the value of State_Number.

Available In:

Warning

MES 3.81.9 RC 5 and later

For phases that are Exposed and do not have a State_Transition_Handling parameter, the state cannot be set by the user or application.

For these phases the State_Number and therefore the State is set by Batch Engine.

Error in Logs:

Phase cannot set the State_Number manually.

Error in Tag Browser:

Error writing to State_Number.value: Bad

See Equipment PLC Commands and States and Batch Command-State Sequence for more information.

State_Number_Ack
Integer

In MES 3.81.12 SP2, MES 4.83.1 SP2, and later, the batch engine writes State_Number_Ack after it receives, verifies, and processes a State_Number change. The value written is that same State_Number. Created for Equipment, Transfer In, Transfer Out, and Synchronize phases when Exposed is True. Used when State_Transition_Handling is PLI. When State_Transition_Handling is Auto, State_Number_Ack does not echo State_Number.

The PLC writes the next State_Number only when State_Number_Ack equals the State_Number it last wrote. If the two values differ, the PLC holds the current State_Number. If State_Number is invalid, State_Number_Ack does not change.

StepPLC writes State_NumberBatch engine writes State_Number_AckPLC action
1
5 (Resetting)
3 (unchanged)
Not equal. Wait.
2
5
5
Equal. The PLC can write the next state.
3
1 (Idle)
5 (unchanged)
Not equal. Wait.
4
1
1
Equal. State processed.

Recipes created before this parameter existed keep running. The Gateway log records a warning, at most once every 10 minutes for each Batch ID, and State_Number_Ack is not updated. Sync and save the master recipe to add the parameter. Recipes created after the upgrade include it.

This tag is generated for these phase types:

  • Equipment Phases
  • Transfer In Phases
  • Transfer Out Phases
  • Synchronize Phases
State_Transition_Handling Enum

Auto/PLI

Auto: The batch engine drives the states.

PLI: When set to PLI, the PLC drives the state. When a batch completes, Batch Engine sends a RESET command and waits for the input value from the PLC. Then, the batch is back to IDLE.

See State Handling Parameters for more information.

Step_Name String Tag Type property is configurable. Value changes are not saved.
Step_Path
String

Added in 3.81.13 SP5 and 4.83.3 SP5. While the phase is active, this is the path to that step, for example /{}/UP1/OP1:Phase1.

It is set when the step starts and is not written again if the step is resumed. Values are not saved. Edit the phase and push the parameter to recipes that should receive it.

A recipe that has not been updated still runs; that step has no Step_Path. On an exposed phase, the value is available on the phase UDT under the Unit.

Step_Sequence Integer Tag Type property is configurable. Value changes are not saved.
Unit_Path String Every phase has this parameter. The value is the unit path including its name where the phase is currently running within the Equipment Model.

Sepasoft MES Module Suite