The Sensor That Didn’t Work (Sinking vs Sourcing)
We wired a proximity sensor (article 108) to a PLC input. The sensor worked (it detected the part). But the PLC input didn’t see it (stayed off). The problem: the sensor’s output type didn’t match the PLC’s input type. The sensor was PNP (sourcing, +24V to the input). The PLC input was NPN (sinking, expects 0V). They didn’t match (the sensor sourced +24V, the input sank 0V). We either switched the PLC input (to PNP) or used an NPN sensor. We switched the PLC input (a DIP switch on the input card, to PNP). The input saw the sensor. The mistake was not matching the sensor’s output (PNP/NPN) to the PLC’s input.
PLC sinking vs sourcing matches the sensor to the input. This article covers the basics.
The Two Types
PNP (Sourcing)
A PNP sensor sources +24V to the input (when triggered). The PLC input (PNP) expects +24V (it sinks to 0V). Common in Europe/Asia. The sensor wires: brown (+24V), blue (0V), black (signal, +24V when on).
NPN (Sinking)
An NPN sensor sinks 0V to the input (when triggered). The PLC input (NPN) expects 0V (it sources +24V). Common in the US. The sensor wires: brown (+24V), blue (0V), black (signal, 0V when on).
| Type | Signal (on) | Common |
|---|---|---|
| PNP (sourcing) | +24V | Europe/Asia |
| NPN (sinking) | 0V | US |
Step 1: Match the Sensor to the PLC
The sensor’s output (PNP or NPN) must match the PLC’s input card. If the PLC input is PNP (it expects +24V), use a PNP sensor (it sources +24V). If NPN, use an NPN sensor. Most PLC input cards are switchable (a DIP switch, or a jumper). Check the card’s type (PNP, NPN, or universal).
The matching rule: PNP sensor → PNP input. NPN sensor → NPN input. The sensor that didn’t work was PNP on an NPN input (mismatch). Switch the card (or the sensor). Don’t mix (the input won’t see the signal).
Step 2: The Common (COM)
The PLC input card has a COM terminal. For PNP, the COM is 0V (the sensor sources +24V to the input, which returns to COM=0V). For NPN, the COM is +24V (the sensor sinks 0V to the input, which sources +24V from COM). Wire the COM correctly (per the type).
Step 3: The Wiring Color (Article 190)
The sensor’s wires: brown (+24V), blue (0V), black (signal). Wire them correctly (brown to +24V, blue to 0V, black to the input). A reversed brown/blue (power) damages the sensor (it doesn’t work). Use the colors (article 190).
Step 4: Sourcing Outputs (PLC to Valve)
The same logic applies to PLC outputs (to a valve, article 90). A PNP output sources +24V (to the valve). An NPN output sinks 0V. The valve (a solenoid, article 90) has a type (PNP or NPN). Match the output to the valve.
A Wiring Checklist
- Is the sensor PNP or NPN?
- Is the PLC input PNP or NPN?
- Do they match? (PNP→PNP, NPN→NPN?)
- Is the COM wired correctly? (0V for PNP, +24V for NPN?)
- Is brown +24V? (Blue 0V? Black signal?)
- Is the input LED on? (When the sensor triggers?)
- Does the PLC see it? (Monitor?)
- For outputs: PNP/NPN to the valve?
- Is the common right? (Article 169?)
- Is the cable shielded? (Article 166?)
The Bottom Line
PLC sinking vs sourcing matches the sensor (PNP/NPN) to the input. The sensor that didn’t work was PNP on NPN. Match them. Wire the COM correctly. Use the colors (article 190). The input that saw the sensor wasn’t the best sensor — it was matched.