A cleaning machine (ultrasonic, spray, hydrocarbon — the family) is the textbook combination of "step flow + temperature/level process control + valve-pump interlocks". Using a common multi-tank cleaning line as the example, this article gives the program structure, step design, interlock red lines and commissioning list — a template that sibling machines adopt directly.
| Zone | Content |
|---|---|
| Initialisation | Clear intermediates, load defaults, verify retained data |
| Input handling | Level-switch debounce, temperature reading filtered, buttons collected |
| Mode management | Manual / auto / single-tank-trial switching and mutual exclusion |
| Process control | Per-tank temperature PID, level make-up, heater/ultrasonic management |
| Step flow | Step flags advanced by SET/RST (see the step table) |
| Output summary | All valves/pumps/heaters/ultrasonics driven once + interlocks |
| Alarms | Over-temperature, level faults, timeouts, pump overload |
The cleaning machine's speciality is "process control and step flow running in parallel": the temperature PID runs resident regardless of where the flow stands, while the steps only decide "when this tank starts washing". The two layers are written separately and joined by "tank allowed / tank ready" flags.
| Step | Action | Transition |
|---|---|---|
| 0 Standby | All stopped, ready shown | Start + in position + no alarms |
| 1 Load | Feed / manual basket load, clamp | Clamped, delay confirmed |
| 2 Ultrasonic wash | Lift into tank 1, ultrasonic on, timed | Time up (e.g. 300 s) |
| 3 Rinse | Move to tank 2, rinse pump on, timed | Time up (e.g. 120 s) |
| 4 Dry | Move to tank 3, hot air on, timed | Time up + temperature reached |
| 5 Unload | Lift out, unclamp, return | In position → back to 0 |
Stepping essentials: ① one flag per step, SET into a step, RST on transition, SET the next; ② step durations live in the parameter area (D area), never hard-coded K values — different products, different processes; ③ "move to tank" is the flow's interface to the axis/pneumatic mechanism: issue the move request → wait for the done signal → then advance. Never replace position confirmation with a pure delay.
| Interlock | Rule | Accident prevented |
|---|---|---|
| Heater and level | Level below minimum forbids heater and ultrasonic | Dry firing, tank rupture |
| Lift and lid | Lift motion and open lid mutually excluded | Mechanism hits the lid |
| Ultrasonic and level | No liquid, no ultrasonic | Transducer burnout |
| Move and clamp | No tank transfer unclamped | Basket dropped into the tank |
| Dry over-temperature | Over-temp stops heat first, fan cools on delay | Warping / fire |
All these interlocks live in the "output summary zone", pressing on the outputs at the last gate — however wrong the flow logic goes, the interlocks hold the line. The E-stop stays on the hard loop as usual (see the safety-circuit articles).
① Temperature: PID or hysteresis control (±2 °C band control suits a wash tank and is stable); big heaters get a "soft start" (low duty-cycle pre-heat to avoid the inrush); ② levels: switch-type level sensors suffice, debounced 2~5 s against surface waves; make-up valve works with the overflow; ③ timing: process times from the parameter area with a "minimum protection value" (a parameter mis-set to 0 executes at the protection value); ④ alarms: time-stamped, latest shown, and a step-timeout alarm (1.5× the set duration) announcing "the flow is stuck" beats silent waiting.
| Test | Method | Pass criterion |
|---|---|---|
| All manual actions | Exercise each valve/pump/mechanism manually | Matches drawing, no leaks |
| Dry-fire protection | Simulate low level | Heater/ultrasonic forbidden instantly + alarm |
| Unloaded full flow | Run automatic without baskets | Every step completes, rhythm normal |
| Timeout alarm | Cut one done signal deliberately | Timeout reports and the flow stops safely |
| E-stop | Press during running | Pumps/valves/ultrasonic all stop; reset resumes from a safe step |
| Parameter boundaries | Time 0, temperature beyond limits | Protection values apply / out-of-limits refused |
| Symptom | Cause | Fix |
|---|---|---|
| Temperature overshoots repeatedly | Band too tight / heater inertia | Widen the band or retune the PID |
| Level switch false-trips | No debounce, surface waves | Add 2~5 s debounce |
| Flow stuck at one step | Done signal missing / condition omitted | Monitor the step number, audit that step's conditions |
| Ultrasonic stutters | Level hovering on the interlock edge | Debounce + interlock hysteresis |
| Machine lurches after restart | Step number retained | Step number non-retained; restart to standby |
The cleaning-machine skeleton can be memorised: the step flow manages "what happens when", the process control manages "are the physical quantities stable", and the output summary's interlocks manage "however wrong it goes, nothing bad happens". Three layers, duties separated, parameters all in the parameter area, commissioning by the list — the structure holds from one tank to a whole line; only the step table grows.
Structure and interlocks follow GB 5226.1 / IEC 60204-1 (control circuits, stop, E-stop and interlocked guarding); temperature and level interlocks also satisfy the machine's process-safety documents (dry-fire protection mandatory); the step structure follows the IEC 61131-3 sequential function chart (SFC) concept.
Three mandatory acceptance tests: dry-fire protection, E-stop full stop, unloaded full flow. All three pass before loading baskets — the cleaning machine's three lifelines live in those three tests.