Zhejiang Xinsenzheng Automation Co., Ltd.

Industrial Sensor Manufacturer OEM & Application Support Factory-direct Supply

PLC input and sensor wiring guide

PLC Sensor Input Explained: Sinking, Sourcing and Wiring

A PLC input works only when the sensor signal family, current direction, common terminal, switching thresholds and timing all agree. For a typical 24 VDC three-wire circuit, a PNP sourcing sensor pairs with a sinking PLC input; an NPN sinking sensor pairs with a sourcing PLC input. The module terminal diagram remains the final authority.

  • PNP and NPN current paths
  • PLC COM and input thresholds
  • Two-wire leakage and pulse timing
  • 4–20 mA and 0–10 V inputs

Quick answer

A correct PLC sensor input is a complete electrical path, not just a matching voltage label.

Before connecting a sensor, verify these five items on both data sheets. If any one is missing, a 24 V sensor can still fail to turn on the PLC channel, stay falsely on, invert the expected logic or miss a short event.

1

Signal family

Discrete DC, discrete AC, dry contact, 4–20 mA, 0–10 V or a smart interface must match the module.

2

Electrical limits

Rated voltage is not enough. Check ON and OFF voltage/current, input impedance and permissible range.

3

Current direction

Match PNP to a sinking input or NPN to a sourcing input unless the module explicitly supports both.

4

Logic and timing

NO/NC state, input filter, update method and program logic decide what the controller actually sees.

5

Physical wiring

Confirm terminal numbers, commons, loop power, cable pinout, grounding and the installation environment.

Work from the exact module diagram and the machine's electrical safety procedure.

De-energize before changing conductors. Energized measurement should be performed only by qualified personnel using an approved method and correctly rated instruments. Standard PLC input advice does not replace a safety PLC, safety input module or the validated safety circuit required for a protective function.

From field to logic

What happens between a sensor output and the PLC program?

The terminal LED is only one point in a longer signal path. Understanding each stage explains why a sensor can appear to switch while the controller tag does not.

STAGE 01

Field device

A sensor, dry contact or transmitter changes its output according to the detected condition.

STAGE 02

Terminal circuit

The module receives current or voltage through the channel and its shared or individual reference terminal.

STAGE 03

Threshold and filter

Hardware and configuration decide whether the electrical level is a valid ON or OFF state and whether it persists long enough.

STAGE 04

Input update

The result may enter a process image, update asynchronously, trigger an event or be read through another supported mechanism.

STAGE 05

Program use

The controller reads the mapped tag, then logic, inversion, interlocks and sequencing determine the machine response.

Important distinction: protection and electrical isolation vary by module. Some channels share isolation groups; some devices have different boundaries or no channel-to-channel isolation. Do not assume that every input owns a separate optocoupler or that an input module eliminates all ground, surge or wiring risks.

Industrial electrical control panel showing terminal blocks, relays and wiring
Input selection begins at the panel architecture, not at the sensor color or connector alone. Photo: Magda Ehlers / Pexels.

Choose the signal family first

Discrete, analog and smart sensor signals are not interchangeable.

A digital input interprets two electrical states. An analog input measures a changing electrical quantity and converts it to a value. A smart device such as an IO-Link sensor normally communicates through a compatible master rather than directly through a standard digital input. Identify this interface before selecting PNP, NPN or a common connection.

  • Discrete: confirms presence, position, limit, pressure switch state or another binary condition.
  • Analog: represents a continuous process value such as pressure, level, distance or temperature.
  • Smart communication: can carry process data, diagnostics and parameters through a supported master or network.
