Mike Dolt Enterprises Logo Mike Dolt Enterprises

Topic: Best Practices for Troubleshooting Intermittent PLC I/O Issues

User: lostintheether, Location: HongKong

Asked on: Tuesday, July 15, 2025 at 3:55 am EDT
Answered on: Tuesday, July 15, 2025 at 6:10 am EDT

Question: Hi all,I’m looking for some advice on troubleshooting intermittent I/O issues on PLC-controlled equipment. We have a production line where a few input signals randomly drop out for a split second, causing nuisance shutdowns that are hard to reproduce.So far, we’ve checked wiring and terminal connections, replaced a few suspect sensors, and even swapped input cards, but the issue still pops up occasionally.I’d like to know:Any tips for logging or isolating signal drops in real time?I’d really appreciate any insights or examples from similar experiences. These random faults can be such time-eaters!Thanks for your help in advance.

Okay, intermittent I/O problems are notoriously difficult to diagnose. Here's a comprehensive breakdown of troubleshooting strategies, logging techniques, and things to consider, based on similar experiences

1. Understanding the Problem & Gathering Data
Quantify the "Split Second"

Is it truly a split second (100ms or less)? Or is it closer to a half-second or a second? This is crucial for setting up logging parameters. Knowing the approximate duration of the drop-out helps filter out noise versus genuine errors.


Frequency

How often does it happen? Hourly? Daily? Weekly? A log, even a manual one, can help identify patterns.

Affected Devices

Specifically, which I/O points are affected? Is there any correlation between them? (e.g., are they on the same card, power supply, physically near each other?)


Environmental Factors

Does it seem to happen more often during certain times of the day? Consider temperature changes, humidity, machine vibration, nearby welding, etc.

Maintenance Logs

Review any recent maintenance activity, including wiring changes or equipment replacements. Sometimes, seemingly unrelated actions can introduce new problems.

2. Enhanced Logging & Monitoring (Key to Success)
PLC Data Logging



Circular Buffer

Implement a circular buffer within the PLC program to capture the state of the relevant input signals, along with a timestamp. This buffer constantly overwrites itself, but it stores the most recent X number of scans/seconds of data. When a fault occurs, you can review the buffer to see what happened just before, during, and after the drop-out.


Example (Simplified)

Let's say the faulty input is `I:0.0/0`. You'd create an array (e.g., `DINT[100]`) to hold timestamps, and another array (e.g., `BOOL[100]`) to hold the input state. Every scan, you'd shift the data in the arrays and update the newest element with the current timestamp and the value of `I:0.0/0`.

Triggering the Capture

The hardest part. You need to detect the "drop-out" event and trigger the freezing of the data. Possible triggers:


Direct Input Monitoring

If you know the normal state of the input (e.g., normally HIGH), monitor for a transition to the opposite state (LOW) for longer than a specific, brief, noise-filtering duration (e.g., 10ms).

Downstream Logic

If the input is used in some interlock logic that causes a specific action (e.g., a motor shutdown), you could trigger the logging based on that action. This might provide a clearer picture of
why the shutdown occurred.

Communication

Ideally, you'd want to upload the data from the circular buffer when the event is detected. This might involve a trigger bit that signals a SCADA system or an HMI to read the data. If no communication is available, at least ensure the buffer's data is retained on power loss (retentive memory).

PLC Timestamping

Use the PLC's built-in real-time clock (if available) for accurate timestamps. If the PLC doesn't have a great clock, consider synchronizing it with an NTP server if possible.


Sampling Rate

Determine an appropriate sampling rate. If the drop-out is a split second, you might need to sample every 1-10 milliseconds. This will affect PLC performance, so test thoroughly.

Data Format

Choose a data format that's easy to analyze (CSV is a common choice).


HMI/SCADA Logging

If you have an HMI or SCADA system connected to the PLC, configure it to log the relevant input signals at a high frequency. HMIs/SCADAs often have built-in trending capabilities that can be very useful. However, be aware of network latency; the timestamp in the HMI/SCADA might not perfectly reflect the PLC's real-time state.

External Data Loggers

For very fast events or situations where PLC performance is a concern, consider using an external data logger connected directly to the input signal. These loggers can capture data at very high rates (kHz or MHz) and are independent of the PLC. Oscilloscopes can be used too.


PLC Diagnostic Tools

Use the PLC vendor's diagnostic software to monitor the I/O card status, error codes, and any other relevant information. Some PLCs have built-in diagnostic tools that can help pinpoint the source of the problem.

3. Power Supply & Grounding
Power Supply Stability



Voltage Measurement

Use a multimeter to monitor the DC voltage supplying the PLC and the input devices. Look for voltage drops or fluctuations, especially during machine operation. A digital multimeter with a "min/max" recording function is very helpful.

Power Supply Loading

Check the loading on the power supply. Ensure that you are not exceeding its rated capacity.


Ripple

Use an oscilloscope to check for excessive ripple on the DC power supply.

Grounding



Ground Loops

Ensure proper grounding throughout the system. Avoid ground loops, which can introduce noise into the signals. A single, central grounding point is generally recommended.

Ground Wire Size

Make sure the ground wires are adequately sized to handle fault currents.


Ground Resistance

