PLC Troubleshooting, Safety and Documentation

Fault finding, forcing I/O, backups and version control, commissioning, lockout and safety standards.

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

1Ask and observeWhat was it doing, what changed, what does the HMI or alarm say, was anything modified?2Check the controllerMode, fault LEDs, diagnostic buffer, battery, memory card, power supply voltage.3Check inputs and outputsDo LEDs match the real device? Is anything forced? Is the module healthy?4Go online and watch the logicFind the rung or step that is false, and work backwards to the missing condition.5Check the field deviceSensor, valve, contactor, wiring, supply: measure at the terminals.6Fix, test and documentMake the repair, run the sequence, record the cause and the change, and back up the program.
A six-step path from symptom to fix. Most faults are found in the first three steps, without a laptop.
Start with…Because…
Power and the PLC status lightsNo power, a stopped CPU or a fault light explains many “nothing works” calls
The input LEDsThey show what the PLC sees; if the LED follows the switch, the field wiring and input are fine
The output LEDsThey 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 onlineThe logic shows why an output is off: which contact is not true
The field deviceCheck at the device, with a meter, to separate wiring and device faults

Reading the PLC’s own diagnostics

IndicatorTypical meaningFirst action
POWER / PWR offNo supply to the CPU or the supply has failedCheck the supply voltage, fuse and breaker at the terminals
RUN steady greenThe CPU is executing the programNormal
RUN off / STOPCPU in stop mode, or a fatal fault stopped itCheck the mode switch and the fault code
FAULT or ERR redA major fault: program error, scan watchdog, hardware faultRead the fault code online; do not just power-cycle and lose the evidence
Flashing fault lightOften a minor fault or a module not configuredCheck the module and configuration
BATT or BAT lowThe memory-backup battery is lowReplace within the maker’s time limit, with power on if the manual says so
I/O fault or module errorA module is missing, a wrong type, or has lost communicationReseat the module; compare the real hardware with the configuration
Comm / link LEDLink and activity on the network portNo link means cable, switch or power; no activity means no traffic
Forced I/O indicatorOne or more inputs or outputs are forcedFind the forced points and check why; remove them when done
PlatformWhere the fault information is
Allen-Bradley LogixController Properties → Major Faults / Minor Faults; the status display; the Module Properties fault page; fault code and type
Siemens S7-1200/1500Diagnostic buffer (Online & diagnostics), the device view’s diagnostic icons, the web server; ERROR and MAINT LEDs
MitsubishiError history and module diagnostics in GX Works; special registers (SD) and relays (SM); the ERR LED
OmronError log and PLC information in CX-Programmer/Sysmac Studio; the ERR/ALM LED; auxiliary area flags
IDEC, Unitronics, ClickSystem status registers or bits in the software; the ERR LED; look up the code in the manual
CODESYSThe 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.

PracticeWhy
Never force a safety input or outputThe safety function is bypassed; people can be hurt
Force only with the area clearA forced output can start a motor, open a valve or move a cylinder at once
Write down each force and remove it before leavingForces survive a power cycle in many PLCs, and the next person will not know
Prefer a test bit in the programA deliberate manual mode with interlocks is safer than a raw force
Use simulation where availablePLCSIM, emulators and virtual machines test logic without touching the machine
Do not jumper out a limit switch or a guardIf 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 placeFaults in a new program should show up where they can do no harm

Common faults and causes