Field signal Required interface Typical use Verify before wiring
24 VDC PNP / NPN Compatible DC digital input Proximity, photoelectric, magnetic and pressure-switch outputs Input direction, COM, ON/OFF thresholds, load current and NO/NC behavior
Dry contact Digital input with an external or module-provided wetting supply Relay contact, mechanical limit switch, selector or auxiliary contact Contact rating, wetting current, bounce/filter and the module's approved circuit
DC two-wire sensor Compatible digital input and series load path Compact proximity switching with reduced conductor count OFF leakage, residual voltage, minimum load/current and polarity
AC discrete AC-rated digital input for the exact voltage/frequency AC switches, controls and installed plant circuits Nominal range, frequency, neutral/reference, leakage and electrical code requirements
4–20 mA Current analog input Long cable runs and process transmitters Two-, three- or four-wire device, active/passive input, loop power, burden and scaling
0–10 V Voltage analog input Shorter-run analog measurement and control Common reference, input impedance, shield/ground plan, source range and scaling
IO-Link IO-Link master or compatible port Process data plus parameter and diagnostic access Port class, cycle time, device description, cable and PLC/network integration

Follow the conventional current path

PLC input sinking vs sourcing: the names describe opposite sides of one circuit.

A field output and a PLC input complete the same current loop. One side supplies current and the other provides the return path. This is why a sourcing field output normally needs a sinking input, and a sinking field output normally needs a sourcing input.

Common 24 VDC arrangement

PNP sourcing sensor + sinking PLC input

When active, the PNP output delivers positive current toward the PLC channel.

+24 VDC
PNP sensor output
PLC input to 0 V COM
Expected module side: a sinking input, with its documented input common connected to 0 V for this arrangement.
Alternative 24 VDC arrangement

NPN sinking sensor + sourcing PLC input

When active, the NPN output provides a path from the PLC channel toward 0 V.

+24 V input COM
PLC input channel
NPN output to 0 V
Expected module side: a sourcing input, with its documented input common connected to +24 V for this arrangement.

Do not infer the connection from a product name alone. Some input modules are fixed as sinking or sourcing, some accept both polarities, and some provide separate commons for groups of channels. Vendor terminology can also be presented from different viewpoints. Match the current path shown on the sensor output circuit to the exact PLC terminal diagram. The conventional pairing above is confirmed by AutomationDirect's official wiring explanation.

Planning aid

Select the field signal to see the PLC-side questions that must be answered.

This tool identifies the normal compatibility route. It does not override the wiring diagram, channel specification or local electrical requirements for the actual equipment.

What comes from the field device?

Choose the output or signal type printed on its data sheet.

Normal compatibility route
Sinking 24 VDC digital input
  • Reference or commonInput COM normally returns to 0 V.
  • Critical proofVerify the PNP output can deliver the module's required ON current and voltage.
  • Do not confuseNO or NC describes switching logic, not whether the transistor is PNP or NPN.
Read the related wiring guide →

Three-wire DC sensors

Power conductors and the switched output perform different jobs.

A typical three-wire DC proximity or photoelectric sensor has two conductors for power and one conductor for the output. Brown for positive supply, blue for 0 V and black for output is a widely used convention and appears on many industrial sensor diagrams, but it is not permission to wire by color alone. Confirm the exact model label, cable diagram or connector pinout.

Brown Common convention: positive DC supply
Blue Common convention: 0 V supply return
Black Common convention: switched output
PNP / NPN = current direction NO / NC = output state logic

A sensor can therefore be PNP normally open, PNP normally closed, NPN normally open, NPN normally closed or provide complementary outputs. Review the NO vs NC sensor output guide separately from the transistor type.

Two XSZ compact square photoelectric sensors with attached cables
Sensor power and output conductors must be matched to the exact PLC input circuit. Product image: XSZ Sensor.

A rated value is not a switching threshold

A 24 VDC input does not simply change state at exactly 24 V.

Digital inputs define regions that count as logic ON and logic OFF. Between those regions, behavior may not be guaranteed. Input current matters as well as terminal voltage, so a high-impedance meter reading alone cannot prove that the module is receiving a valid ON signal.

Input ON level

Minimum valid voltage and current

The sensor must keep the channel above the specified ON requirements under real cable, load and temperature conditions.

Input OFF level

Maximum residual voltage and current

Leakage through a sensor, suppressor or shared circuit must remain below the module's guaranteed OFF limits.

Channel load

Input impedance and current demand

The module presents an electrical load. Confirm the field output can drive it without exceeding its own output rating.