Measure the resistance of the ground connection at various points in the system. It should be as close to zero ohms as possible.

Shielded Cables

Properly ground the shields of all signal cables to prevent electromagnetic interference (EMI). Only ground one end of the shield (typically at the PLC).

4. Signal Integrity & Noise Reduction
Wiring Practices



Separation

Keep signal cables separate from power cables, especially AC power cables. Run them in separate conduits or cable trays.


Shielding

Use shielded cables for all critical input signals.

Cable Length

Minimize cable lengths to reduce signal degradation and noise pickup.


Cable Routing

Avoid running cables near sources of EMI, such as motors, transformers, and variable frequency drives (VFDs).

Termination

Ensure proper termination of all cables and connections. Loose or corroded connections can cause intermittent problems.


Cable Type

Use the correct type of cable for the application. For example, use twisted-pair cable for analog signals to reduce noise.

Noise Filtering



Input Filters

Use the PLC's built-in input filters to filter out high-frequency noise. Be careful not to set the filter time too long, as this can slow down the response time of the input.

External Filters

Consider using external filters (e.g., RC filters) on the input signals to further reduce noise.


Proximity Switches/Sensors



Shielding

Make sure the proximity switches/sensors are properly shielded and grounded.


Power Supply

Use a separate, clean power supply for the proximity switches/sensors.

Sensor Type

Consider using different types of sensors that are less susceptible to noise, such as fiber optic sensors.

5. Software Considerations
Debouncing

Even with hardware filtering, implement debouncing logic in the PLC program to prevent the PLC from reacting to spurious signals. A simple timer-based debouncing routine can be effective.

Fault Handling

Implement robust fault handling routines in the PLC program to gracefully handle the intermittent input drops. Instead of immediately shutting down the machine, consider using a timer to verify the fault condition before taking action.


Input Diagnostics

Add logic to the PLC program to monitor the input signals and generate alarms or messages when a drop-out is detected. This can help you track the frequency and duration of the problem.

6. Mechanical Issues & Vibration
Loose Connections

Vibration can loosen connections, especially in control panels and junction boxes. Retighten all connections regularly.


Cable Wear

Vibration can also cause cable insulation to wear through, leading to short circuits. Inspect cables for damage.

Sensor Mounting

Ensure that sensors are securely mounted and not vibrating excessively. Use vibration-dampening mounts if necessary.


Physical Interference

Check for anything physically interfering with the sensor's operation. For example, debris blocking a photoelectric sensor.

7. Step-by-Step Troubleshooting Approach
1. Start Simple

Revisit the basics. Double-check all wiring connections, sensor power supplies, and PLC input card status.2.

Isolate the Problem

If multiple I/O points are affected, try to isolate the problem to a specific area or device. Disconnect one input at a time to see if the problem goes away.3.

Simulate the Fault

If possible, try to manually simulate the fault by disconnecting the input signal. This can help you verify that the PLC is responding correctly. Use an oscilloscope or logic analyzer on the input if you can manually simulate the dropout.4.

Monitor Continuously

Use the logging techniques described above to continuously monitor the input signals. Be patient; it may take some time to capture the fault.5.

Analyze the Data

Once you have captured the fault, analyze the data to identify the cause. Look for patterns, correlations, and anomalies.6.

Implement Corrective Action

Once you have identified the cause, implement the appropriate corrective action. This may involve replacing a faulty sensor, fixing a wiring problem, or improving the grounding.7.

Verify the Solution

After implementing the corrective action, monitor the system to verify that the problem has been resolved.

Example Scenario & Troubleshooting Steps


Let's say you have a proximity sensor that detects the presence of a part on a conveyor belt. The sensor's signal is intermittently dropping out, causing the conveyor to stop.1. Initial Checks

Visually inspect the sensor, wiring, and connections. Check the sensor's power supply voltage. Verify that the sensor is properly aligned and mounted.2.

Logging

Implement a circular buffer in the PLC to log the sensor's input state and a timestamp. Set the sampling rate to 10 milliseconds. Configure the logging to trigger when the sensor's input goes low.3.

Data Analysis

After capturing the fault, analyze the logged data. Look for the duration of the drop-out. Look for any patterns or correlations with other events.4.

Possible Causes & Solutions



Cause

Noise on the sensor's power supply.

Solution

Install a filter on the sensor's power supply.


Cause

Vibration causing the sensor to lose contact.

Solution

Securely mount the sensor with vibration-dampening mounts.


Cause

EMI from a nearby motor.

Solution

Reroute the sensor's cable away from the motor or use shielded cable.


Cause

Sensor failure due to mechanical wear.

Solution

Replace the sensor.

Important Considerations



Documentation

Keep detailed records of all troubleshooting steps, findings, and corrective actions. This will help you track progress and avoid repeating the same mistakes.

Safety

Always follow proper safety procedures when working with electrical equipment. De-energize the equipment before performing any wiring or component changes.


Expert Assistance:
If you are unable to resolve the problem on your own, consult with a qualified electrician or PLC technician.By systematically following these steps and using the appropriate tools and techniques, you should be able to diagnose and resolve even the most challenging intermittent I/O problems. Good luck! Flag for review

Previous Question View on the official Mike Holt Forum Next Question