MOULDLKnowledge BaseElectrical Knowledge Base3D Model DownloadsMembership
中文版Model Store »
Knowledge Base › Electrical Knowledge Base › How is a PLC control program for a cleaning machine typically structured?
HomeModels
Table of contents

On this page

PLC & Programming (100 articles)

Quick Reference

  • PLC & Programming
  • Electrical & Electronic Basics (monthly)(每月更新中)
  • Electrical Control & Drawings (monthly)(每月更新中)
  • Drives & Actuators (monthly)(每月更新中)
  • Sensors & Detection (monthly)(每月更新中)
  • Industrial Communication & Networks (monthly)(每月更新中)
  • HMI & Host Systems (monthly)(每月更新中)
  • Industrial Robots & Motion Control (monthly)(每月更新中)
  • Mechatronic System Integration (monthly)(每月更新中)
  • Fault Diagnosis & Standards (monthly)(每月更新中)

How is a PLC control program for a cleaning machine typically structured?

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.

1. Program structure: zones + modes + stepping

ZoneContent
InitialisationClear intermediates, load defaults, verify retained data
Input handlingLevel-switch debounce, temperature reading filtered, buttons collected
Mode managementManual / auto / single-tank-trial switching and mutual exclusion
Process controlPer-tank temperature PID, level make-up, heater/ultrasonic management
Step flowStep flags advanced by SET/RST (see the step table)
Output summaryAll valves/pumps/heaters/ultrasonics driven once + interlocks
AlarmsOver-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.

2. The automatic step design (three-tank example)

StepActionTransition
0 StandbyAll stopped, ready shownStart + in position + no alarms
1 LoadFeed / manual basket load, clampClamped, delay confirmed
2 Ultrasonic washLift into tank 1, ultrasonic on, timedTime up (e.g. 300 s)
3 RinseMove to tank 2, rinse pump on, timedTime up (e.g. 120 s)
4 DryMove to tank 3, hot air on, timedTime up + temperature reached
5 UnloadLift out, unclamp, returnIn 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.

3. Interlocks and safety: the cleaning machine's red lines

InterlockRuleAccident prevented
Heater and levelLevel below minimum forbids heater and ultrasonicDry firing, tank rupture
Lift and lidLift motion and open lid mutually excludedMechanism hits the lid
Ultrasonic and levelNo liquid, no ultrasonicTransducer burnout
Move and clampNo tank transfer unclampedBasket dropped into the tank
Dry over-temperatureOver-temp stops heat first, fan cools on delayWarping / 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).

4. Process-control details

① 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.

5. The commissioning list

TestMethodPass criterion
All manual actionsExercise each valve/pump/mechanism manuallyMatches drawing, no leaks
Dry-fire protectionSimulate low levelHeater/ultrasonic forbidden instantly + alarm
Unloaded full flowRun automatic without basketsEvery step completes, rhythm normal
Timeout alarmCut one done signal deliberatelyTimeout reports and the flow stops safely
E-stopPress during runningPumps/valves/ultrasonic all stop; reset resumes from a safe step
Parameter boundariesTime 0, temperature beyond limitsProtection values apply / out-of-limits refused

6. Common problems

SymptomCauseFix
Temperature overshoots repeatedlyBand too tight / heater inertiaWiden the band or retune the PID
Level switch false-tripsNo debounce, surface wavesAdd 2~5 s debounce
Flow stuck at one stepDone signal missing / condition omittedMonitor the step number, audit that step's conditions
Ultrasonic stuttersLevel hovering on the interlock edgeDebounce + interlock hysteresis
Machine lurches after restartStep number retainedStep number non-retained; restart to standby

7. Notes

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.

8. References

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.

9. Cautions

⚠️ Three traps to avoid:
① Level interlocks written only into the flow, not the output summary — a flow bug disables dry-fire protection;
② Tank transfer on delay instead of position confirmation — the rhythm changes and tanks collide;
③ Process times hard-coded — every new product means a program download.

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.

Related reading

Related 3D models: Ready to build it? Download free 3D models & CAD drawings at MOULDL »
MOULDL · Electrical Knowledge Base · free self-study reference for electrical & automation engineers, 3D CAD models at MOULDL