Grouping

Common and isolation arrangement

One COM may serve several channels, separate groups or a configurable polarity. Read the terminal allocation carefully.

15 V / 2.5 mA Published logic-1 example, not a universal PLC value

The Siemens SM 1221 DI 8x24 VDC sink/source module, for example, publishes a logic-1 value of 15 VDC at 2.5 mA and a logic-0 value of 5 VDC at 1 mA. Other modules differ. The useful lesson is not to copy those numbers; it is to locate the equivalent thresholds for the exact catalog number in use. See the official Siemens module data.

DC two-wire compatibility

A two-wire sensor can look like a simple switch, but it still needs operating current.

Because power and switching share the same two conductors, many DC two-wire sensors pass a small current while OFF and retain some voltage while ON. Compatibility therefore depends on the sensor and PLC input as a pair. A channel that works with a dry contact is not automatically suitable for every two-wire electronic sensor.

VON ≤ VSUPPLY - VRESIDUAL

The PLC must still receive enough voltage after the active sensor's residual voltage is subtracted.

IINPUT, OFF ≥ ILEAK

The input path must tolerate the sensor's OFF-state leakage without falsely crossing its ON threshold.

IINPUT, ON within sensor load range

The ON-state current must satisfy the PLC input while remaining within the sensor's permitted load current.

There is no universal bleeder resistor value. If leakage keeps an input on, use only the sensor or module manufacturer's approved countermeasure and calculation. Check resistor power, heat, OFF voltage and total current. OMRON publishes this compatibility method and model-specific examples in its proximity sensor precautions and E2E technical catalog.

Short events and delayed states

An input filter can reject noise and also reject the pulse you wanted to count.

A configured OFF-to-ON filter typically requires the signal to remain continuously active for the selected time before the module reports ON. The ON-to-OFF filter performs the corresponding test when the signal returns. Hardware delay, module update, network timing, controller task rate and program logic can add further limits.

Planning check only. Enter values from the module configuration and the shortest real target pulse/gap, including speed variation.

FILTER WINDOW PASSES

Both states persist longer than their configured filters.

The filter alone would not reject these example states. Confirm sensor response, hardware delay, input update and task timing before approving the count.

1. Sensor response

Detection becomes output

Response and release times depend on the sensor model and operating conditions.

2. Input qualification

Electrical state is filtered

The input must cross its threshold and remain valid for the configured period.

3. Data update

Module reports a state

Local process-image updates, immediate reads, events and remote I/O use different timing models.

4. Program execution

Logic acts on the tag

Task period, priority, latching and downstream logic determine whether the event is retained.

Rockwell Automation documents separate OFF-to-ON and ON-to-OFF input filters and notes that the state must remain continuous for the configured time. Its Logix documentation also explains that I/O updates can occur asynchronously to program execution. Use the timing model for your controller family rather than assuming every input is copied only once per scan. Review the official filter description.

Analog sensor inputs

For 4–20 mA and 0–10 V, identify who supplies the signal and where the reference returns.

Analog input wiring is not a scaled-up digital connection. The number of transmitter conductors, whether the input supplies loop power, common-mode limits, input burden, grounding and channel configuration all affect the circuit. Use the exact transmitter and analog module diagrams together.

4–20 mA current loop

Current signaling is often selected for industrial runs because the measured quantity is loop current rather than a voltage referenced only at the transmitter.

  • Confirm whether the transmitter is loop-powered or separately powered.
  • Confirm whether the PLC channel is an active or passive current input.
  • Add supply, transmitter and wiring voltage drops; stay within loop compliance.
  • Check input burden, channel common and isolation grouping.
  • Configure engineering scaling and any supported underrange or wire-break diagnostics.

0–10 V voltage signal

Voltage inputs can be straightforward, but voltage drop, reference differences and coupled noise can alter the value that reaches the module.

  • Verify source and input ranges, including overrange limits.
  • Confirm the signal common and permitted common-mode voltage.
  • Check the source can drive the module's input impedance.
  • Plan cable route, shield termination and grounding for the installation.
  • Configure scaling, filtering and fault behavior for the process requirement.
