You want a breakpoint to step through the logic, but it will not set — the icon is grey, it sets but never hits, or setting it drops the connection. The causes are not mysterious; they fall in five classes: platform/model does not support it, wrong online mode, unbreakable code position, task-type limits, and version/licence issues. Work the classes and it resolves in minutes.
| Class | Typical sign | Judge / handle |
|---|---|---|
| Model unsupported | A compact PLC (FX etc.) has no breakpoint menu at all | Check the manual; switch to monitoring + flag tracing |
| Wrong mode | Offline breakpoints are meaningless; monitor mode (not debug mode) refuses | Enter the platform's debug / online-edit mode |
| Position unbreakable | Certain network types, comment lines, optimised-away empty rungs refuse | Move to a valid instruction line |
| Task limits | Interrupts / high-speed tasks refuse or stop chaotically | Use variable-recording there instead |
| Version / licence | The whole debug menu is grey | Upgrade the software / confirm the licence |
First establish whether the model has breakpoints at all: most Mitsubishi FX series lack program breakpoints (monitoring and pulse-chasing instead), Q/iQ-R have them; Siemens S7-1500 has them (with matching firmware and licence), S7-300 partially; CODESYS/TwinCAT generally do. Never force what does not exist.
| Precondition | Detail |
|---|---|
| Online connection healthy | Communication test passes; in online/debug mode |
| Project matches the PLC program | Some platforms disable breakpoints on mismatch (a comparison is required first) |
| PLC in a debuggable state | Some platforms need a run-time-debug licence, others STOP |
| Debug support enabled | "Debug support" ticked in project/target settings (TwinCAT: build includes debug info) |
| Licence covers it | Full/professional editions carry complete debugging; entry editions may not |
Walk the list — "project mismatch" and "debug support off" are the two most frequent hits.
Breakpoints in interrupt programs, motion tasks and high-speed cyclic tasks have a structural problem: halting freezes the whole task's timing, which can trip the watchdog, time out the bus and alarm the servos — so many platforms forbid or restrict breakpoints there. Alternatives: ① variable recording: at the suspect point write key variables into a circular array (a black box), read back after the run; ② Trace/oscilloscope curves to locate; ③ temporarily move the suspect logic into the main task to verify, then move it back.
| Technique | Method | Fits |
|---|---|---|
| Status-flag tracing | Each flow step sets a numbered flag; watch the flags to see "how far it got" | Flow hunts on breakpoint-less models |
| Black-box array | Key variables written into a ring buffer each cycle, read back after faults | Sporadic faults, interrupt contexts |
| Trace / oscilloscope | Curves for timing and value changes | Process-type problems |
| Binary elimination | Short-circuit half the suspect code with a flag/jump, watch the behaviour change | Narrowing the range |
| Simulator stepping | Simulators usually support full breakpoints | Logic questions answered before the machine |
The "simulator stepping" route has the best value-for-effort: the breakpoint problem usually does not exist in simulation (full debugging there), so logic doubts are settled before the machine — no breakpoints needed on site.
| Symptom | Cause | Fix |
|---|---|---|
| Breakpoint icon grey | Not in debug mode / licence insufficient | Enter debug mode / upgrade the licence |
| Set but never hits | That code path never executes / task not running | Confirm the flow truly reaches it |
| Bus alarms the moment it stops | Breakpoint froze the task; comms timed out | Variable recording instead; no live breakpoints on buses |
| "Program mismatch" refused | Offline project differs from the PLC | Read out / compare first, then debug |
| Breakpoints forgotten | Leftovers download with the program | Breakpoint deletion joins the closing checklist |
A refused breakpoint is usually not a fault but an unmet environment: model lacks it, mode wrong, task restricted. What to really cultivate is the substitutes — flag tracing, black boxes, Trace — which are often faster even where breakpoints exist (no repeated stop-start). A breakpoint is one tool, not the whole of debugging skill.
Breakpoint support follows each platform's manual (Mitsubishi GX Works debug-function model table, Siemens S7-1500 debug operations, CODESYS/TwinCAT debugging chapters); task-environment limits and watchdog behaviour follow the task-configuration documentation; debugging safety follows GB 5226.1 / IEC 60204-1 — live debugging must never disable a safety function.
Add to the closing checklist: confirm zero breakpoints remain (search and delete all).