Skip to main content

Allen-Bradley PLC Fault Finding and Diagnostics in Studio 5000

By NFM Consulting 3 min read

Key Takeaway

How to diagnose and clear controller faults, I/O module faults, and program faults in Allen-Bradley ControlLogix and CompactLogix PLCs using Studio 5000.

Quick Answer

Allen-Bradley ControlLogix and CompactLogix controllers provide diagnostic information through front-panel LEDs, the fault log in Studio 5000, and programmable GSV (Get System Value) instructions. Most faults can be diagnosed and cleared using Studio 5000's online connection or the controller keyswitch.

Controller Status LEDs

  • RUN (green) — Solid: controller executing in RUN mode. Off: controller in PROGRAM mode.
  • FLT (red) — Solid: major recoverable fault. Flashing: major unrecoverable fault (requires firmware reload or hardware replacement).
  • BAT (red) — Solid: battery low or missing. The controller's backup battery maintains SRAM on power loss.
  • I/O (green) — Solid: all I/O operating normally. Flashing: one or more I/O modules have faulted.
  • FORCE (amber) — Solid: I/O forces are active in the project. Forces override normal logic and should be removed before final commissioning.

Controller Fault Types

  • Major Fault — Stops program execution. The controller enters fault mode and outputs de-energize. Must be cleared before returning to RUN.
  • Minor Fault — Logged but does not stop execution. Examples: battery low, underflow/overflow warnings.
  • I/O Fault — A connected I/O module has lost communication or has a configuration mismatch. Logged in the fault log and indicated by the flashing I/O LED.

Reading the Fault Log in Studio 5000

Go online and navigate to Controller Properties > General > Major Faults or Minor Faults. The fault log displays:

  • Fault type and code (e.g., Type 4, Code 16)
  • Timestamp of the fault occurrence
  • Description of the fault cause
  • The routine and rung where the fault occurred (for program faults)

Common Major Fault Codes

  • Type 1 (Power-Up) — Controller powered up without a valid program or after a power-fail restart.
  • Type 4, Code 16 (Unknown Instruction) — The program contains an instruction the firmware does not support. Often caused by firmware version mismatch.
  • Type 4, Code 42 (Stack Overflow) — Excessive recursion or deeply nested JSR calls.
  • Type 6 (I/O Module) — An I/O module lost communication or has an unrecoverable hardware fault.
  • Type 7 (Watchdog) — A task exceeded its watchdog timeout. The program scan took longer than the configured maximum time.

Clearing a Major Fault

  • Keyswitch method — Toggle the keyswitch from RUN to PROG and back to RUN. This clears the fault and resumes execution if the fault condition no longer exists.
  • Studio 5000 method — Go online, click the Clear Faults button, then switch to RUN mode.
  • Programmatic method — Use a fault handler routine (configured in Task Properties) to automatically clear or log specific fault types without operator intervention.

I/O Module Fault Diagnostics

  • Inhibited — The module is intentionally disabled. Right-click > Properties > uncheck Inhibit Module.
  • Connection lost — Check physical wiring, network cables, and the module's status LEDs. Verify the module IP address and firmware compatibility.
  • Configuration mismatch — The module type or configuration in the project does not match the physical module. Re-configure or replace the module to match.

Using GSV to Read Fault Codes Programmatically

The GSV (Get System Value) instruction reads system attributes into program tags. Use GSV with the FAULTLOG object to read fault type, code, and timestamp into tag arrays for HMI display and historical logging. This enables automated fault history recording without operator intervention.

Task Watchdog Faults

A task watchdog fault occurs when a task's scan time exceeds its configured timeout. Common causes:

  • Excessive FOR loop iterations
  • Large MSG instruction queues
  • Too many instructions in a continuous task

Remedies: increase the watchdog time, optimize the program, or split heavy processing across multiple periodic tasks with staggered rates.

Building a Fault History Log

Use a fault handler routine with GSV instructions to capture fault data (type, code, timestamp) into a FIFO array. Store the last 20-50 faults with timestamps for troubleshooting. Display the fault history on an HMI screen so operators and maintenance personnel can review recent faults without connecting Studio 5000.

Frequently Asked Questions

Ready to Get Started?

Our engineers are ready to help with your automation project.