A double coil means the same output (Y) or flag is driven in more than one place. The consequence is "the latter overwrites the former" — only the drive latest in scan order takes effect, and the machine shows the classic "logic looks right, motion is wrong" disease. Do not hunt by eyeballing code: follow "locate → analyse → restructure" and close it in ten minutes. The steps below show how.
| Tool | Where | Use |
|---|---|---|
| Cross-reference / usage list | Programming-software menu (find → device usage) | Lists every network driving or referencing Y0 |
| Double-coil check | Compile check item (most software has one) | The compile report lists the duplicate-coil set |
| Full-program search | Search OUT Y0 / OUT M10 | The manual fallback when tools falter |
Run the compiler's double-coil check first to get the list (which device, which networks, which rows); then open each cross-reference to confirm. Distinguish "true double coils" (two OUTs on one coil) from "legal repeats" (SET/RST in several places, or mere contact references — harmless); the checker may report SET/RST usages, which are usually fine.
Having found two OUT Y0s, classify:
| Case | Tell-tale | Direction |
|---|---|---|
| Written by two different functions | Different titles, different zones | A genuine design error — must be restructured |
| Leftover commissioning code | Comment says "temp"/"test", or none | Delete the temp code, keep the formal logic |
| Old logic forgotten | Both drives nearly identical | Delete old, keep new, check the change log |
| Deliberate override | Comment documents the override intent | Confirm the intent is sound — otherwise restructure anyway |
Remember scan order: within one scan, the later OUT wins — so "why does my start logic do nothing" usually means a later OUT brushed it away.
The standard restructure: neither drive writes Y directly; each writes its own intermediate (M_OUT_A, M_OUT_B), and one line in the output summary merges: OUT Y0 = M_OUT_A OR M_OUT_B, AND interlocks. Now: ① the double coil is gone; ② both intents survive; ③ the interlock sits in one place. More than two sources generalises the same way — N intermediates ORed together.
Another restructure class: when both drives are really two phases of one thing (conveyor driven in step 3 and step 7), use a single coil with conditional expression: OUT Y0 = (step3 AND conditionA) OR (step7 AND conditionB) — one drive, all stage conditions stated.
| Rule | Detail |
|---|---|
| Output-summary-zone regime | All Ys driven once, only in the summary; process logic writes intermediates only |
| Double-coil check always on | Tick it as a mandatory compile check; treat every report |
| Tag commissioning code | Debug code in a dedicated M zone labelled "temporary"; delete at close-out |
| Prefer SET/RST | Start/stop written as SET/RST naturally avoids repeated OUTs |
| Symptom | Likely cause | Action |
|---|---|---|
| An output occasionally ignores its logic | Two OUTs competing by scan order | Cross-reference the OUT sites |
| Coil lit in monitor but machine idle | A later OUT clears it in another branch | Read the double-coil report |
| Outputs stutter at mode change | Manual and auto each driving the same Y | Restructure into the summary merge |
| Fixing one place breaks another | Two OUTs were one thing split in half | Merge to a single conditional coil |
A double coil is not a syntax error, it is a structure error: two wills driving one output, scan order deciding the winner — behaviour uncertainty follows. The three-step fix treats the symptom and the disease, but the real cure is the output-summary-zone rule: it leaves double coils nowhere to live.
The overwrite behaviour follows the PLC's programming manual (cyclic scan execution); compiler check settings follow each software manual; the output-summary and unified-interlock structure follows IEC 61131-3 engineering practice, and safety output staging follows GB 5226.1 / IEC 60204-1.
On taking over any old program, run the double-coil check first and park the list in the "technical debt" notes, paid down as maintenance proceeds.