Skip to Content

Digital input not reading: NPN or PNP, step by step

Short answer: when the sensor works (its LED changes) but the PLC input does not, the cause is almost always the sensor type, the input common or the voltage level. Check in this order: sensor type, input type, wiring, voltage at the input, common reference and, last, the signal speed.

Download the checklist (PDF, 1 page)

Descarga la lista de comprobación (PDF, 1 página)

These checks work for any PLC or I/O module with digital inputs. At the end you will find the page for your PLC range.

The idea in one minute

A PNP sensor switches the positive supply to its output: it sources current. An NPN sensor switches its output to 0 V: it sinks current.

The PLC input has to be the opposite. A PNP sensor needs an input that returns the current to 0 V, and an NPN sensor needs an input referenced to the positive. If they do not match, the sensor LED changes but the input never sees the signal.

Six checks, in order

CheckWhat to doGood result
1. Sensor typeRead the label or the datasheet: PNP or NPN, NO or NCYou know the output type of the sensor
2. Input typeCheck in the PLC datasheet which sensors the input acceptsThe input type matches the sensor
3. WiringOn a 3-wire sensor: brown to +V, blue to 0 V, black to the inputEach wire in its place
4. Voltage at the inputMeasure between the input and its common, with the sensor on and offAbove the ON level with the sensor on, below the OFF level with it off
5. Common referenceCheck that the sensor supply and the input common belong to the same circuitOne common 0 V, or the input common wired as the datasheet says
6. SpeedCompare the pulse length with the time the program takes to read the inputPulses longer than the program cycle, or an interrupt or counter input

What the readings tell you

  • Sensor LED changes, input voltage does not: NPN sensor on an input for PNP sensors, or a wire in the wrong terminal.
  • Some volts with the sensor off: leakage current of a 2-wire sensor, or an input left floating. Use a 3-wire sensor or a load resistor as the sensor datasheet says.
  • Supply voltage at the input but the input stays off: input common not connected, or an input for another voltage range.
  • The input works but misses pulses: the signal is faster than the program cycle. Use an interrupt or a counter input.

If the input has never worked

  • Test the input without the sensor: on an input for PNP sensors, connect +V to the input with a wire. If the input switches, the problem is the sensor or its wiring.
  • NPN sensor and an input that only accepts PNP: change the sensor, or use an NPN to PNP converter or an interface relay.
  • Check that the program reads the right input. Pin names and switches depend on your PLC range.

Commenting is not enabled on this course.