plc troubleshooting

online monitoring

ladder logic

PLC Troubleshooting with Online Monitoring

‌
PLC online monitoring troubleshooting showing live ladder rung status on a laptop connected to a PLC rack

Online monitoring is the single most powerful troubleshooting tool you have, and most engineers underuse it. Not because they do not know it exists, but because they do not have a systematic method. They go online, click around a few rungs, scratch their heads, and eventually start swapping hardware. That wastes time and sometimes creates new faults.

This post walks through a structured, step-by-step approach to PLC troubleshooting using live online monitoring in Studio 5000 / Logix, with notes for TIA Portal and CODESYS where the workflow differs. The same logic applies on any platform.

Why Online Monitoring Is Your First Move

A PLC in run mode with a programming terminal connected shows you exactly what the processor sees in real time: which contacts are open or closed, which coils are energised, what value is sitting in every tag. The scan cycle is typically 5 to 20 ms, so the display updates fast enough to catch most faults. You are not guessing based on indicator lights or HMI messages. You are reading the actual logic state.

The key discipline is: go online before you touch anything physical. A lot of faults are in the logic or in field wiring that shows up clearly in the tag browser. Pulling cards, swapping sensors or bumping setpoints first turns a 10-minute software diagnosis into a 2-hour hardware hunt.

PLC Troubleshooting Steps: The Online Workflow

Step 1: Connect and Check Controller Status

Open Studio 5000, go online to the controller. The first thing to read is the controller status banner at the top of the screen: RUN, FAULT, or REM PROG. If you see a fault, open the controller properties fault tab immediately. Every Logix controller stores the fault code, the fault type (minor vs major), and the exact routine and rung number where the fault occurred. A Type 4, Code 20 fault means a task watchdog overrun, for example. That alone tells you the fault is a timing or scan-time problem, not a field device problem.

In TIA Portal on an S7-1200 or S7-1500, open the Online and Diagnostics view (Ctrl+D) to see the CPU diagnostic buffer. It logs the last 100 or so events with timestamps, fault codes and the OB that triggered. This is equivalent to the Logix fault log and is the first thing you should read.

Step 2: Find the Output That Is Not Doing What You Expect

Describe the symptom as precisely as possible: 'Conveyor 3 does not start when the start button is pressed.' That gives you an output tag to start from: Conv3_Run. In Studio 5000, press Ctrl+F to open the cross-reference and search for Conv3_Run. You will see every rung in every routine that reads or writes that tag.

Go to the rung that has Conv3_Run as an OTE or OTL coil. That is the output rung. Now look at the rung online. If the output coil is highlighted (true), but the physical output is not energised, the fault is in wiring or the I/O module, not in logic. If the coil is not highlighted (false), the logic is blocking it and you need to find why.

Step 3: Walk the Rung Backwards from the Coil

With the output rung open in online mode, look at each contact from right to left. Any contact that is not highlighted is an open condition blocking the rung. That contact is your next clue. It might be:

  • An XIC (Examine If Closed) contact that should be true but is false: the tag or physical input is off when it should be on.
  • An XIO (Examine If Open) contact that should be false but is true: something is active that should not be.
  • A comparison instruction (GRT, LES, EQU) that is false because a value is out of range.
  • A timer or counter done bit that has not set yet.

Note the tag name of the blocking contact. Cross-reference it. If it is a physical input tag like Conv3_StartPB, go to the I/O tree and check the module status. Is the bit reading 0 while the button is physically pressed? That is a wiring or sensor fault. If it is an internal bit like Conv3_InterlockOK, find where that bit is written and repeat the same backwards walk on that rung.

PLC online monitoring showing a blocked ladder rung with false contacts highlighted during troubleshooting
Walking a rung backwards from the coil: the first unlit contact is where the investigation shifts.

Step 4: Use the Tag Monitor and Watch Window

Once you have a suspicious tag, open a Watch Window (in Studio 5000, right-click the tag and choose 'Monitor Tag'). You can add multiple tags and watch their live values side by side. This is invaluable for analog values, counters and timer accumulators. If Conv3_SpeedRef is reading 0 when it should be 750, that explains why a speed-enable comparison is blocking the rung.

In TIA Portal, the equivalent is the Watch and Force Table (Watches tab). In CODESYS, it is the Watch List. All three let you log tag values over time if you add them to a trace or data log, which is useful for intermittent faults that do not stay present while you are looking.

Step 5: Check I/O Module Diagnostics

In the I/O tree in Studio 5000, every module has a status icon. A yellow triangle means a module fault or communication issue. Double-click the module and open its Module Properties. The Connection tab shows whether the connection to the backplane or remote adapter is healthy. The Fault tab shows the exact fault code. Common ones are:

Fault CodeMeaningLikely Cause
16#0001Connection timeoutNetwork cable, switch port or device power loss
16#0002Connection request errorIP address conflict or wrong module type in rack
16#0010Module hardware faultModule needs replacement or firmware update
16#0020Input channel faultOpen-circuit on input wiring, blown fuse on sensor supply
16#0100Output short circuitShorted load, overcurrent on output channel
Common Logix I/O module fault codes and their most likely field causes.

