Sensors Edge Hub Logo
How to Wire NPN and PNP Proximity Sensors to a PLC
Industrial Sensors · 5 min read · Mar 23, 2026 · By Rihards Niparts

How to Wire NPN and PNP Proximity Sensors to a PLC

NPN and PNP describe opposite output actions. A PNP output sources positive voltage and pairs with a sinking PLC input. An NPN output sinks current toward 0 V and pairs with a sourcing PLC input. That is the complete universal rule supported by this article's research packet.

TL;DR: Identify the sensor output and PLC input from their exact documentation. Pair PNP with a sinking input and NPN with a sourcing input. Do not assume wire colors, common-terminal polarity, voltage limits, leakage values, or configurable behavior from a generic diagram. Those details belong to the specific sensor and input-module manuals.

This guide provides a compatibility and documentation workflow, not a universal terminal-by-terminal recipe for every proximity sensor and PLC card.

What is the difference between NPN and PNP outputs?

A PNP output switches positive voltage to the load and sources current. It needs a sinking input to complete the current path. An NPN output switches the load toward 0 V and sinks current. It needs a sourcing input.

Sensor output What the output does Required PLC input
PNP Sources positive voltage Sinking input
NPN Sinks toward 0 V Sourcing input

This pairing is grounded by Industrial Monitor Direct's sourcing and sinking overview.

This model describes current direction without claiming to describe the protected output circuit inside every industrial sensor. It does not establish transistor drive details, supply ranges, voltage drops, load limits, or off-state leakage.

How do you connect the right sensor to the right PLC input?

Use the documents as a matched pair:

  1. Find the exact sensor order number and its manufacturer datasheet.
  2. Confirm whether the selected output is PNP or NPN.
  3. Find the exact PLC input-module order number and its wiring diagram.
  4. Confirm whether that input is sinking or sourcing.
  5. Match PNP to sinking, or NPN to sourcing.
  6. Follow the documented pin, terminal, supply, common, and protection requirements for those exact products.
  7. Check the completed circuit using the manufacturers' commissioning procedure.

This practical wiring method rejects one dangerous shortcut: treating a generic color or terminal convention as proof. A wrong assumption can damage equipment or produce an unexpected input state.

Why does the exact wiring diagram matter?

A generic NPN/PNP label does not tell you the sensor's connector pinout, cable colors, number of outputs, protective circuitry, operating limits, or inactive behavior. It also does not tell you the PLC module's terminal assignments, input thresholds, commoning, isolation, or configurability.

The packet does not support claims that brown, blue, black, or white always serve particular functions, or that a PLC common must connect to a particular rail. These may be familiar conventions, but installation instructions must come from the exact product documents.

The same limit applies to brand shorthand. Claims about Siemens, Allen-Bradley, Mitsubishi, or any named input family require the exact module manual. The companion Siemens versus Allen-Bradley input-card guide explains why a brand convention is not a module specification.

What about two-, three-, and four-wire sensors?

Wire count alone does not establish a safe connection. The packet does not ground universal claims about series topology, complementary outputs, safety monitoring, voltage drop, leakage current, minimum load, or preferred use for two-, three-, or four-wire devices.

Count the conductors only to identify the cable in front of you. Then use the exact wiring diagram to determine what each conductor or pin does. If the device offers more than one output, confirm each output's type and function rather than assuming a standard arrangement.

For a broader device-category discussion, see two-wire versus three-wire versus four-wire sensor wiring, but keep the product manual open when making a connection.

What should you do when the types do not match?

Stop and confirm the mismatch before energizing the circuit. The generic rule can identify incompatibility—PNP needs sinking; NPN needs sourcing—but it does not select the remedy.

A relay, signal converter, replacement sensor, replacement input module, or configuration change may be possible in a particular design. This packet does not establish that any one of those choices is compatible, safe, or cost-effective. Choose only a remedy supported by the exact hardware documentation and the machine's design requirements.

Do not predict the symptom from polarity alone. An input that is always OFF, inverted, falsely ON, or apparently normal can depend on the actual input topology, output protection, grounding, and leakage paths.

What should you verify before power-up?

Use a short, product-specific record:

  • exact sensor and input-module order numbers;
  • sensor output identified as PNP or NPN;
  • module input identified as sinking or sourcing;
  • compatible pairing confirmed;
  • terminal and pin assignments copied from the current manuals;
  • electrical limits checked between the two documents; and
  • commissioning steps taken from the manufacturers' instructions.

This product-specific record lets another technician trace every connection to the installed hardware, unlike a generic field diagram.

Frequently Asked Questions

What does PNP mean in this wiring decision?

The output sources positive voltage. It must feed a sinking input.

What does NPN mean in this wiring decision?

The output sinks current toward 0 V. It must connect to a sourcing input.

Can I identify the wiring by conductor color?

Not from this research packet. Use the exact product pinout or cable diagram. Do not treat a common color convention as a universal installation instruction.

Can I determine compatibility from the PLC brand?

No. Compatibility belongs to the exact module. Verify its wiring diagram and electrical specifications.

Is PNP inherently safer or more reliable than NPN?

This packet does not establish that comparison. Safety and failure behavior depend on the complete circuit and safety architecture, not the output label alone.

Conclusion

PNP sources into a sinking input; NPN sinks from a sourcing input. Wire every product-specific detail—colors, terminals, commoning, voltage limits, diagnostics, mismatch behavior, and remedies—from the two exact manuals, not from a regional habit or generic diagram.

What is the difference between NPN and PNP proximity-sensor outputs?
A PNP output sources positive voltage and must pair with a sinking PLC input. An NPN output sinks current toward 0 V and must pair with a sourcing PLC input.
How do you wire an NPN sensor to a PLC?
First confirm that the exact sensor has an NPN output and the exact PLC module has a compatible sourcing input. Then follow both manufacturer wiring diagrams for supply, signal, common, and terminal assignments; this packet does not ground universal wire colors or terminal voltages.
How do you wire a PNP sensor to a PLC?
First confirm that the exact sensor has a PNP output and the exact PLC module has a compatible sinking input. Then follow both manufacturer wiring diagrams rather than assuming wire colors, common polarity, or terminal assignments.
Can I use an NPN sensor with an input intended for PNP outputs?
The generic pairing rule says no: an NPN output needs a sourcing input. Any proposed relay, converter, or reconfiguration is device-specific and must be supported by the exact product documentation.