1. Introduction: Why Does “Inversion” Happen? Inversion Is Not a Sensor Failure—It’s a Misalignment of Conventions
NPN vs PNP sensors differ in how their outputs switch current, while NO vs NC defines when the output turns on. For typical 24 VDC PLC inputs, PNP sensors connect to sinking inputs and NPN sensors connect to sourcing inputs. If a signal appears reversed, first verify electrical compatibility, then check switching mode and PLC program logic.

This kind of “inversion” often does not come from sensor detection failure; it comes from a mismatch between the output logic definitions and the PLC input logic definitions. Discrete outputs include at least two layers of meaning:
• NPN/PNP: These are two different output modes (output polarity/drive mode). They determine how the sensor switches current and which PLC input circuit it can work with. The PLC input bit also depends on the input module and wiring.
• NO/NC: These describe whether the output is ON or OFF when the sensor is triggered or not triggered. For transistor-output sensors, NO and NC describe switching behavior rather than a physical mechanical contact.
For ultrasonic sensors (for example, the ISUB100 series), detection itself may be working correctly; however, if the PLC-side reading convention is reversed, it will create a fault that looks like inversion.
The core engineering approach is: make the output logic a verifiable mapping relationship—confirm NPN/PNP, NO/NC, and match them to the PLC DI common terminal type.
2. First, Separate Two Things Clearly: What NPN/PNP Determines vs. What NO/NC Determines
When integrating a discrete sensor into a PLC DI, be sure to break down the “output definition” into two layers and understand them separately:
• NPN/PNP solves how the electrical side sends the signal to the PLC.
• NO/NC solves what contact state the output presents on the logic side when not triggered vs. triggered.
An incompatible NPN/PNP output and PLC input is an electrical compatibility issue and may prevent the input from operating correctly. Separately, the NO/NC behavior or PLC program logic may be opposite to the intended application logic.

2.1 NPN/PNP: Determines “How the Output Works With the PLC DI Common Terminal”
NPN and PNP describe how the sensor output switches current. A PNP output sources current and typically connects to a sinking PLC input with COM connected to 0 V. An NPN output sinks current and typically connects to a sourcing PLC input with COM connected to +24 V. Check the sensor and PLC module manuals to confirm compatibility and wiring. A mismatch is an electrical compatibility issue; it does not reliably produce an inverted signal.

2.2 NO/NC: Determines the Contact Logic in the “Not Triggered / Triggered” States
NO and NC describe the output switching behavior:
• NO (Normally Open): The output is normally OFF when the sensor is not triggered and turns ON when triggered.
•NC (Normally Closed): The output is normally ON when the sensor is not triggered and turns OFF when triggered.
For transistor-output sensors, ON and OFF describe the electronic switching state, not a mechanical contact. The exact meaning of “triggered” depends on the sensor model and its configured switching mode.
3. Use a “Logic Mapping Table” to Establish the Relationship
To avoid “the wiring is correct but the logic is reversed,” the most effective engineering method is to convert the sensor output definitions (NPN/PNP + NO/NC) together with the PLC DI input common terminal type (common positive / common negative) into the same judgment convention—meaning:when the object is in position / triggered and when the object is not in position / not triggered, verify both the sensor output state and the raw PLC input bit for the triggered and not-triggered conditions. Do not assume that a low voltage at the sensor output always means a PLC input bit of 0.
| Output Type | Switch Logic | Output when Untriggered | Output when Triggered | Raw DI when Untriggered | Raw DI when Triggered |
|---|---|---|---|---|---|
| PNP | NO | OFF | ON | 0 | 1 |
| PNP | NC | ON | OFF | 1 | 0 |
| NPN | NO | OFF | ON | 0 | 1 |
| NPN | NC | ON | OFF | 1 | 0 |
The table above assumes a properly powered sensor, compatible sensor output and PLC input, correct wiring, and a raw PLC input bit without software inversion. An NPN/PNP mismatch is an electrical compatibility issue and may prevent the input from operating correctly; it does not reliably invert the signal. Always verify the current path and consult the sensor and PLC module manuals.
3.1 How to Use This Table to Identify the Cause of the “Inversion”
• First, confirm whether the PLC DI is in Case A or Case B: check whether COM connects to common positive (+24V) or common negative (0V).
• Then determine the sensor output combination: NPN/PNP + NO/NC.
• Match the input value (1 or 0) that the table indicates should be read for in position / triggered. If it is opposite to the field behavior, it usually means that at least one definition is not aligned—most commonly:
o an incompatible NPN/PNP output and PLC input, which may prevent correct electrical operation;
o the NO/NC switching behavior or the PLC program logic is opposite to the intended application logic.
4. PLC Wiring and Input Common Terminal: Where Inversion Usually Happens
“Inversion” does not come from a single independent parameter; it usually occurs during the stage where signal definitions are cross-translated: when the PLC-side input common terminal convention does not match the sensor-side output effective current flow direction / polarity convention, or when the contact (NO/NC) selection is opposite to the definition of what “triggered = valid” means. Especially when connecting a 3/4-wire sensor to PLC DI, the input common (COM) connection helps determine whether the sensor output and PLC input are electrically compatible. It does not by itself determine whether the application logic is inverted.
In addition, the following engineering changes also often cause inversion to appear or be “triggered,” for example: replacing the PLC input module (different modules have different valid definitions / display methods), replacing isolated/expansion I/O, or during maintenance, changing only the wiring without synchronously confirming that the sensor version (NPN/PNP, NO/NC) and the PLC DI common terminal settings remain consistent.

