// Process Control · Food & Dairy

Evaporator control and CIP sequencing on ControlLogix.

A five-effect dairy evaporator concentrates product around the clock, under vacuum and on steam, through a hundred automated valves and two dozen pumps. When the run ends it cleans itself in place, with caustic, acid and sanitizer washes, rinses and sprayballs all run by the sequencer. We've worked on these systems down to the individual word, including migrating this one from PLC-5 to ControlLogix and PlantPAx. The whole sequence now sits in data you can read: one table, one row per step.

MODE STEP CHUNK PINS DEVICES
// The system01

The evaporator and the CIP skid.

CIP (clean-in-place) means washing the plant without taking pipes apart. A four-tank skid supplies the evaporator with rinse water, recovered rinse, caustic and acid. Each solution is dosed to strength, heated, pumped through every product path, and checked by conductivity before anything goes to drain.

RINSE LT314 RECOVERY LT313 CAUSTIC LT312 ACID LT311 // CIP skid: 4 tanks, level + conductivity + temperature on each circuit DP72 caustic dose DP71 acid dose DP73 sanitizer dose supply header: one valve pin per tank per step PP PP210 · VFD speed = chunk word 58 HEAT EX TCV530 plant steam temp SP = word 8 EVAPORATOR 5 effects · TVR · vacuum E1 E2 E3 E4 E5 sprayballs: their own fwd/rev sub-sequence CT522 · return conductivity is it still caustic, or just water? FV135 divert recover chemical to drain: only once conductivity says spent
// the CIP circuit: tanks → VFD supply pump → steam heat exchanger → evaporator → conductivity-verified return
field devices ~200 automated valves ~100 pumps ~25 PID loops 12+ I/O racks 4 over EtherNet/IP platform ControlLogix · PlantPAx migrated from PLC-5
// The sequencing engine02

How the sequencing engine works.

Every step of every mode has its own 64-word block of DINTs, called a chunk. Moving one pointer copies the active step's chunk into the evaluation buffer, and the decode from there is mechanical. Bits become valve and pump commands, and whole words become PID setpoints and VFD velocity references. To change the process you edit the table, not the ladder.

SeqData_ModeCIP the pinning chart, in memory step 11 · 64 words step 12 · 64 words step 13 · 64 words ⋮ one flat DINT array per mode COP · 64 DINTs ptr = step × 64 SeqData_Active the step under evaluation words 0–5 192 peg bits word 6 · step time words 7–55 setpoints & thresholds words 56–61 VFD velocity refs XIC(word.bit) VALVES & PUMPS ~100 FV · ~25 PP → PCmd_Open/Start TON preset STEP TIMER + advance conditions MOV word PID LOOPS 12+ PIDE → PSet_SP MOV word VFD DRIVES PSet_SpeedRef → pump speed // one COP instruction per scan decides everything the plant is doing right now
// mode → step → pointer → chunk → devices · the decode never changes; only the data does

A chunk per step

Each step is 64 DINTs: six bit-packed "peg words," a step-time preset, and fifty-plus engineering values. The sequencer computes a pointer (step number times block length, clamped to the array) and copies that block into SeqData_Active. The active chunk is the state of the plant.

COP(Mode[ptr], Active[0], 64)

Bits become valves

Peg words 0–5 carry 192 pins, each hard-mapped to one output: CIP skid valves, tank feeds, divert valves, dosing pumps, vacuum and discharge pumps, even PID-enable and peer-PLC handshake bits. The decode is a rack of one-bit rungs, each examining one pin and commanding one device. Nothing else writes to an output.

XIC(Active[0].21) → FV121.PCmd_Open

Words become setpoints

Whole DINTs in the same chunk are engineering values: supply temperature for the steam heat exchanger, tank fill levels with deadbands, pressure and flow setpoints for a dozen PIDE loops, and velocity setpoints written straight to the VFDs, like word 58 driving the CIP supply pump's speed reference every step.

MOV(Active[58], PP210.PSet_SpeedRef)

The chart is the program

The chunks are authored in the pinning chart: a workbook with one sheet per mode, one row per step, one column per pin and setpoint. A macro downloads the arrays to the ControlLogix over RSLinx. Process engineers tune the sequence without anyone editing ladder.

Excel → download → ControlLogix
// the engine, in the actual instructions, recovered from the running program CPT(Seq_Ptr, Step_Num * Blk_Len) // pin the active step (clamped to the array) COP(SeqData_ModeCIP[Seq_Ptr], SeqData_Active[0], 64) COP(SeqDesc_ModeCIP[Step_Num], SeqDesc_Active, 1) // live step text for the HMI banner XIC(SeqData_Active[0].4) OTE(EVP_FV164.PCmd_Open) // a bit is a valve… XIC(SeqData_Active[2].11) OTE(EVP_PP243.PCmd_Start) // …or a pump MOV(SeqData_Active[58], EVP_PP210.PSet_SpeedRef) // a word is a VFD velocity setpoint… MOV(SeqData_Active[35], EVP_PC418_PIDE.PSet_SP) // …or a PID setpoint LEQ(EVP_CT521_AIn.Val, SeqData_Active[44]) // …or the proof required to advance: XIC(SeqData_Active_Tmr.DN) MOV(43, Step_Num) // timer done AND conductivity at target → next step
// Modes & steps03

The nine operating modes.

The operator picks a product and presses start. After that, pulling vacuum, establishing water recirculation, bringing on steam, production and the wash that follows are all the same engine stepping through different tables.

