Ladder readability is not aesthetics, it is maintenance cost: can the person taking over in six months (usually you) find the spot to change in ten minutes? Everything depends on the discipline written in on day one. The three pillars are zoned layout, naming and comments, and single-purpose networks. The sections below cover overall layout, network style, comment standards and anti-patterns.
| Zone | Content | Conventional position |
|---|---|---|
| Initialisation | Power-up pulse clears, defaults loading, validity checks | First |
| Input handling | Debounce of raw signals, mode-switch reading | After initialisation |
| Mode management | Manual/auto/step switching and mutual exclusion | After inputs |
| Process actions | By step or by mechanism, one section each | The body, possibly several sections |
| Output summary | All Y outputs driven once, interlocks unified | After process |
| Alarms | Collection, logging, horn management | After outputs |
| Comms / data | Host links, data transfer | Last |
One rule above all: every output coil is driven exactly once, in the output-summary zone. Process logic lands on intermediate relays; the summary stage does "intermediates + interlocks → Y". That single rule kills double coils and confines interlock edits to one place.
① Each network's title states what it does ("conveyor start/stop: auto mode under photocell interlock"), not "conveyor program"; ② no more than three or four contact layers deep — deeper logic splits into intermediate relays, because logical depth is comprehension cost; ③ holding, timing and counting stay in separate rungs, never four timers jammed into one cell; ④ no magic numbers: K300 becomes D300 referenced from a parameter zone, so field tuning never touches code.
| Object | Standard example | Purpose |
|---|---|---|
| Intermediate relays | M100~M199 machine state, M200~M299 permissions, M300+ alarms, fixed zones | Number reveals class |
| Data registers | D100~ setpoints, D300~ runtime data, D500~ comms area | Parameters/data/comms never mix |
| Network titles | Verb + object + condition: "Cylinder-1 extend conditions (auto + home done)" | Content known without opening the rung |
| Device comments | Every used X/Y/M/D carries a Chinese comment | Cross-references stay readable |
| Version note | Header network with version, date, change summary | No guessing versions in the field |
Manual/auto separation: the mode bits decide which subroutine is called (or which section is executed); the manual section answers only to buttons, the automatic section only walks its flow, and the two never cross. The automatic flow uses a step structure (SET/RST step flags or SFC), one rung per step with the title naming the step ("Step 3: press-fit dwell 2 s") and the transition condition at the rung's end — the step number becomes the program's line number, and a field report of "stuck at step 5" points straight at the code.
| Anti-pattern | Consequence | Fix |
|---|---|---|
| Double-coil outputs | Latter overwrites former, timing chaos | Intermediates summarised, single drive point |
| A 50-line network | Nobody dares edit it; one change moves everything | Split networks, one purpose each |
| NC contact + inverted coil stacking | Double negatives exhaust the reader | Uniform positive expression |
| Anonymous M/D everywhere | Everything via cross-reference archaeology | 100% comment rate |
| Setpoints scattered | Tuning means crawling the whole program | Central parameter zone |
| Jumps everywhere | Execution path unpredictable | Calls and mode bits instead of jumps |
① Can a stranger state the machine's flow within 10 minutes? (zoning and titles) ② Can any output's drive point be found within 5 minutes? (single-drive summary zone) ③ Can a process change be made by touching only the parameter zone? (centralised parameters) Three yeses and the program has moved from "runs" to "written properly".
Readability is about lowering parallelism: the human brain reads serial logic easily and interleaved networks painfully. Zoning separates concerns, the summary zone separates logic from drive, the parameter zone separates values from logic — each separation buys time for the maintainer in six months.
Program structure and comment practice follow IEC 61131-3 engineering convention (program organisation and identifiers); interlock and stop implementation must satisfy GB 5226.1 / IEC 60204-1; device zoning quantities follow the PLC model's resource table.
Turn the zoning table of this article into the company's program template; new projects start from the template — readability comes from structure and discipline, never from good intentions.