Batch Mixing PLC Control: Recipes, Sequencing, and ISA-88
How a PLC controls a batch mixing process — recipe management, the batch sequence, weighing and dosing, agitation, and the ISA-88 batch model.
How a PLC Controls a Batch Mixing Process
A batch mixing system charges ingredients into a vessel in a defined order, agitates them under controlled conditions, and transfers the finished product when a set of completion criteria is met. The PLC is the execution engine for all of that — it holds the recipe, fires the phase logic for each step, closes the weighing and temperature loops, and writes every action to an audit trail.
This guide walks through batch mixing control from the PLC's perspective: the sequence from charge to transfer, how recipe parameters flow into phase logic, how the gain-in-weight and loss-in-weight dosing strategies work, and how ISA-88 structures the whole system into procedures, unit procedures, operations, and phases. For the broader batch programming context see the batch process PLC programming guide, and for food and beverage specifics see the food processing PLC programming guide.
What Batch Mixing Control Is
Batch mixing control is the automated management of a discrete production event in which a measured set of ingredients is combined in a vessel according to a recipe, processed under defined conditions, and discharged as a finished or intermediate product. Unlike continuous blending — where streams flow and blend indefinitely — a batch has a defined start, a defined end, and a unique batch record that documents every action taken.
The PLC enforces:
- Sequence integrity — ingredients are charged in the correct order, at the correct weight or volume, before the next step can begin.
- Process conditions — agitator speed, temperature, and hold time are held within tolerance throughout the mix.
- Safety interlocks — valves cannot open unless the vessel is in a safe state; heat cannot be applied before the agitator is confirmed running.
- Traceability — every setpoint, actual value, deviation, and operator intervention is time-stamped and stored.
Batch mixing appears across food and beverage production, pharmaceutical manufacturing, cosmetics, paint and coatings, agrochemicals, and specialty chemicals. The control logic patterns are transferable across those industries because the underlying problem — controlled ingredient addition, mixing, and discharge — is structurally the same.
The Batch Sequence
A standard batch mixing cycle progresses through four major stages. The PLC executes each stage as a phase or group of phases; transition to the next stage only occurs when the completion criteria for the current stage are confirmed.
Stage 1: Charge Ingredients
The charge stage fills the mixing vessel with raw materials in the recipe-defined order. Sequence matters: adding a reactive ingredient before a diluent, or charging a solid before the liquid carrier, can cause quality or safety problems. The PLC enforces the order by enabling the next charge valve only after the previous ingredient's weight target has been confirmed within tolerance.
For each ingredient the PLC executes a dosing phase:
- Open the feed valve or start the feed pump/screw conveyor.
- Monitor the weight signal (load cell) or flow totaliser.
- Apply a two-speed or throttled approach as the setpoint nears (coarse fill → fine dribble).
- Close the feed device and record the actual quantity dosed.
- Compare actual vs. setpoint against the recipe tolerance band; flag a deviation if out of tolerance.
The vessel is typically resting on load cells for gravimetric measurement, or each ingredient passes through a weigh hopper before dropping into the vessel. Liquid ingredients may use a flow meter with a pulse totaliser instead of a load cell.
Stage 2: Agitate
Once charging is complete — or in some recipes, during charging — the agitator starts. The PLC controls agitator speed via a variable-frequency drive (VFD). The recipe specifies:
- Target speed (rpm or % of rated speed)
- Ramp rate (rpm per second, to protect mechanical seals and reduce splashing)
- Hold duration or completion criterion (e.g., a viscosity or torque threshold)
The PLC monitors VFD feedback (actual speed, current draw, fault status) throughout agitation. High current draw at low speed is an early indicator of an over-viscous batch or a mechanical problem; the PLC can alarm and pause the sequence before damage occurs.
Stage 3: Heat or Cool and Hold
Many mixing processes require a thermal treatment step after charging — heating a sauce to a pasteurisation hold temperature, warming a wax blend to a defined melt point, or cooling a product before transfer. The PLC runs a PID loop against a temperature sensor in the vessel jacket or product.
The hold phase is a timed gate: the PLC only starts the hold timer once the temperature setpoint is confirmed within a defined dead-band, and it restarts the timer if the temperature falls outside tolerance during the hold. This prevents a short thermal excursion from invalidating the batch.
For heating the PLC modulates a steam control valve or electric heater duty cycle. For cooling it modulates a chilled-water valve. The PLC PID tuning guide covers tuning strategies for jacket-heated vessels, including the dead-time compensation needed when the sensor is remote from the heating surface.
Stage 4: Transfer
Transfer begins only when all completion criteria are satisfied — agitation time elapsed, temperature hold confirmed, any analytical check (pH, Brix, viscosity) within specification. The PLC opens the discharge valve or starts the transfer pump, monitors the vessel weight or a receiving-vessel level sensor, and closes the discharge path when the vessel is empty or the target transfer weight is reached.
A clean-in-place cycle typically follows transfer. See the clean-in-place (CIP) explained guide for how the PLC sequences CIP after batch discharge.
Recipe Management
What a Recipe Contains
A recipe is a structured data set that parameterises the batch sequence. The PLC program contains the phase logic — the generic code that controls a valve, reads a load cell, or runs a PID loop. The recipe contains the values that are passed into that logic as parameters. This separation is the foundation of flexible batch control: the same program can make hundreds of different products by loading a different recipe.
A mixing recipe typically holds:
| Parameter group | Example parameters |
|---|---|
| Ingredient list | Ingredient ID, target weight, tolerance %, sequence order |
| Agitation | Speed setpoint (rpm), ramp rate, hold time |
| Temperature | Setpoint (°C), ramp rate, hold time, tolerance band |
| Transfer | Discharge valve tag, transfer pump speed, empty-vessel weight threshold |
| General | Batch size, batch ID prefix, equipment unit assignment |
Recipe Levels: Master, Site, and Control Recipes
ISA-88 distinguishes three recipe levels:
Master recipe — the general formula, independent of specific equipment. It says "add 200 kg of ingredient A" without specifying which weigh hopper or feed valve to use.
Site recipe — the master recipe adapted to a specific plant or production line, with equipment-specific tag references filled in.
Control recipe — the site recipe instantiated for a specific batch execution. It contains the actual batch ID, operator name, start time, and any in-batch adjustments. The control recipe is what gets stored as the batch record.
In practice, smaller systems often collapse master and site recipes into a single parameterised recipe table stored in the PLC data memory or a connected SCADA/MES database.
Storing and Selecting Recipes
Recipe data can live in:
- PLC data blocks (Siemens) or data files (Allen-Bradley) — fast access, limited storage, suitable for a small number of products.
- SCADA or HMI recipe database — hundreds of recipes, version-controlled, downloaded to the PLC at batch start.
- MES (Manufacturing Execution System) — full recipe lifecycle management with approval workflows, version history, and electronic signatures for regulated industries.
The PLC receives the active recipe parameters at batch initiation. It stores a snapshot of those parameters in the control recipe data structure so that any subsequent recipe edits do not affect a batch already in progress.
Weighing and Dosing
Accurate dosing is the most technically demanding part of batch mixing control. Two primary strategies are used: gain-in-weight and loss-in-weight.
Gain-in-Weight Dosing
In a gain-in-weight (GIW) system the mixing vessel itself rests on load cells. The PLC reads the total vessel weight and feeds into the vessel until the weight increase equals the target ingredient quantity.
Advantages:
- Simple instrumentation — one set of load cells serves all ingredients.
- Self-compensating for density variations.
Disadvantages:
- Cumulative weighing means errors compound if an earlier ingredient is out of tolerance.
- The vessel must be stationary on the load cells; agitator vibration can corrupt the weight reading. The PLC typically applies a short agitator-off window before reading the final weight.
Cutoff anticipation is critical in GIW control. Because material in flight (the column of liquid or solid falling from the feed device to the vessel surface) adds weight after the valve closes, the PLC must close the valve slightly before the target weight is reached. The in-flight correction value is a recipe parameter, typically tuned over the first few batches and auto-updated by an adaptive algorithm that compares actual vs. target after each fill.
Loss-in-Weight Dosing
In a loss-in-weight (LIW) system each ingredient is held in its own weigh hopper on dedicated load cells. The PLC measures how much weight the hopper loses as it feeds into the vessel.
Advantages:
- Each ingredient is measured independently — errors do not compound.
- The PLC can control the feed rate in real time by differentiating the weight signal, enabling a true closed-loop mass flow controller.
- No agitator interference with the weight reading.
Disadvantages:
- Higher capital cost — each ingredient requires a separate weigh hopper and load cell set.
- Refill management is required; the PLC must detect when a hopper needs refilling and interlock refill against an active dosing operation.
Load Cell Signal Conditioning
Load cell signals require careful handling in PLC programs:
- Tare zeroing — performed before each batch to remove the vessel tare weight.
- Filtering — a moving average or low-pass digital filter removes agitator vibration and conveyor impact noise from the weight signal. Filter time constant must be short enough to allow accurate dribble-cutoff detection.
- Span calibration check — a routine that compares the live signal against a known test weight; many sites perform this at the start of each shift and log the result.
- Motion detection — the PLC inhibits a weight reading if the load cell signal is still settling (signal derivative above threshold), preventing a premature cutoff.
Agitation and Temperature Control
Agitator VFD Control
The PLC controls the agitator motor through a VFD using either a speed reference (analogue 4–20 mA or digital fieldbus) or preset speed steps. The VFD returns actual speed, current, and fault status to the PLC.
Key interlock logic:
- The agitator must not start unless the vessel level is above the minimum impeller submersion point (low-level switch confirmation).
- The agitator must not stop during a thermal hold phase in processes where the product will stratify or crystallise if unmixed.
- A torque overload alarm (VFD current above threshold for a configurable time) triggers a pause and alarm; the operator investigates before the PLC allows restart.
For viscous products that thicken as they mix, the recipe may include a speed ramp profile — the agitator starts slow, the PLC monitors motor current, and speed increases incrementally as the batch becomes more uniform and less resistant.
Temperature PID Loop
Jacket temperature control is a classic two-input PID application. The PLC runs a cascade or single-loop PID against the product temperature sensor (PT100 or thermocouple in a thermopocket). The output drives a modulating control valve on the steam supply or chilled-water return.
Considerations specific to batch mixing:
- Batch-to-batch reset windup — integral action accumulates a large integral term during a long heating ramp. If the loop is switched to manual or the valve closes on transfer, the next batch starts with a saturated integrator. Anti-windup logic (clamping the integrator at output limits) is essential.
- Gain scheduling — heat transfer characteristics change as the vessel fills. Tuning parameters effective at 30% fill may be wrong at 90% fill. A simple gain scheduler switches PID tuning sets based on vessel level or fill stage.
- Hold-timer interlock — the hold timer starts only when
product_temp >= (setpoint - deadband). If temperature drops during the hold (cold-ingredient addition late in the batch, for example) the timer pauses and an alarm fires.
The ISA-88 (S88) Batch Model
Why ISA-88 Matters to PLC Programmers
ISA-88 (also known as S88 or IEC 61512) is the international standard for batch process control. Its value to a PLC programmer is not academic — it provides a concrete decomposition model that maps directly onto how you should structure your program, your recipe data, and your state machines.
Without a structured model, a batch mixing program becomes a monolithic sequence that is difficult to reuse, test in isolation, or adapt to new products. ISA-88 gives you a vocabulary and a hierarchy that makes programs modular and maintainable.
The Physical and Procedural Hierarchies
ISA-88 defines two parallel hierarchies:
Physical hierarchy (what the equipment is):
| Level | Example in a mixing system |
|---|---|
| Enterprise | Corporate ERP |
| Site | Production facility |
| Area | Mixing hall |
| Process cell | Mixing line 1 (tanks, transfer pumps, weigh system) |
| Unit | Mixing tank MT-101 |
| Equipment module | Agitator drive, jacket heater, ingredient dosing station |
| Control module | Individual valve, pump, sensor |
Procedural hierarchy (what the process does):
| Level | Description | Mixing example |
|---|---|---|
| Procedure | The complete batch recipe | "Make 1,000 kg Batch #2476" |
| Unit procedure | Major step in one unit | "Charge and mix in MT-101" |
| Operation | Coherent step within the unit | "Charge ingredient A", "Heat to setpoint" |
| Phase | Smallest schedulable element | "Open valve V101", "Monitor weight", "Close valve V101" |
The PLC executes phases. Each phase is a self-contained piece of code with a defined state machine (idle → running → complete / paused / aborted). Operations are sequences of phases. Unit procedures are sequences of operations.
Phase State Machine
Every ISA-88 phase implements the same state machine:
- Idle — phase is available, waiting to be called.
- Running — phase is actively executing its control logic.
- Complete — phase has finished successfully; calling logic can advance to the next phase.
- Paused — phase has been interrupted; can be resumed.
- Aborted — phase has been stopped due to a fault or operator command; a defined safe state has been entered.
In a Siemens Step 7 or TIA Portal program this is typically implemented as a function block with an internal step counter and a state enumeration. In Allen-Bradley Logix it maps naturally onto a Logix Phase object within a Sequential Function Chart (SFC).
The benefit: because every phase behaves the same way, the sequencing logic that calls phases is generic and reusable. You write it once and it works for every phase in every recipe.
Procedures, Unit Procedures, and Operations in Practice
For a mixing tank the procedural decomposition might look like this:
Procedure: Manufacture batch 2476 (Product: Coating Base, Size: 800 kg)
Unit procedure 1: Charge and mix in MT-101
- Operation 1.1: Pre-charge checks (vessel empty, valves confirmed closed)
- Operation 1.2: Charge solvent (Phase: open V101, dose to weight, close V101)
- Operation 1.3: Charge resin A (Phase: open V102, dose to weight, close V102)
- Operation 1.4: Start agitation (Phase: start agitator at recipe speed)
- Operation 1.5: Charge resin B under agitation (Phase: open V103, dose to weight, close V103)
- Operation 1.6: Heat and hold (Phase: ramp jacket to setpoint, hold timer)
- Operation 1.7: Verify completion (Phase: read viscometer or operator confirmation)
- Operation 1.8: Transfer to storage (Phase: open discharge valve, monitor vessel weight, close valve)
Each operation can be tested individually using a recipe that calls only that operation. This shortens commissioning time dramatically compared to testing the entire sequence as a block.
Material Tracking and Batch Records
What Gets Logged
A batch record is the auditable history of a single batch execution. For regulated industries (food, pharmaceutical, cosmetics) it is a compliance document. For all industries it is a diagnostic tool when a product quality problem arises.
The PLC — or its connected SCADA/MES — logs:
- Recipe parameters — the setpoints that were active at batch start (snapshot of the control recipe).
- Actuals — the actual weight dosed for each ingredient, actual temperature profile, actual hold times.
- Deviations — any instance where an actual value fell outside the tolerance band, with time stamp, duration, and magnitude.
- Operator actions — any manual intervention (recipe parameter override, manual step advance, pause/resume) with operator ID and time stamp.
- Alarm history — every alarm raised and acknowledged during the batch, with response time.
- Equipment status — which physical unit executed the batch, calibration status of load cells at batch start.
Audit Trail Requirements
In pharmaceutical manufacturing the batch record must meet 21 CFR Part 11 or EU Annex 11 requirements for electronic records: entries must be time-stamped, operator-attributable, and tamper-evident. The PLC itself rarely meets these requirements alone; a validated SCADA or MES layer is used to collect, sign, and archive the data.
For food manufacturing, the batch record supports traceability — the ability to identify which raw material lots went into which finished product batches. The PLC logs the ingredient lot numbers (entered by the operator or read from a barcode scanner at the weigh station) alongside the weight actuals.
For food processing PLC applications, batch records also feed the allergen control system: the PLC can interlock a batch start if the previous batch on the same line contained an allergen and the CIP cycle has not been confirmed complete.
Interlocks and Safety Design
Robust interlock logic prevents the most common batch mixing failures:
| Interlock | Condition | Action |
|---|---|---|
| Vessel overfill | Weight > maximum vessel capacity | Close all feed valves, alarm |
| Empty vessel agitation | Level below minimum impeller submersion | Inhibit agitator start |
| Temperature runaway | Product temp > high-high limit | Close steam valve, open cooling valve, alarm, hold sequence |
| Dosing timeout | Ingredient weight not reached within configurable time | Alarm, pause sequence |
| Agitator fault | VFD fault bit active | Pause sequence, alarm |
| Discharge valve position mismatch | Commanded open, position feedback not confirmed open | Alarm, hold transfer |
Interlocks should be implemented in hardware-layer safety logic (safety PLC or hardwired relay) for hazardous processes, not solely in the batch sequence program. The batch sequence program enforces process interlocks; the safety layer enforces personnel and equipment protection interlocks independently.
The approach is closely related to how filling lines handle safety — the filling machine guide covers the no-bottle-no-fill interlock model, which follows the same principle of independent safety confirmation before any product discharge.
FAQ
How does a PLC control batch mixing? The PLC holds a recipe data set and executes a phase-by-phase sequence. Each phase controls a specific action — opening a feed valve, reading a load cell, running a PID loop — and reports complete when its criterion is met. The sequence advances phase by phase until the batch is finished, logging actuals and alarms throughout.
What is recipe control in batch mixing? Recipe control separates the what (recipe parameters: ingredient weights, temperatures, times, speeds) from the how (phase logic: the PLC code that opens a valve or runs a loop). The same program can produce different products by loading different recipe parameter sets. This avoids duplicating code for every product and makes it easier to change a formulation without modifying the program.
What is ISA-88? ISA-88 (IEC 61512) is the international standard for batch process control. It defines a physical hierarchy (enterprise down to control module) and a procedural hierarchy (procedure → unit procedure → operation → phase) that structures how a batch program is decomposed. It gives PLC programmers a consistent model for building modular, reusable batch programs and is the basis for most modern batch control software frameworks.
What is loss-in-weight dosing? Loss-in-weight dosing places each ingredient in a dedicated weigh hopper on its own load cells. The PLC measures how much weight the hopper loses as it feeds material into the vessel. Because each ingredient is measured independently, errors do not accumulate across ingredients. The PLC can also differentiate the weight signal to calculate instantaneous feed rate and control it in a closed loop, giving tighter dosing accuracy than a simple valve-open/valve-close approach.
Key Takeaways
- The batch sequence — charge, agitate, heat/hold, transfer — maps directly onto ISA-88 phases and operations. Structure the PLC program around that hierarchy and every phase becomes testable in isolation.
- Recipe parameters flow into generic phase logic; the same code executes different products. Keep recipe data out of the program logic and store it in a version-controlled recipe database.
- Dosing accuracy depends on load cell signal quality, in-flight cutoff anticipation, and — for high-accuracy applications — loss-in-weight control with closed-loop feed rate.
- The agitator PID and jacket temperature PID both need batch-specific care: anti-windup on the temperature integrator, torque monitoring on the agitator, and interlock logic that prevents either from running in an unsafe vessel state.
- Batch records are not optional. Log recipe parameters, actuals, deviations, and operator actions for every batch. In regulated industries this is a compliance requirement; in all industries it is the primary diagnostic tool when a quality problem arises.
For deeper coverage of sequential batch programming patterns and state machine design, see the batch process PLC programming guide. For CIP sequencing after batch discharge, see the clean-in-place (CIP) explained guide.


