What you'll learn
Industrial 3-wire DC proximity sensors normally use this IEC colour convention (always verify the device datasheet):
Lab time: ~12 minutes.
Lesson briefing
NPN / PNP Sensors — Sinking & Sourcing
Industrial 3-wire DC proximity sensors normally use this IEC colour convention (always verify the device datasheet):
- Brown (BN) — 24 VDC supply positive.
- Blue (BU) — 0 V / DC common.
- Black (BK) — signal output to the PLC input.
The supply wiring (BN and BU) is identical for both NPN and PNP sensors. The only difference is what the black wire does when the sensor detects a target. In the panel wiring that you add in this lab, use red for +24 V, blue for 0 V, black for signal/control, and green/yellow for PE. The brown/blue/black colours above describe the sensor's factory-fitted cable.
NPN — sinking output
When an NPN sensor is active, its output transistor connects the black wire to 0 V: it sinks current. A compatible sourcing PLC input supplies current through its input circuit and the NPN output to 0 V, so that input channel turns ON.
PNP — sourcing output
When a PNP sensor is active, its output transistor sources +24 V onto the black wire. A compatible sinking PLC input returns that current to 0 V, so the input channel turns ON. PNP sensors are common with modern positive-logic IEC control systems.
Wiring both onto the same PLC
This training PLC models X0 as a sourcing input for the NPN sensor and X1 as a sinking input for the PNP sensor. Both sensors share the same +24 V and 0 V distribution buses, and their black wires land on those separate channels.
A real fixed-common input module often cannot mix NPN and PNP devices in one common group. Use separate configurable input groups, a universal input module, or an interface relay as the manufacturer's wiring diagram requires. Never assume that a PLC "handles either" polarity automatically.
Practical tip: always read the sensor nameplate before wiring. A polarity mismatch can let the sensor LED operate while the PLC input never turns on. Also bond DC common to PE only when the machine's documented SELV/PELV and grounding design explicitly requires it.
Hints
Brown wire (+V terminal) always connects to the +24 V supply bus — this is true for both NPN and PNP sensors.
Sign up to unlock the full hint sequence.
Sign up to unlock the full hint sequence.
Sign up to unlock the full hint sequence.
This lesson uses 8 placed components on the lab canvas. Components are vendor-neutral (no proprietary trademarks); the wiring rules apply to any equivalent industrial part.
Sign up free to start
This foundation lab is included on Free — sign up takes a minute.
Sign up free to start →