SymptomLikely causesCheck
Input LED never turns onDead sensor, no sensor power, open wire, wrong sink/source type, input fuseMeter at the terminal with the sensor active; check the sensor LED and the supply
Input LED on, program does not see itWrong address in the program, input filter too slow, input forced off, module not in the scanCross-reference the address; check the online value and force indicator
Output LED on, device offOpen wire, blown output fuse, no load power, failed relay contact, failed solenoidMeter at the output terminal and at the device
Output LED off, should be onInterlock not satisfied, program in the wrong state, forced off, mode offTrace the rung back to the first false contact
Output on for a moment onlyRung driven by a one-shot or by a timer that resets; two writes to the same bitSearch for other writes; check the timer enable
Machine stops at randomLoose wiring, a sensor at the edge of its range, vibration, a noisy supply, a power dipTrend the inputs; check terminals; look at the 24 V supply under load
Machine does not start after power-upA latched fault, an unsatisfied start permissive, a battery-backed value lost, mode switch in the wrong placeRead the alarm list and the first-scan logic
Analog reading wrong or jumpingOpen loop, wrong range jumper, ground loop, missing shield, wrong scalingMeasure the loop current and compare with the displayed value
Communication faultCable, address, settings, switch, firewallSee the previous pages on setting up and troubleshooting communications
PLC stops by itselfWatchdog timeout, array index out of range, divide by zero, a bad instruction parameterRead the major fault code and the rung it names
Everything dead after a stormSurge damage to the supply, the network switch or I/O modulesCheck the supply first; swap suspected modules; check surge protection
Motor drive tripsOvercurrent, overload, bus overvoltage or undervoltage, ground faultRead 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

PracticeDetail
Back up before you change anythingUpload the running program from the PLC and save it with the date; this is your way back
Back up the whole systemPLC project, HMI project, drive parameter files, network switch configs, device IP list and firmware versions
Use meaningful file namesMachineName_PLC_2026-10-30_v3_after-conveyor-fix, not “final2_new”
Keep a change logDate, who, what and why, in the project comments or a document
Store copies in more than one placeThe 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 possibleSome 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 restoresA backup you have never restored is a hope, not a backup
Protect the programUse a password or access control, and keep the passwords in a safe place; losing a password can mean rewriting the program
Back up retained dataRecipes, 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 stepWhat to do
1. PrepareIdentify all the energy sources: electrical, air, hydraulic, springs, gravity, stored energy in capacitors and drives
2. NotifyTell the operators and the people affected
3. Shut downStop the machine by its normal controls
4. IsolateOpen the disconnects, close the valves
5. Lock and tagPut your own lock and tag on each isolation point; keep the key
6. Release stored energyBleed pressure, block raised parts, wait for drive capacitors to discharge
7. VerifyTry to start the machine; test with a meter that the circuit is dead (live–dead–live)
8. RestoreClear 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

StandardScopeWhy it matters
NFPA 79 (US) / IEC 60204-1 (international)Electrical equipment of industrial machinesPanel design, wire colors and sizes, e-stop, disconnects, grounding, control circuit voltage, marking
ISO 13849-1Safety-related parts of control systemsPerformance levels (PL a to e), categories and diagnostic coverage for machine safety functions
IEC 62061Functional safety of machine control systemsAn alternative to ISO 13849 using safety integrity levels (SIL)
IEC 61508Functional safety of electrical and programmable systemsThe base standard for safety PLCs and devices (SIL 1 to 4)
IEC 61131-3PLC programming languagesLadder, FBD, ST, IL and SFC
OSHA 1910.147 (US)Control of hazardous energyLockout / tagout requirements
NFPA 70E (US)Electrical safety in the workplaceArc flash, PPE and approach boundaries
ANSI B11 series, ISO 12100Machine tool safety and risk assessmentRisk assessment methods and design principles
IEC 62443Industrial cybersecurityNetwork 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

DocumentContents
Electrical drawingsPower, control, I/O wiring, terminal numbers, wire numbers, cable list; kept up to date with every change
I/O listAddress, tag name, description, device, terminal, signal type and range, and the cabinet location
Network diagram and IP listDevices, addresses, subnet masks, protocols, switch ports
Program descriptionWhat each routine does, the modes, the state machine, the alarms and interlocks
Tag and comment standardsNaming conventions, units, rung comments that say why, not what
Alarm listEach alarm: cause, effect, operator action
Parameter filesDrive, sensor and instrument settings with the date
Change logDate, person, change, reason, test result
Spare parts and manualsPart numbers, supplier, lead time; PDFs of every manual
Risk assessment and safety validationThe 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

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.