Two-wire transmitter

Power and signal share the loop. The circuit needs a compatible loop supply and current input arrangement.

Three-wire transmitter

Power and signal share a reference but use separate positive/output conductors. Follow the exact commoning diagram.

Four-wire transmitter

The device has separate power and signal conductors. Determine whether the output and input are active or passive.

The 4 mA live zero is useful, but it does not create diagnostics by itself. Open-wire, underrange and overrange detection depend on transmitter behavior, module support and configured limits. National Instruments provides a useful current-loop design overview; use the PLC manufacturer's circuit for the final terminals.

Qualified electrician using a multimeter while diagnosing an industrial electrical panel
Measure at defined test points and compare each result with the exact device specification. Photo: Bulat843 / Pexels.

Evidence before replacement

Diagnose a PLC sensor input in the same direction that the signal travels.

Avoid replacing the sensor, module or cable on the strength of one LED. Establish the expected electrical state, then isolate the first point where observed evidence differs from the design.

  1. Make the work safe and identify the circuit. Confirm hazards, isolation requirements, terminal designations and whether the channel belongs to a standard or safety function.
  2. Confirm the expected output state. Record PNP/NPN, NO/NC, signal range, supply, target condition and the state expected at the PLC.
  3. Verify sensor power and reference. Use the approved measurement procedure to confirm supply polarity and voltage at the sensor under operating load.
  4. Check the field output at the correct reference. Compare active and inactive measurements with the sensor output circuit and the PLC's guaranteed thresholds.
  5. Compare the PLC terminal, channel LED and diagnostics. A difference identifies wiring, common, threshold, filter or module configuration questions before program logic is considered.
  6. Trace the mapped tag and logic. Confirm address, process-image or immediate access, inversion, task timing, latching, interlocks and any network mapping.

Symptom to next proof

Use the observed mismatch to choose the next test.

Each symptom can have more than one cause. The right response is a discriminating measurement or configuration check, not an immediate component change.

Observed symptom Likely areas Next evidence to collect Common corrective direction
Sensor LED changes; input LED stays off Wrong PNP/NPN pairing, open output conductor, wrong COM, insufficient ON current/voltage Output-to-reference voltage/current at the sensor and PLC terminal; module wiring diagram Restore the correct current path and confirm threshold compatibility
Input LED changes; program tag does not Wrong address, disabled channel, stale mapping, task/update timing, module fault Module diagnostics, configured tag/address, process-image or connection status Correct configuration or mapping; verify controller update behavior
A complete channel group is inactive Missing group common, field supply loss, connector or module-group fault Group COM/reference, fuse/protection state, terminal power and module diagnostics Restore the group's documented supply/reference arrangement
Two-wire input stays ON OFF leakage above input threshold, wiring error, suppressor leakage OFF current and residual voltage compared with module OFF limits Use a compatible input/interface or a manufacturer-approved leakage countermeasure
Short targets are missed Slow sensor, input filter, update interval, task period, unlatched pulse Minimum real pulse/gap and the delay budget for every signal-path stage Reduce verified delays or use approved high-speed/event capture hardware
Logic appears inverted NO/NC mismatch, complementary output selected, program inversion Output state table for target present/absent and tag state before logic Choose the intended output or correct program logic after risk review
Analog value is fixed, noisy or at an endpoint Wrong range, active/passive mismatch, open loop, common error, grounding or scaling Loop current/terminal voltage, channel raw value, range configuration and diagnostics Correct loop power/reference, range and scaling; address cable/grounding evidence

For a wider fault tree covering target, mounting, contamination, cabling and electrical noise, use the industrial sensor troubleshooting guide.

Industrial technician verifying machine operation at a control panel

Commission with real evidence

A successful bench signal is not the end of input validation.

Commission the final cable length, power supply, target, speed and operating environment. Record enough evidence that maintenance can distinguish a sensor fault from wiring, threshold, timing or program behavior later.

  • Actual supply at the sensor
  • Inactive and active output levels
  • PLC terminal and COM arrangement
  • Input filter and task settings
  • Minimum pulse and gap at full speed
  • Raw analog values and scaling
  • Tag/address used by the program
  • Final drawing and model revisions

