Skip to content
Tutorials Center
My learning

Topics

Lesson 32 of 37 ยท Safety and Troubleshooting

PLC Troubleshooting Methods and Diagnostics

Learn a systematic way to troubleshoot PLC systems: power, I/O, wiring, online monitoring, forcing, diagnostics buffers, network checks and common faults, with runnable C stand-ins.

The machine has stopped. Production is waiting. Someone says "the PLC is broken". In reality, the controller itself is the least likely culprit: most faults sit in sensors, wiring, actuators, power, networks or in a program condition nobody expected. The skill of troubleshooting is not memorizing faults; it is following a calm, repeatable method that narrows the search quickly.

This track cannot give you a real PLC to connect to, so this lesson is a method with read-only examples and C stand-ins that practise the logic of diagnosis.

Always follow lockout/tagout and your site's safety rules. Never put hands in a machine to "check" something, and never bypass a safety device.

A seven-step method

  1. Gather information. What was the machine doing? What changed? Any alarm text, fault code, or abnormal sound? Ask the operator.
  2. Look and listen. LEDs on the CPU and modules, tripped breakers, loose connectors, smell, heat, leaks.
  3. Check the basics. Power supply voltages (24 V DC rails, mains), air pressure, emergency stops, guards, and key positions.
  4. Go online. Connect with the programming software and check the controller mode (run or stop), diagnostics buffer and active alarms.
  5. Work backwards from the symptom. Find the output that should have turned on but didn't. Trace its logic: which condition is false? Follow that back to a physical input.
  6. Verify the physical world. Is the sensor truly seeing the object? Measure with a multimeter: voltage at the input terminal, continuity, output voltage at the actuator.
  7. Fix, test, document. Repair, test under real conditions, write down cause and cure, and consider preventing recurrence.
flowchart TB
    S["Symptom: output off"] --> Q1{"Output bit on in PLC?"}
    Q1 -- "yes" --> W["Check wiring, fuse, actuator,<br/>output module"]
    Q1 -- "no" --> Q2{"Which rung condition is false?"}
    Q2 --> Q3{"Is the input bit correct?"}
    Q3 -- "bit wrong" --> W2["Check sensor, wiring,<br/>input module"]
    Q3 -- "bit right" --> L["Logic, interlock or sequence step<br/>blocking it"]

Splitting the problem in halves is faster than guessing.

Online monitoring

Programming tools can monitor the program live: contacts turn colored when true, values update. This is the most powerful diagnostic. Read the rung that drives the dead output and find the first false condition, then ask why it is false. Good programs help: step numbers on the HMI, descriptive names, and rung comments make the search shorter.

Forcing overrides an input or output value regardless of reality. It can confirm that an output module and actuator work (force the bit, hear the valve click) but is hazardous: a forced bit stays forced after you leave and ignores interlocks. Rules of thumb: only force with permission, never on safety-related signals, tell others, and remove all forces afterwards. Many sites require a log of active forces.

Diagnostic tools

  • Diagnostics buffer / fault log in the CPU: time-stamped events such as module removed, I/O fault, program error.
  • Module LEDs: a red SF or BF (bus fault) LED, flashing patterns, channel LEDs.
  • Multimeter: voltage, continuity and current. A 24 V input should show about 24 V when active, and near 0 V when inactive; a floating or half voltage signals wiring trouble.
  • Cross reference: shows where each bit is written. A bit written in two places is a classic mystery.
  • Network tools: ping, device scans, switch port status, protocol analyzers.
  • Trace / trend recording: capture a fast signal to see events between scans.
  • Backups: compare the running program with the last known good backup to see what was changed.

Practicing logic diagnosis

This program models a small interlock chain. Several conditions must be true for a motor to start; the program prints which ones block it. That is exactly what you do by reading a rung while monitoring online.

C C stand-in: find which condition blocks an output

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

Two conditions block the motor. When fixing, correct them one by one and watch how the chain responds; do not assume there is only one cause.

Is it the sensor, the wiring or the logic?

A quick decision test for an input that seems dead: compare the physical state, the LED on the module and the bit in the program.

C C stand-in: locate the fault from three observations

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

This three-way comparison finds the location of the break in a minute.

Common causes by area

  • Power: blown fuse, tripped breaker, loose terminal, 24 V rail dropped under load, brown-out.
  • Inputs: misaligned or dirty sensor, wrong PNP/NPN type, broken cable, no common supply.
  • Outputs: failed relay contact, fuse blown by a shorted coil, missing flyback protection, stuck actuator.
  • Network: swapped or damaged cable, duplicate IP address, device renamed, switch fault, Modbus timeouts from a missing terminator.
  • Program: bit written twice, step waiting for an impossible condition, an interlock not cleared, wrong scaling.
  • Environment: heat, vibration, moisture, electrical noise from drives.
  • Humans: a changed setpoint, a bypass left in place, a modified program with no backup.

Prevention

Keep current backups with version notes, label wires and terminals, keep drawings accurate, write clear comments, log changes, and track recurring faults. A fault that happens twice deserves a root-cause analysis (ask "why?" five times) rather than another reset. Good fault handling built into the program makes diagnosis faster for everyone, and good coding habits help the next person.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. An output does not switch on. What is a sensible first step online?

    Working backwards from the dead output through its logic quickly shows which condition is blocking it.
  2. 2. A sensor sees the object, but the module LED stays off. Where is the fault most likely?

    The LED shows the module sees no signal, so the problem is upstream of the module.
  3. 3. What is the main danger of forcing I/O?

    A forced bit bypasses interlocks; unremoved forces are a common cause of unsafe or confusing behavior.
  4. 4. A bit seems to be on while the physical sensor is off and the LED is off. What do you suspect?

    If the real input is off but the bit is on, something other than the input is driving it: a force or another write.

Summary

  • Troubleshoot with a method: information, look and listen, basics, online, work backwards, measure, fix and document.
  • Monitoring online shows the first false condition; forcing is a hazardous last resort.
  • Compare the physical state, module LED and program bit to place the fault.
  • Check power, inputs, outputs, network, program and environment; keep backups and drawings.
  • The C programs are stand-ins to practise the reasoning.

Next: PLC Commissioning and Good Practice