Step 6: Use Forces Only as a Last Resort

Forcing a tag means overriding what the PLC logic writes to it and jamming it to a fixed value. It is useful for isolating whether a fault is in the logic or the field device, but it comes with real risk. If you force an output on, the machine moves. People can get hurt.

Always confirm machine is in a safe state before applying forces. In Studio 5000, forces are enabled in two steps: first enable forces (a global switch), then set the individual force value. The controller shows 'Forces Enabled' in the status bar. Never leave forces active and walk away. Remove and disable all forces before handing the machine back to production.

The legitimate use for forces is: force an input tag true to simulate a sensor that you cannot physically actuate safely, then watch whether the downstream logic responds correctly. If it does, the fault is in the sensor or its wiring, not the logic. If it does not, the fault is in the logic and you continue the rung walk.

A Real Troubleshooting Example

Here is a scenario I have seen more than once. A pick-and-place arm is not extending. The operator says the start button does nothing. Online monitoring reveals the Arm_Extend_Sol output coil is false. Walking the rung backwards:

  1. XIC(Cycle_Active) is true. OK.
  2. XIC(Part_In_Position) is true. OK.
  3. XIO(Arm_Fault) is FALSE, meaning Arm_Fault is TRUE. That is the blocker.
  4. Cross-reference Arm_Fault: it is set by a rung that checks XIC(Arm_RetractLS_OK) which is false.
  5. The retract limit switch is not reading. Go to the I/O module: input channel 7 shows a channel fault (open circuit).
  6. Check the wiring: the 24 V supply wire to the limit switch has a broken ferrule inside the terminal. Crimp it, and the fault clears.

Total time: 12 minutes from symptom to repair. Without online monitoring, you might have swapped the solenoid valve, checked the pneumatic supply, tested the output module, all before finding a broken wire at a terminal block.

Ladder Rung: Interlock Fault Detection with Online Monitoring Tags

The rung below shows the arm extend logic from the example above in a form you can actually build and test. It includes the retract limit switch interlock, a fault latch on the rising edge of Arm_Fault, and an HMI acknowledge path. Go online with this in Studio 5000 and you will see exactly which contact is blocking the extend output.

Arm Extend Interlock with Fault Latch (Studio 5000 / Logix). Ladder logic (4 rungs): Rung 0: examine if Cycle_Active is on (XIC), then examine if Part_In_Position is on (XIC), then examine if Arm_RetractLS_OK is on (XIC), then examine if Arm_FaultLatch is off (XIO), then energize output Arm_Extend_Sol (OTE). Rung 1: examine if Arm_Extend_Sol is on (XIC), then examine if Arm_ExtendLS_OK is off (XIO), then TON on Arm_ExtendTimeout. Rung 2: examine if Arm_ExtendTimeout.DN is on (XIC), then examine if Arm_Fault_OS is on (XIC), then latch output Arm_FaultLatch (OTL). Rung 3: examine if Arm_FaultLatch is on (XIC), then examine if HMI_FaultAck is on (XIC), then examine if Arm_Extend_Sol is off (XIO), then unlatch output Arm_FaultLatch (OTU). Rung 1: Arm extends only if cycle is active, part is in position, retract LS is confirmed, and no fault latch is set. Online monitoring shows which of the four conditions is blocking. Rung 2: A TON starts when the solenoid fires but the extend LS has not confirmed. Rung 3: If the timeout expires, a one-shot sets the fault latch. Rung 4: The operator acknowledges via HMI and the latch clears once the solenoid de-energises. The fault latch tag is the key tag to watch in the Watch Window during diagnosis.