First check the PLC input circuit and COM connection. For typical 24 VDC inputs, an NPN sensor is paired with a sourcing input, commonly with COM connected to +24 V, while a PNP sensor is paired with a sinking input, commonly with COM connected to 0 V. When the correctly matched sensor output turns ON, the raw PLC input bit will typically be 1. Confirm the actual behavior using the module manual and an on-site test.
5. Validation and Troubleshooting Workflow

It is recommended to turn troubleshooting into a reusable step checklist to reduce repeated trial-and-error wiring: 1.Confirm the PLC DI common terminal type (common positive / common negative). Follow terminal labeling or the module manual. 2.Confirm whether the sensor output version is NPN or PNP. 3.Confirm whether the output contact logic is NO or NC. 4.Refer to the mapping table in Section 3 and verify the valid level (high/low) that should be read for PLC DI in the states in/triggered and not in/not triggered. 5.Field quick verification: observe whether the PLC input indicator / program read value matches the table in both in-position and not-in-position conditions. 6.If inversion is found, first adjust “logic alignment” (by switching NO/NC or replacing the corresponding polarity version / common terminal matching) to avoid repeated trial wiring and continuous reliance on PLC program inversion.
6. Conclusion: The shortest rule to avoid inversion
To reduce wiring and logic errors, verify three things separately: NPN/PNP electrical compatibility, NO/NC switching behavior, and the PLC application logic. Confirm the expected raw input bit in both triggered and not-triggered conditions, and document any intentional program inversion.
FAQ
Q1: I wired it correctly, but it’s still inverted. What is the most likely item that wasn’t aligned?
A1: First verify electrical compatibility and wiring using the sensor and PLC module manuals. Then check the sensor’s NO/NC behavior and compare the raw PLC input bit and program logic with the intended application state.
Q2: The same position is inverted when moving to another station—why?
A2: Check whether the two stations use different PLC input modules, COM wiring, sensor output versions, NO/NC settings, or PLC program logic. Verify electrical compatibility first, then compare the raw input bit and the application logic at both stations.
Q3: After SET learning / debugging, the inversion becomes more obvious. Is that reasonable?
A3: Teaching or adjustment can change the switching point or detection window. If the signal changes repeatedly near a boundary, check the taught settings, hysteresis, target stability, and response time. This is different from a consistently inverted application signal. Teaching normally does not change the sensor’s NPN/PNP electrical output type.
Q4: If it is clearly inverted, can I simply invert it in the PLC program directly?
A4: Yes. If the sensor and PLC input are electrically compatible and the raw input is stable, program inversion can be a valid long-term design choice. Document the inversion and use clear variable names for both the raw input and the application state. Program inversion cannot fix an incompatible electrical connection and should not be treated as a safety measure.
Q5: How can I quickly confirm on site whether it is active-high or active-low?
A5: Observe the raw PLC input bit in both triggered and not-triggered conditions, and compare it with the sensor output state and module documentation. If voltage polarity matters, measure the output voltage relative to the correct reference point. A PLC bit of 1 or 0 alone does not necessarily establish whether the sensor output voltage is active-high or active-low.
Q6: If this is an interlock/safety-related point (requires fail-safe behavior), how should NO/NC be selected?
A6: Define the required safe state through a risk assessment and select appropriately rated sensors, input devices, diagnostics, and control architecture. An NC output alone does not make a sensing function fail-safe. Follow the applicable safety requirements and the device manufacturers’ instructions.
-
ISSRSensor 500mm High Precision Short Range Ultrasonic Distance Sensor|200kHz
-
ISSRSensor All-in-One Ultrasonic Sensor: 1m Range Level & Object Detect
-
ISSRSensor High-Precision Ultrasonic Label Sensor for Clear & Opaque Materials
-
ISSRSensor M12 Ultrasonic Double Sheet Detection Sensor
-
ISSRSensor Ultrasonic Double Sheet Sensor | Multi-Material Detection for Automation
-
ISSRSensor Ultrasonic Web Guiding Sensor Transducer 160kHz – Rectangular Edge Detection & Correction Probe
-
ISSRSensor F7J Economy Series Ultrasonic Sensor







