Key takeaways
- Use the model label or manufacturer datasheet as the source of truth; wire colors alone are not enough.
- A common 3-wire DC convention is brown for positive supply, blue for 0 V and black for the switching output.
- Match a PNP or NPN sensor to the PLC input circuit and its common connection before applying power.
- Two-wire devices are connected in series with the load and must be checked for leakage current and voltage drop.
Proximity switches detect an object without mechanical contact and are widely used for position confirmation, counting and machine interlocks. The wiring method depends on the exact sensor model, supply voltage, output circuit and connector pinout. Isolate the circuit before installation and verify every terminal against the manufacturer documentation.
Start by identifying the sensor
Read the complete part number and wiring diagram on the sensor body or datasheet. Confirm whether the device is AC or DC, how many conductors it uses, whether the output is PNP or NPN, and whether the switching function is normally open (NO), normally closed (NC), or complementary.
Common conductor arrangements
| Sensor type | Typical conductors | What to verify |
|---|---|---|
| 2-wire AC or DC | Supply and switched current share two conductors | Voltage rating, polarity where applicable, leakage current and load range |
| 3-wire DC | Brown: L+ · Blue: M/0 V · Black: output | PNP or NPN output and PLC input common |
| 4-wire DC | Supply pair plus two output conductors | Exact pinout; the second output may be NC, complementary or model-specific |
PNP and NPN: what changes at the PLC input
A PNP output sources current to the input when active. An NPN output sinks current toward 0 V when active. The PLC input module must be wired with the compatible common reference; otherwise the input may stay off, behave unpredictably or create a fault.
Typical 3-wire DC input arrangements
Active output sources current into the PLC input.
Active output sinks current from the PLC input.
How a 2-wire sensor is connected
A 2-wire proximity sensor is normally placed in series with the load, so the same two conductors provide operating power and carry the switched current. Even in the off state, a small leakage current may remain; in the on state, the sensor also introduces a voltage drop. Both values must suit the connected PLC input, relay or load.
What a fourth wire usually means
Many four-wire sensors provide two switching outputs, often NO and NC or complementary outputs. Some models use the additional conductor for a different function. Treat the datasheet connection diagram—not a generic color chart—as authoritative.
A safe connection checklist
- 01
Record the full model number
Include suffixes, connector type and cable version; visually similar sensors can have different outputs.
- 02
Confirm electrical ratings
Check AC/DC supply, operating voltage, maximum load current, voltage drop and leakage current.
- 03
Match the input circuit
Verify PNP/NPN compatibility and the PLC input common before landing the output conductor.
- 04
Wire with power isolated
Use the documented terminal or pin assignment, then inspect polarity, grounding and protective devices.
- 05
Test the switching state
Restore power under the site procedure and confirm the sensor indicator and PLC input change together.