Pre-power checklist

Confirm twelve items before energizing a new PLC sensor input.

Use this as a planning and peer-review aid. The approved electrical drawing, equipment manuals, risk assessment and site procedure remain controlling documents.

Review progress
0 / 12

Start with the field signal and exact module catalog number.

Reduce input-matching uncertainty

Send the circuit details before selecting the final sensor output.

XSZ can help narrow the sensor output, connector and electrical configuration for a standard industrial detection application. The more complete the input information, the more useful the recommendation can be.

  • 1. Sensor model or required detection task
  • 2. PLC input module model and terminal diagram
  • 3. Supply voltage and PNP/NPN preference
  • 4. Required NO/NC behavior and machine logic
  • 5. Cable/connector, event speed and environment

Frequently asked questions

PLC sensor input questions answered

What is a PLC sensor input?

A PLC sensor input is the hardware and configured data path that converts a field electrical signal into a state or value the controller program can use. It includes terminal wiring, reference/common, protection, electrical thresholds, optional filtering, data update and tag mapping. The exact architecture varies by PLC and module.

What is the difference between a sinking and sourcing PLC input?

A sinking PLC input receives conventional current from a sourcing field device and provides the return path, commonly toward 0 V in a 24 VDC PNP arrangement. A sourcing PLC input supplies current toward a sinking field device, commonly with the input common connected to +24 V for an NPN arrangement. Always confirm the module diagram because terminology and configurable input designs vary.

Which PLC input is normally used with a PNP sensor?

A standard three-wire PNP sourcing sensor normally pairs with a sinking DC input. When the sensor turns on, it supplies positive current to the input channel, and the input circuit returns that current through its documented 0 V common. Verify voltage, current, common grouping and channel polarity for the exact module.

Which PLC input is normally used with an NPN sensor?

A standard three-wire NPN sinking sensor normally pairs with a sourcing DC input. The input side supplies current and the active NPN output provides a path toward 0 V. Confirm that the PLC input supports this arrangement and follow the exact terminal diagram.

Why is the sensor LED on while the PLC input remains off?

The sensor may detect the target without completing a compatible input circuit. Check PNP/NPN matching, input common, output conductor continuity, sensor supply under load and the PLC's required ON voltage/current. A sensor indicator does not prove that enough current reaches the PLC channel.

Can a two-wire DC sensor connect directly to a PLC input?

Only when the sensor's residual voltage, OFF leakage current and permitted load-current range are compatible with the PLC input's guaranteed ON and OFF thresholds. Compare both data sheets as a circuit. If a countermeasure is required, use the manufacturer's approved calculation or an appropriate interface rather than a universal resistor value.

Does NO or NC determine whether a sensor is PNP or NPN?

No. PNP and NPN describe transistor current direction, while normally open and normally closed describe the output's normal switching logic. A sensor can combine either transistor type with either logic, and some models provide complementary NO and NC outputs.

How does a PLC input filter affect a short sensor pulse?

If the pulse does not remain continuously active longer than the configured OFF-to-ON filter, the module may reject it. Even when it passes the filter, sensor response, hardware delay, module or network update and program task timing can still affect capture. Use a high-speed counter, event input or latch only when the PLC documentation supports that solution.

How should a 4–20 mA sensor be wired to a PLC?

First identify whether the transmitter is two-, three- or four-wire and whether the PLC input is active or passive. Then use the manufacturer's matching circuit to place loop power, signal, return and input burden correctly. Confirm compliance voltage, common/isolation, channel range, raw scaling and supported fault diagnostics before commissioning.

Technical references

Primary sources used for the electrical boundaries in this guide

Photography: control-panel technician and multimeter technician by Bulat843; control-panel interior by Magda Ehlers; commissioning technician by Sergey Sergeev. Images are provided through Pexels under the Pexels license. Sensor product image by XSZ Sensor.

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
Compare