Module algorithm types

Phase algorithms for modules

Phase algorithms are typically used in process control when running batches. The phase algorithm consists of a state transition diagram made up of embedded composite blocks that contain the logic that governs  each state of the phase. Equipment module classes and phase classes can utilize the phase algorithm structure.

The types of phase algorithms are the standard phase algorithm (phase logic), phase with command-driven run logic, and phase with state-driven run logic.

The standard phase algorithm uses the state transition table, where each composite block is a Sequential Function Chart (SFC). All logic for this type is created in Control Studio using the SFC structure.

For the algorithm type phase with command-driven run logic, the internals of the RUN_LOGIC composite block (normally an SFC) are replaced with the command-driven algorithm.  To allow the command-driven logic to be actively monitoring for the next command request, it is necessary to keep the RUN_LOGIC block active all the time. Because of this, the phase algorithm with command-driven logic never goes to the Complete state. However, you can set XCOMMAND to Stop in order to force the phase to complete using the following command:

Action expression: '/XCOMMAND.CV' := '$phase_command:Stop'

The status of the phase can be read using the following command:

'Transition expression: '/BSTATUS.CV' = '$phase_state:Complete'

The phase algorithm with state-driven run logic substitutes the run logic composite block (normally an SFC composite block) with state-driven logic. The state-driven run logic is defined in Control Studio. The run logic for this algorithm type never goes to the Complete state.

Phase classes only utilize the standard phase algorithm type. Equipment modules can be any of the three phase algorithm types.