Skip to content

Phase Template: discharge

Discharge vessel contents via the outlet valve. Use this phase as the last step of a reactor recipe (or any vessel recipe that needs to transfer product out through a modulating outlet). It stops the agitator, opens the outlet valve to a configurable drain percentage, and holds for the specified duration.

Where to find it

System endpointEquipment LibraryPhases → select discharge.

graph TD
    Start([initial]) --> S1[start_drain]
    S1 -->|"start_drain.T >= duration"| S2[stop_drain]
    S2 --> Done([done])

See Phases for the diagram conventions.

What you see when it runs

Clicking the active phase on HMI endpointBatch Execution opens a detail panel with:

Element Meaning
Active step start_drain while the outlet valve is open; stop_drain during the final close
Parameters drainPercent, duration resolved from the recipe formula
Bound modules The concrete outlet_valve and agitator instances for this unit
Elapsed Step-elapsed timer compared against duration

HMI screenshot pending

An annotated capture of a running discharge phase will be added here.

Parameters

Parameter Type Unit Range Default Required
drainPercent REAL % 100 no
duration TIME 10s-10m yes

TIME parameters take duration strings ("45s", "1m30s", "5m"), not bare numbers.

Required control modules

Role Module type Description
outlet_valve analog-control Outlet valve for discharging
agitator analog-control Agitator (stopped during discharge)

Capability: reaction.

How it works

This is a linear timed phase. Each scan the SFC engine:

  1. Activates start_drain. The action ST stops the agitator (agitator.CMD = 0) and opens the outlet valve (outlet_valve.CMD = drainPercent).
  2. Holds on start_drain until start_drain.T >= duration.
  3. Advances to stop_drain, which closes the outlet valve (outlet_valve.CMD = 0).

This is a timed phase. The timer cannot detect a stuck valve or a drain line blockage. Pair with a deviation alarm on the outlet valve and a timeoutSeconds backstop on the phase call. See Phases § Timed phase.

Used in recipes

Try it

  1. HMI endpointBatch Execution+ New
  2. Choose sim-reactor-heat-m1 and create the batch
  3. Click Start and let the procedural tree run until the discharge step activates (after react)
  4. Click into the phase to see start_drain active and the step-elapsed timer counting up
  5. Open the outlet_valve faceplate on the reactor-1 unit view to watch CMD and POS during the drain and the return to zero