PLC Troubleshooting, Safety and Documentation
Fault finding, forcing I/O, backups and version control, commissioning, lockout and safety standards.
On this page
- A fault-finding approach
- Where to look first
- Reading the PLC’s own diagnostics
- Going online: what to watch
- Forcing, bypassing and testing safely
- Common faults and causes
- Checking an analog signal
- Backups and version control
- Commissioning and handover
- Machine safety and lockout
- Standards at a glance
- Documentation that helps next time
- FAQ
A fault-finding approach
A good troubleshooter is slow at the start and fast at the end. Resist the urge to change the program until you know what the machine is doing and why. The steps below work for any PLC, from a small relay replacement to a plant-wide system.
- 1. Make it safe. Know what can move or energize. Stop the machine, lock out if you will touch anything, and tell the operators.
- 2. Ask what changed. A machine that worked yesterday has a new fault: a part replaced, a setting changed, a program downloaded, a new batch of material, a loose connector. Ask the operators what they saw and when.
- 3. Look before touching. Check the alarm screen, the PLC fault light and the diagnostic buffer. Record codes and times before you clear anything.
- 4. Divide the problem. Is the PLC getting the right inputs? Is it making the right decision? Are the outputs doing what the PLC asks? Test at the middle of the chain to halve the search.
- 5. Check the simple things first: power, fuses, breakers, a loose plug, an air supply, a stuck switch, a dirty sensor.
- 6. Change one thing at a time and note the result. Put it back if it did not help.
- 7. Fix the cause, not only the symptom. A blown fuse has a reason; a sensor that fails often is probably aimed or mounted wrongly.
- 8. Write it down. Record the fault, the cause and the fix for the next shift.
Where to look first
| Start with… | Because… |
|---|---|
| Power and the PLC status lights | No power, a stopped CPU or a fault light explains many “nothing works” calls |
| The input LEDs | They show what the PLC sees; if the LED follows the switch, the field wiring and input are fine |
| The output LEDs | They show what the PLC wants; if the LED is on and the device is off, the fault is in the output wiring, the device or its supply |
| The program online | The logic shows why an output is off: which contact is not true |
| The field device | Check at the device, with a meter, to separate wiring and device faults |
Reading the PLC’s own diagnostics
| Indicator | Typical meaning | First action |
|---|---|---|
| POWER / PWR off | No supply to the CPU or the supply has failed | Check the supply voltage, fuse and breaker at the terminals |
| RUN steady green | The CPU is executing the program | Normal |
| RUN off / STOP | CPU in stop mode, or a fatal fault stopped it | Check the mode switch and the fault code |
| FAULT or ERR red | A major fault: program error, scan watchdog, hardware fault | Read the fault code online; do not just power-cycle and lose the evidence |
| Flashing fault light | Often a minor fault or a module not configured | Check the module and configuration |
| BATT or BAT low | The memory-backup battery is low | Replace within the maker’s time limit, with power on if the manual says so |
| I/O fault or module error | A module is missing, a wrong type, or has lost communication | Reseat the module; compare the real hardware with the configuration |
| Comm / link LED | Link and activity on the network port | No link means cable, switch or power; no activity means no traffic |
| Forced I/O indicator | One or more inputs or outputs are forced | Find the forced points and check why; remove them when done |
| Platform | Where the fault information is |
|---|---|
| Allen-Bradley Logix | Controller Properties → Major Faults / Minor Faults; the status display; the Module Properties fault page; fault code and type |
| Siemens S7-1200/1500 | Diagnostic buffer (Online & diagnostics), the device view’s diagnostic icons, the web server; ERROR and MAINT LEDs |
| Mitsubishi | Error history and module diagnostics in GX Works; special registers (SD) and relays (SM); the ERR LED |
| Omron | Error log and PLC information in CX-Programmer/Sysmac Studio; the ERR/ALM LED; auxiliary area flags |
| IDEC, Unitronics, Click | System status registers or bits in the software; the ERR LED; look up the code in the manual |
| CODESYS | The device log, the online task monitor and the application log |
Going online: what to watch
- Connect and compare. Make sure the program on your laptop is the same as the one in the PLC. Most software tells you if they differ. Do not download before you have saved a copy of what is running.
- Trace the output back. Open the rung that drives the dead output. The contacts that are true are highlighted; the first one that is not true is your answer. Then find out why that input or bit is false.
- Cross-reference. Where is a bit written? If it is never written, it will never turn on; if it is written in two places, the later one wins in the scan.
- Watch tables and trends. Put the key inputs, bits, timers and analog values in a watch table and trend them over time to catch the intermittent fault.
- Timers and counters. A timer that never reaches its preset has its enable bit dropping out; a counter that counts twice has no one-shot on its input.
- Scan time. A scan that is much longer than usual, or hitting the watchdog, points to a loop, a heavy calculation or a stuck communication call.
- Mode and edits. Know the effect of an online edit on this PLC before you do one. Some stop the outputs, some do not.
- Do not clear a fault you do not understand. Note the code, time and rung first.
Forcing, bypassing and testing safely
Forcing sets an input or output to a value regardless of the real signal or the program. It is a powerful tool and a common cause of accidents, because a forced point stays forced until someone removes it.
| Practice | Why |
|---|---|
| Never force a safety input or output | The safety function is bypassed; people can be hurt |
| Force only with the area clear | A forced output can start a motor, open a valve or move a cylinder at once |
| Write down each force and remove it before leaving | Forces survive a power cycle in many PLCs, and the next person will not know |
| Prefer a test bit in the program | A deliberate manual mode with interlocks is safer than a raw force |
| Use simulation where available | PLCSIM, emulators and virtual machines test logic without touching the machine |
| Do not jumper out a limit switch or a guard | If a sensor is faulty, replace it; a bypass that is forgotten becomes a hazard |
| Test at low risk first: slow speed, no load, guards in place | Faults in a new program should show up where they can do no harm |
Common faults and causes
| Symptom | Likely causes | Check |
|---|---|---|
| Input LED never turns on | Dead sensor, no sensor power, open wire, wrong sink/source type, input fuse | Meter at the terminal with the sensor active; check the sensor LED and the supply |
| Input LED on, program does not see it | Wrong address in the program, input filter too slow, input forced off, module not in the scan | Cross-reference the address; check the online value and force indicator |
| Output LED on, device off | Open wire, blown output fuse, no load power, failed relay contact, failed solenoid | Meter at the output terminal and at the device |
| Output LED off, should be on | Interlock not satisfied, program in the wrong state, forced off, mode off | Trace the rung back to the first false contact |
| Output on for a moment only | Rung driven by a one-shot or by a timer that resets; two writes to the same bit | Search for other writes; check the timer enable |
| Machine stops at random | Loose wiring, a sensor at the edge of its range, vibration, a noisy supply, a power dip | Trend the inputs; check terminals; look at the 24 V supply under load |
| Machine does not start after power-up | A latched fault, an unsatisfied start permissive, a battery-backed value lost, mode switch in the wrong place | Read the alarm list and the first-scan logic |
| Analog reading wrong or jumping | Open loop, wrong range jumper, ground loop, missing shield, wrong scaling | Measure the loop current and compare with the displayed value |
| Communication fault | Cable, address, settings, switch, firewall | See the previous pages on setting up and troubleshooting communications |
| PLC stops by itself | Watchdog timeout, array index out of range, divide by zero, a bad instruction parameter | Read the major fault code and the rung it names |
| Everything dead after a storm | Surge damage to the supply, the network switch or I/O modules | Check the supply first; swap suspected modules; check surge protection |
| Motor drive trips | Overcurrent, overload, bus overvoltage or undervoltage, ground fault | Read the drive’s fault code; see the Motors, Drives and PID page |
Checking an analog signal
Worked example: does the PLC see the right value?
- A 4–20 mA pressure transmitter reads 0–10 bar. At 12 mA, the signal is (12 − 4) ÷ 16 = 50 % of span, which should show 5.0 bar.
- On a Siemens analog input the raw value runs 0–27 648 for 4–20 mA, so 12 mA should give about 13 824 counts. A different number means the range is set wrongly or the scaling is wrong.
- The HMI shows 3.2 bar. Put a meter in series with the loop: it reads 10.2 mA. Then the transmitter is the source of the error (the pressure is really 3.9 bar); look at the sensor or the process. If the meter had read 12 mA, the fault would be in the input channel or the scaling.
- A reading of 3.2 mA is below 4 mA (-1 382 counts): a broken wire or a failed transmitter, because a healthy loop never goes below 3.6 mA (NAMUR NE 43). Use this as a wire-break alarm.
Backups and version control
| Practice | Detail |
|---|---|
| Back up before you change anything | Upload the running program from the PLC and save it with the date; this is your way back |
| Back up the whole system | PLC project, HMI project, drive parameter files, network switch configs, device IP list and firmware versions |
| Use meaningful file names | MachineName_PLC_2026-10-30_v3_after-conveyor-fix, not “final2_new” |
| Keep a change log | Date, who, what and why, in the project comments or a document |
| Store copies in more than one place | The engineering PC, a file server or cloud with access control, and a copy on the machine’s own USB stick or SD card if allowed |
| Use version control where possible | Some platforms export text (Siemens openness, L5X for Logix, CODESYS/PLCopen XML) that Git can compare; commercial tools such as FactoryTalk AssetCentre, Copia or VersionDog track changes and compare online and offline |
| Test restores | A backup you have never restored is a hope, not a backup |
| Protect the program | Use a password or access control, and keep the passwords in a safe place; losing a password can mean rewriting the program |
| Back up retained data | Recipes, set points, calibration values and counters that live in memory |
Commissioning and handover
- Check the wiring before power. Compare the drawings with the panel; ring out the circuits; check the supply voltages, polarity and grounding.
- Power up in stages. Control power first, with outputs disconnected or disabled; then the I/O; then the load power.
- Test every input by operating the real device, and confirm it in the PLC. Mark off each point on an I/O list.
- Test every output with the mechanism safe or disconnected: motors uncoupled or with guards, valves with no pressure if possible.
- Check the direction. Motors, fans and conveyors turn the way the program expects; valves open when energized.
- Test the safety functions first, and then again at the end: e-stops, guard doors, light curtains and enabling devices must do what the risk assessment says.
- Run each sequence slowly, then at speed, then in the failure cases: power loss in the middle of a cycle, a sensor that does not change, a jam.
- Tune the loops (PID) with the real process, and record the final values.
- Set the alarms and the timeouts from what the machine really does.
- Hand over: as-built drawings, the final program backup, the I/O list, the network list, the parameter files, spare-parts list, manuals, passwords, and training for the operators and the maintenance staff.
Machine safety and lockout
The standard PLC is not a safety device. Its logic can be wrong, its outputs can stick on, and its program can be changed. Safety functions (emergency stops, guard interlocks, light curtains, two-hand controls) must be hard-wired or run on a certified safety relay or safety PLC, designed to a recognized standard.
- Emergency stop removes the energy from the hazard by hardware (a safety relay that opens contactors), not by a PLC input. The PLC may read a status signal for the display only.
- Dual channels and monitoring. Safety circuits use two channels and check that both agree, so a single fault (a welded contact, a shorted wire) is detected.
- Stop categories (IEC 60204-1). Category 0 removes power at once; category 1 stops under control and then removes power; category 2 stops under control and leaves the power on.
- Restart. After a safety stop, the machine must not restart on its own. A deliberate reset is required.
- Keep functional safety separate in the program and the documentation, and change it only under control.
- Fail safe. Choose wiring so a broken wire or a lost supply stops the machine (normally closed devices, de-energize to stop).
| Lockout / tagout step | What to do |
|---|---|
| 1. Prepare | Identify all the energy sources: electrical, air, hydraulic, springs, gravity, stored energy in capacitors and drives |
| 2. Notify | Tell the operators and the people affected |
| 3. Shut down | Stop the machine by its normal controls |
| 4. Isolate | Open the disconnects, close the valves |
| 5. Lock and tag | Put your own lock and tag on each isolation point; keep the key |
| 6. Release stored energy | Bleed pressure, block raised parts, wait for drive capacitors to discharge |
| 7. Verify | Try to start the machine; test with a meter that the circuit is dead (live–dead–live) |
| 8. Restore | Clear the area, remove tools, take off locks, and restart with everybody clear |
Working on live panels is a separate hazard (arc flash, electric shock). Use the correct personal protective equipment, rated tools and approved procedures (for example NFPA 70E in the US). If you do not have training, do not work live.
Standards at a glance
| Standard | Scope | Why it matters |
|---|---|---|
| NFPA 79 (US) / IEC 60204-1 (international) | Electrical equipment of industrial machines | Panel design, wire colors and sizes, e-stop, disconnects, grounding, control circuit voltage, marking |
| ISO 13849-1 | Safety-related parts of control systems | Performance levels (PL a to e), categories and diagnostic coverage for machine safety functions |
| IEC 62061 | Functional safety of machine control systems | An alternative to ISO 13849 using safety integrity levels (SIL) |
| IEC 61508 | Functional safety of electrical and programmable systems | The base standard for safety PLCs and devices (SIL 1 to 4) |
| IEC 61131-3 | PLC programming languages | Ladder, FBD, ST, IL and SFC |
| OSHA 1910.147 (US) | Control of hazardous energy | Lockout / tagout requirements |
| NFPA 70E (US) | Electrical safety in the workplace | Arc flash, PPE and approach boundaries |
| ANSI B11 series, ISO 12100 | Machine tool safety and risk assessment | Risk assessment methods and design principles |
| IEC 62443 | Industrial cybersecurity | Network segmentation, access control and secure development |
Standards and local rules change and differ by country and industry. Treat this table as a map of where to look, and check the current edition and your authority having jurisdiction.
Documentation that helps next time
| Document | Contents |
|---|---|
| Electrical drawings | Power, control, I/O wiring, terminal numbers, wire numbers, cable list; kept up to date with every change |
| I/O list | Address, tag name, description, device, terminal, signal type and range, and the cabinet location |
| Network diagram and IP list | Devices, addresses, subnet masks, protocols, switch ports |
| Program description | What each routine does, the modes, the state machine, the alarms and interlocks |
| Tag and comment standards | Naming conventions, units, rung comments that say why, not what |
| Alarm list | Each alarm: cause, effect, operator action |
| Parameter files | Drive, sensor and instrument settings with the date |
| Change log | Date, person, change, reason, test result |
| Spare parts and manuals | Part numbers, supplier, lead time; PDFs of every manual |
| Risk assessment and safety validation | The hazards, the safety functions, their required performance level and the test results |
- Label everything: wires at both ends, terminals, devices, and cables.
- Put a copy of the drawings in the panel, in a pocket, and mark up changes in red until the master set is updated.
- Use descriptive tags (Conveyor1_Run, Tank1_Level_High) rather than addresses; the program becomes much easier to read.
- Comment the reason for any unusual logic. In two years, nobody will remember.
Related
- PLC & Logic Control: the overview of this guide.
- Sniffers, Analyzers and Serial Tools: tools for communication faults.
- I/O Wiring and Signals: wiring and signals, the commonest source of faults.
- Worked Examples: programs to practice tracing.
- Fits and Tolerances and the Electronics guide for the test tools used in the panel.
FAQ
Where do I start when a machine stops?
Make it safe, read the alarm and the PLC status lights, then trace the dead output back through the program to the first false condition. Then check that condition at the field device with a meter.
Is it safe to force an output?
Only with the area clear, the hazards understood, and never on a safety function. Write down every force and remove it before you leave.
Should I power-cycle the PLC to clear a fault?
Read and record the fault first. A power cycle can clear the evidence, and if the cause is still there, the fault will come back.
Can a standard PLC do the emergency stop?
No. An emergency stop must act through hard-wired or certified safety hardware that removes power; the PLC can only monitor its state.
How often should I back up the program?
Before and after every change, and once a year for machines that are never changed. Check that the backup restores.
References
- NFPA 79, Electrical Standard for Industrial Machinery; IEC 60204-1, Safety of machinery: Electrical equipment of machines.
- ISO 13849-1, Safety of machinery: Safety-related parts of control systems; IEC 62061; IEC 61508.
- OSHA 29 CFR 1910.147, The control of hazardous energy (lockout/tagout); NFPA 70E, Standard for Electrical Safety in the Workplace.
- NAMUR NE 43, Standardization of the signal level for the failure information of digital transmitters.
- Manufacturer manuals for the controllers named in this guide (diagnostics and fault codes).
Last reviewed: October 2026. Instruction names, addresses and data sizes differ by manufacturer: confirm against your controller’s manual, and keep safety functions independent of standard PLC logic.
