PLC Troubleshooting: Narrow Down Systematically Instead of Guessing
How to troubleshoot PLC programs: rule out hardware first, narrow down with watch tables and cross-references, recognise the common fault classes — and why forcing is rarely the answer.

Key Takeaways
Working structurally means you don't search for faults – you narrow them down. This guide covers the sequence that holds up under pressure, the TIA Portal tools, and the fault classes that account for most cases.
- The sequence that holds up – from symptom to cause
- The TIA Portal tools – and what each is good for
- Five fault classes – that cover most of it
1.Why trial and error is the most expensive route
A plant is down. Production is waiting, the phone is ringing, and TIA Portal is showing you a program that was running yesterday. The reflex in that situation is almost always the same: look somewhere you suspect the fault.
That is precisely the most expensive route. Not because guesses are inherently wrong – but because a refuted guess leaves nothing behind. You know no more than before and have lost twenty minutes. After the fifth guess an hour is gone and the pressure has risen.
Systematic narrowing works the other way round: every step halves the search space, regardless of whether the assumption held. A negative result is still a result.
2.The sequence that holds up under pressure
Every efficient troubleshooting session follows the same chain:
Symptom → hardware or software? → affected block → signal path → cause
The first step is the one most often skipped – and the one that then costs most.
2.1.Step 1: Rule out hardware before you look at code
The CPU diagnostic buffer is the first place to look during any fault, not the last. It logs module failures, peripheral errors, STOP causes and cycle time errors with timestamps. If it shows a module failure, searching the program code is pure waste.
In addition: the LEDs on the CPU and peripherals say in seconds what the code will not reveal in minutes. A red SF LED on an ET 200 ends the discussion about program logic.
The classic time sink
A faulty sensor, a loose terminal or a failed module produce exactly the same symptom in the program as a logic error: a condition never becomes true. Anyone who does not make this distinction first may spend hours looking for a fault that is not in the program.
2.2.Step 2: Find the responsible block
State the symptom as concretely as possible: not "the plant isn't working" but "conveyor 3 does not start after the start command, fault message appears after 5 seconds".
From that phrasing the block follows almost by itself – provided the program is cleanly structured. If every plant section is encapsulated in its own, meaningfully named function block, you know immediately where to look. If everything is wired into OB1, this is where the laborious part begins.
2.3.Step 3: Trace the signal path backwards
Take the output that is not switching and work back to its conditions. Which interlock prevents it from being set? Which of those partial conditions is false? And why?
This backwards walk is the core of the method. It always ends at one of three points: an input condition that never arrives (hardware or upstream logic), an interlock that is engaging (usually intentionally), or an assignment being overwritten from elsewhere.
3.The TIA Portal tools
| Tool | What it is good for | Typical use |
|---|---|---|
| Watch table | Read live values without disturbing the process | The standard tool. Collect the suspect block's signals and observe them running |
| Cross-references | Where is a tag written, where read? | First remedy against double assignments and orphaned blocks |
| Call structure | Is the block being called cyclically at all? | When a block "does nothing" although the logic is correct |
| Diagnostic buffer | Hardware events with timestamps | Always first. Settles hardware vs. software in seconds |
| Online/offline comparison | Does the CPU deviate from the documented state? | Uncovers undocumented changes "from last night shift" |
| PLCSIM | Reproduce logic without the plant | For reproducible faults and safely playing through variants |
3.1.Forcing: the tool you almost never need
Forcing overwrites physical inputs and outputs and stays active until explicitly cleared – across a CPU restart too. On a running plant with moving axes that is a safety risk, not a diagnostic tool.
For pure observation the watch table is enough. If you genuinely have to set a value, do it deliberately, documented, and with a colleague watching the plant – and clear it before you leave. A forgotten force is a time bomb that goes off at the next startup, when nobody remembers it was set.
4.Five fault classes that account for most cases
4.1.1. Double assignments
The same tag is written in two blocks. In the cyclic sequence the last processed assignment "wins" – the output flickers or stubbornly stays at one value although the visible logic says otherwise.
Detection: cross-references. Any tag with more than one writing location is suspect.
4.2.2. Edge detection faults
An action fires continuously instead of once, or not at all. The cause is usually a missing rising edge (R_TRIG) or an edge memory bit used in several places – the first evaluation consumes the edge and the second never sees one.
Detection: watch table on the edge memory bit plus cross-references to it.
4.3.3. Timing and cycle problems
A timer whose start condition is reset within the same cycle never expires. Conversely, excessive cycle times trigger the cycle time error OB (OB80) – visible in the diagnostic buffer.
Detection: check cycle time in the CPU diagnostics, observe the timer input in the watch table.
4.4.4. Data block mix-ups
With multiply instantiated function blocks, the wrong instance DB is passed. The logic is correct, but drive 2 reacts to drive 1's values.
Detection: look at the call structure – which block receives which DB?
4.5.5. Hardware disguised as software
A wobbling proximity switch, a cable break in the drag chain area, a module with sporadic dropout. The symptom is visible in the program, the cause is not.
Detection: sporadic behaviour is the warning sign. A fault that cannot be reproduced rarely lies in the logic – logic is deterministic.
Rule of thumb
Reproducible faults are usually software. Sporadic faults are usually hardware or timing. This single distinction saves more time than any individual tool.
5.When the plant is down: the sequence under pressure
When production is waiting, a fixed sequence helps more than intuition:
- Read the diagnostic buffer. 30 seconds, settles hardware vs. software.
- State the symptom precisely. What exactly does not happen, since when, under which conditions?
- Ask about the last change. "It ran yesterday" is the single most valuable piece of information – the online/offline comparison shows whether anyone touched anything.
- Build a watch table for the suspect area instead of clicking through networks.
- Work backwards from the output to the conditions.
- Document the finding before releasing the plant again – otherwise the whole search repeats next time.
Point 6 is almost always dropped under pressure and is the only one that prevents the same search starting from scratch in three months.
6.Clean code is diagnostic infrastructure
Most of the points above presuppose something: a clear block structure, meaningful names, a commented symbol table. That is not an end in itself and not a question of aesthetics.
A program in which every plant section is encapsulated and named turns hours of guesswork into minutes of targeted narrowing. A commented block tells you at a glance what it is supposed to do – and therefore where it deviates. A block full of M0.0 and DB1.DBX0.0 tells you nothing, and troubleshooting starts from zero.
7.Conclusion
Troubleshooting is method, not talent. Three things carry most of it:
- Rule out hardware first – the diagnostic buffer answers in 30 seconds whether searching the code makes sense at all.
- Work backwards from the symptom rather than forwards from a guess – every step shrinks the search space, even when the assumption was wrong.
- Reproducible or sporadic? – this distinction separates software from hardware and timing problems before you open the first network.
Support during a fault
When a plant is down and the cause cannot be narrowed down – or when the program is so unstructured that every search starts from scratch: I support fault analysis, re-documentation and structural rebuilds. From Luxembourg, regularly on site in Saarland and the Trier region. Let's talk.
8.Further reading
- PLC Programming: 8 Best Practices for Clean, Maintainable Code – the structure that makes troubleshooting efficient in the first place
- PLC Documentation: What Belongs In It and What Matters at Handover – why the alarm list decides during a fault
- The 5 PLC Programming Languages of IEC 61131-3 – which language is how easy to debug
Questions about your automation project?
As an automation engineer based in Stadtbredimus, Luxembourg, I offer free initial consultations for companies in the Greater Region Saar-Lor-Lux.
David Prybisch · PLC · HMI · Commissioning
Related Articles

PLC Programming Best Practices for Maintainable Code
Write clean, maintainable PLC code in Siemens TIA Portal: proven naming conventions, FB/FC structure, NAMUR alarm handling, Git and faster troubleshooting.
Read more: PLC Programming Best Practices for Maintainable Code
PLC Documentation: What Belongs In It and What Matters at Handover
Practical guide to PLC documentation: the three layers from code to plant file, a handover checklist to work through, and what to do when only an online upload remains.
Read more: PLC Documentation: What Belongs In It and What Matters at Handover
The 5 PLC Programming Languages of IEC 61131-3 Compared
LD, FBD, IL, ST and SFC: what IEC 61131-3 actually defines, how the Siemens names map onto it, and which language is right for which task.
Read more: The 5 PLC Programming Languages of IEC 61131-3 Compared