Arm Extend Interlock with Fault Latch (Studio 5000 / Logix)Ladder logic
Toggle inputs
Rung 0
Ladder logic rung: examine if Cycle_Active is on (XIC), then examine if Part_In_Position is on (XIC), then examine if Arm_RetractLS_OK is on (XIC), then examine if Arm_FaultLatch is off (XIO), then energize output Arm_Extend_Sol (OTE) examine if Cycle_Active is on (XIC), then examine if Part_In_Position is on (XIC), then examine if Arm_RetractLS_OK is on (XIC), then examine if Arm_FaultLatch is off (XIO), then energize output Arm_Extend_Sol (OTE) XIC Cycle_Active Cycle_Active Cycle_Active XIC Part_In_Position Part_In_Position Part_In_Position XIC Arm_RetractLS_OK Arm_RetractLS_OK Arm_RetractLS_OK XIO Arm_FaultLatch Arm_FaultLatch Arm_FaultLatch OTE Arm_Extend_Sol Arm_Extend_Sol Arm_Extend_Sol
Rung 1
Ladder logic rung: examine if Arm_Extend_Sol is on (XIC), then examine if Arm_ExtendLS_OK is off (XIO), then TON on Arm_ExtendTimeout examine if Arm_Extend_Sol is on (XIC), then examine if Arm_ExtendLS_OK is off (XIO), then TON on Arm_ExtendTimeout XIC Arm_Extend_Sol Arm_Extend_Sol Arm_Extend_Sol XIO Arm_ExtendLS_OK Arm_ExtendLS_OK Arm_ExtendLS_OK TON Arm_ExtendTimeout T#3s 0 TONTimerArm_ExtendTimeoutArm_ExtendTimeoutPresetT#3sT#3sAccum00
Rung 2
Ladder logic rung: examine if Arm_ExtendTimeout.DN is on (XIC), then examine if Arm_Fault_OS is on (XIC), then latch output Arm_FaultLatch (OTL) examine if Arm_ExtendTimeout.DN is on (XIC), then examine if Arm_Fault_OS is on (XIC), then latch output Arm_FaultLatch (OTL) XIC Arm_ExtendTimeout.DN Arm_ExtendTimeout.DN Arm_ExtendTimeout.DN OSR Arm_Fault_OS Arm_Fault_OS Arm_Fault_OS OSR OTL Arm_FaultLatch Arm_FaultLatch Arm_FaultLatch L
Rung 3
Ladder logic rung: examine if Arm_FaultLatch is on (XIC), then examine if HMI_FaultAck is on (XIC), then examine if Arm_Extend_Sol is off (XIO), then unlatch output Arm_FaultLatch (OTU) examine if Arm_FaultLatch is on (XIC), then examine if HMI_FaultAck is on (XIC), then examine if Arm_Extend_Sol is off (XIO), then unlatch output Arm_FaultLatch (OTU) XIC Arm_FaultLatch Arm_FaultLatch Arm_FaultLatch XIC HMI_FaultAck HMI_FaultAck HMI_FaultAck XIO Arm_Extend_Sol Arm_Extend_Sol Arm_Extend_Sol OTU Arm_FaultLatch Arm_FaultLatch Arm_FaultLatch U
energizedTip: click a contact in the diagram to flip its bit.
Rung 1: Arm extends only if cycle is active, part is in position, retract LS is confirmed, and no fault latch is set. Online monitoring shows which of the four conditions is blocking. Rung 2: A TON starts when the solenoid fires but the extend LS has not confirmed. Rung 3: If the timeout expires, a one-shot sets the fault latch. Rung 4: The operator acknowledges via HMI and the latch clears once the solenoid de-energises. The fault latch tag is the key tag to watch in the Watch Window during diagnosis.

Cross-Reference: The Feature Most Engineers Forget

Cross-reference (Ctrl+F in Studio 5000, Ctrl+Shift+F in TIA Portal) shows every rung that reads or writes a tag. This is non-negotiable for programs with more than a few dozen rungs. When you find a suspicious tag, cross-reference it immediately. You want to see:

  • Which routines write to the tag (these are the sources of the value).
  • Which routines read the tag (these are places affected by the fault).
  • Whether the tag is written in more than one place (a common source of unexpected overrides).
  • Whether an OTL/OTU pair exists and whether the unlatch rung is ever reaching its coil.

One specific gotcha: a tag written by a Move or Copy instruction in a periodic task will override whatever the ladder sets in the main task. If a tag looks right in the ladder but keeps resetting, cross-reference it and look for non-ladder writes. This catches about one in ten 'the logic is wrong' complaints that are actually configuration issues.

When Online Monitoring Is Not Enough

Online monitoring shows the current state. Intermittent faults that clear before you go online need a different approach. The best tool here is a data log or trend on the suspicious tags. In Studio 5000, the Logix Designer Trend tool lets you sample up to about 50 tags at scan rate. Set it running, wait for the fault to recur, then examine the trace. You will usually see the exact moment the tag changed and which tag changed first.

For intermittent sensor dropouts specifically, the sensor dropout counter ladder technique covered in the Intermittent Sensor Faults post is a good companion to the online monitoring workflow here. Both approaches together give you a complete picture.

If the fault is related to output wiring or whether the I/O module itself is healthy, check the module diagnostics in the I/O tree before pulling the module. A short-circuit on an output channel usually shows as a channel-level fault, not a module-level fault. Replacing the module when the real problem is a shorted solenoid coil does nothing except waste a spare.

Quick Reference: Online Troubleshooting Workflow

StepActionTool / Feature
1Check controller status and fault logStatus banner, Controller Properties > Faults
2Identify the output that is misbehavingI/O tree, HMI alarm, operator description
3Find the output coil rung via cross-referenceCtrl+F in Studio 5000
4Walk the rung backwards to find the blocking contactOnline ladder view, highlighted contacts
5Cross-reference the blocking tag to find its sourceCross-reference list
6Watch suspicious tags liveWatch Window / Tag Monitor
7Check I/O module diagnostics if a physical input/output is suspectModule Properties > Connection / Fault
8Use forces only in a safe state to isolate hardware vs logicForce Table (enable then set)
9Use trending for intermittent faultsLogix Trend, TIA Portal Trace, CODESYS Scope
Nine-step online monitoring troubleshooting workflow for PLC faults.

Related Blogs