// SysMode: one active mode, each with its own step table 01 PRODUCT skim / permeate 02 VACUUM 3 vac pumps 03 WATER recirc · seal 04 HEAT steam · ramp 05 PRODUCTION days at a time 06 END push out 07 CIP skim · permeate 08 SD secure 09 EMERGENCY SD overrides from anywhere: its own two-step table, everything to a safe state
// modes 01–08 walk forward on proof; mode 09 preempts all of them
// Inside mode 07 · the wash04

The wash sequence, step by step.

This is the skim CIP recipe as it runs on the plant. Timed steps just run their clock. Gated steps also wait for proof, such as a conductivity target, a tank level or a confirmed flow, before the engine pins the next chunk.

02–03Check chemical makeup, fill rinse & recovery tankscaustic and acid tanks dosed to conductivity targets before anything movesgate: makeup OK
05Pre-rinse with reclaimed waterrecovered rinse from the last wash does the dirty first pass; fresh water stays in the tank90 s + level
08–14Caustic pre-wash, recirculate, rinse to drainload step holds for conditions · 720 s recirculation through every product path · sprayball sub-sequence720 s + sprays
22–30Caustic main wash → recovery flush360 s wash, then chemical recovered back to its tank until return conductivity drops to the reclaim targetgate: CT ≤ target
33–38Acid wash → recovery flushacid recirculation with sprays, recovered the same way, held until return conductivity reaches the reclaim target360 s + gate
40–42Rinse to drain with sprays, water recirculationramped setpoints re-establish the water loop while sprays finish the vessel interiortimed
44–46Dose, recirculate, and rinse sanitizer600 s sanitizer recirculation with sprays, then rinsed to drain600 s
48End CIPsystem message, totals to the historian, then back to mode selectiondone
// mode 07B runs the same engine with the acid-first permeate recipe: a different table, the same ladder

Steps advance on proof

Every step carries its own advance criteria in the chunk: a timer preset in word 6, plus thresholds like "return conductivity at or below the reclaim target" in words 43–44. Debounce timers keep a splash of rinse water from faking a clean signal. A step that can't prove its conditions doesn't advance.

Sub-sequences overlay the main one

Sprayball forward/reverse and chemical dosing run as small step engines with their own chunk arrays. Their active chunks are OR-ed bitwise with the main chunk before the device rungs, so a dosing overlay can hold a feed valve open while the main sequence keeps walking, and the HMI shows both banners at once.

Pause without losing your place

A paused system freezes step timers and advancement while every device holds its pinned state. Because the state is the chunk, pausing is simple and resuming is exact. Branch steps jump the step number directly, so recovery paths and re-washes reuse the same table rows.

// The pinning chart05

The pinning chart.

The chart is one workbook with a sheet per mode, a row per step and a column per pin. Read across a row and you see exactly what the plant does in that step. Read down a column and you can follow one valve through the whole wash. For a sequence of 50-plus steps, that's the whole engineering interface.

StepDescriptionPeg W0Peg W1Peg W2Time sSupply °FLvl SP %VFD Hz
05Pre-Rinse Started · Reclaimed Water901605045.0
09Caustic Load Step · Pre-Wash3160–30.0
12Recirculating Caustic (Pre-Wash)720––52.5
15Rinse to Drain Reclaim Water4801605045.0
26Caustic Wash360––52.5
30Spray Subsequence on Caustic0––48.0
46Recirculate Sanitizer with Spray………600––42.0
// tap any peg word value to decode its 32 output bits: e.g. step 12's word 1 = 270401 = bits 0·6·13·18 → FV188 second-effect steam · FV246 discharge divert · FV259 condensate divert · FV135 CIP return divert · every value decodes to named hardware

Three things make this chart more than documentation. It downloads itself. A macro writes the arrays straight into the ControlLogix, so the sheet and the PLC can't drift apart unnoticed. It keeps its history. Every row carries the reference pin from the original PLC-5 program, so the migration could be checked bit for bit against a sequence that had run for years. It's where changes are made. Commissioning tweaks, new products and changed chemistry are each a revision-numbered row edit in the chart, and the ladder stays untouched.

// I/O, drives & the operator06

I/O, drives, and operator screens.

The sequencer is only as good as the hardware under it and the screens the operator sees. Both were rebuilt on standard parts: distributed I/O over EtherNet/IP, and a PlantPAx object with its faceplate for every device.

Distributed I/O

A local ControlLogix chassis plus three remote racks (1756 I/O at the evaporator and CIP skid, FLEX I/O at the far end), all over EtherNet/IP, with per-module comms watchdogs feeding the diagnostics program. Roughly two dozen I/O modules serve ~200 field devices: dozens of analog channels and hundreds of discrete points.

1756 · 1794 FLEX · EtherNet/IP

Drives & peer PLCs

VFDs take their velocity setpoints from the chunk; an SMC soft starter sits on the same network as a generic Ethernet module. Peg word 5 even carries handshake pins for neighboring controllers, so the plant's receiving, utility and production PLCs get their handshake signals from the same step data as everything else.

VFD · SMC · 3 peer PLCs · MSG

A PlantPAx object per device

Every valve, motor, drive, and loop is a PlantPAx Add-On Instruction (sixty-odd solenoid valve objects, a bank of four-state divert clusters, a mix-proof valve, two dozen motors, a dozen PIDE loops), each with its standard faceplate, simulation mode, and alarm shelf. An operator who has learned one faceplate can run them all.

P_ValveSO · P_VSD · P_PIDE · P_D4SD
interlock groups 100+ P_Intlk permissive groups 100+ P_Perm solenoid valves 60+ P_ValveSO 4-state diverts 15+ P_D4SD PIDE loops 12+ controller tags 700+ simulation built-in, per device
// Contact07

Tell us about your process sequence.

Evaporators, batching, CIP or a legacy PLC migration: describe what runs your process today and we'll show you how we'd make it easier to read, verify and change.

Start a conversation