Troubleshooting
Sensor LED Is On but the PLC Input Is Off: PNP vs NPN Wiring
The sensor LED lights, the PLC input does not. Nine times out of ten the sensor and the input card disagree about which way current flows.
The symptom
You install a new inductive proximity sensor. Hold a steel target in front of it and its yellow LED turns on, but the PLC input LED and the tag stay off. Swap in an identical sensor and you get the same result.
The sensor works. What fails is the interface between sensor and card.
How current must flow
A digital input only turns on when current flows through it, and there are two conventions for making that happen.
A PNP (sourcing) sensor connects its output wire to +24 V when it is active. It needs a sinking input card whose common goes to 0 V. This is the European default.
An NPN (sinking) sensor connects its output wire to 0 V when it is active. It needs a sourcing input card whose common goes to +24 V. It is common on older Asian machines.
Put a PNP sensor on a card whose common is wired to +24 V and both ends of the input sit at 24 V when the sensor fires. Zero volts across the input means zero current, so the input stays off while the sensor's own LED lights up as if all were well.
Measuring it in two minutes
Set your meter to DC volts.
If Step 2 is right and Step 3 reads near 0 V, the common is on the wrong rail for this sensor type.
Fixes, from best to worst
Never "fix" it by jumping the input directly to 24 V to test the program and then leaving the jumper in. That removes the machine's real feedback.
The opposite symptom: input flickers or stays on
A 2-wire sensor leaks a small current when off, often 0.5–1.5 mA. On a sensitive input that is enough to read as ON or to flicker. Check the card's OFF-current limit in the datasheet, and if the leakage exceeds it, add a bleeder resistor across the input.
Program-side check
Once the wiring is correct, confirm the program uses the right sense. A sensor shown as "normally open" in the drawing should map to PartPresent := %I0.3;. If you inverted it in code to compensate for a wiring error, take that inversion out after you fix the wiring, or the next technician will be left confused.
The hardware chapter on presence sensors covers the full signal picture.
Frequently asked questions
Can I use an NPN sensor on a PNP input card?
Not directly. Use a card that accepts both polarities with the common moved, an interface relay, or a polarity converter. The usual fix is to order the matching sensor type.
Why does my sensor LED light but the input stays off?
The sensor switches correctly but the input card common is on the wrong supply rail for that sensor type, so no current flows through the input. Measure the voltage between the input terminal and the card common.