Glossary · PLC and control programming
Debugging
Also known as: Online debugging, Troubleshooting code
German: Debugging
In software engineering and PLC programming, debugging is the systematic process of finding and removing the causes of faulty program behavior, using tools such as online monitoring, breakpoints, watch tables, traces and simulation.
- PLC programming
In one sentence
Debugging is finding and fixing the causes of faulty program behavior with monitoring, breakpoints, traces and simulation.
Example
A programmer uses a trace recording to see that a valve output drops for one PLC cycle each time the recipe changes, and finds a missing latch.
Explained in context
Context cards connect this term with others to answer one question. Also in British English and German.
How it applies
- Engineering: PLC tools offer online status views of networks, watch and force tables, breakpoints and single-step execution, and high-resolution traces. Simulation (for example a Soft PLC or a virtual controller) lets engineers debug before hardware exists.
- Commissioning: Breakpoints halt the controller and are therefore used with great care on a running machine; online monitoring and traces are the safer default.
- Change management: Every fix changes the software. The change goes through the normal Change control process and the affected functions are tested again, even if the fix looks trivial.
- Documentation: Record the fault, its root cause, the fix and the retest in the change record. Recurring faults that operators can resolve themselves are candidates for the troubleshooting section of the manual.
Debugging vs. testing
Testing shows that a program deviates from its requirements. Debugging finds out why and removes the cause. A Functional test and Verification confirm afterward that the corrected program meets its requirements.