Zhejiang Xinsenzheng Automation Co., Ltd.

Industrial Sensor Manufacturer OEM & Application Support Factory-direct Supply
Industrial proximity sensor installed to measure the position of a metal target
Industrial signal selection guide

Analog vs Digital Sensors: Choose the Signal Your PLC Can Use

The sensing principle tells you how a device detects the process. The output tells you what information reaches the controller. Separating those two decisions prevents wrong PLC cards, unstable readings, missed pulses, and unnecessary integration work.

Direct answer

Use a digital or discrete output when the PLC needs a state such as present, home, or level reached. Use an analog output when it needs the measured value itself. Use IO-Link when process data, parameters, identification, and diagnostics justify a communication architecture.

Discrete, analog, and IO-Link PNP/NPN and PLC compatibility Scaling and commissioning checks Updated August 22, 2026

Application image: xsz sensor

Need a decision?Discrete output

The controller receives an ON/OFF state after the sensor applies its threshold and hysteresis.

Need the magnitude?Analog output

The controller receives a voltage or current that must be scaled into engineering units.

Need device data?IO-Link

A master exchanges process data, parameters, identification, events, and available diagnostics.

Start with the control question

Do not begin with a signal name. Write what the PLC must know or decide. That sentence usually reveals whether the machine needs one state, a continuous value, or a richer digital data connection.

Route 01 / State

"Is the part present?"

Choose a discrete output when one reliable state is enough for the logic.

Verify: sensing margin, PNP/NPN, NO/NC, response time, input filter, and failure behavior.
Route 02 / Value

"What is the actual level?"

Choose an analog output when control, trending, or quality decisions need the measured magnitude.

Verify: range, 0–10 V or 4–20 mA, load, scaling, accuracy, response, and noise control.
Route 03 / Data

"What is the value and device status?"

Consider IO-Link when parameters, identification, process data, events, and diagnostics will be used.

Verify: master, port, IODD, process-data mapping, cycle time, replacement, and maintenance workflow.
The decision in plain language

"Analog" and "digital" describe the information interface, not the sensing principle.

The same sensing family can offer different outputs.

An inductive, photoelectric, ultrasonic, pressure, temperature, magnetic, or position sensor may be sold with a switching output, an analog output, a communication interface, or more than one option. Always check the exact part number and data sheet.

A discrete sensor makes a local decision: the internal signal crosses a threshold, and the output changes state. The PLC receives a bit. An analog sensor preserves a variable: its output changes across a stated electrical span that represents distance, pressure, level, temperature, position, force, or another quantity. The PLC receives a raw value and converts it to engineering units.

Neither is automatically more accurate. A digital switch may make a repeatable threshold decision without revealing the measured magnitude. An analog sensor may provide fine resolution while the complete measurement still includes sensor error, installation effects, temperature drift, wiring error, input-module error, and scaling configuration.

Scope boundary: This guide covers common industrial DC interfaces. It does not replace the wiring diagram, electrical limits, EMC instructions, functional-safety analysis, or commissioning procedure for the exact sensor and controller.

One process can produce two very different PLC signals.

The diagrams show information shape, not a universal voltage level or timing specification. The real thresholds, span direction, output state, update rate, and electrical limits remain model-specific.

Digital / discrete

The PLC receives a state

The sensor applies a switching threshold. The output is either inactive or active, even though the physical condition may be changing continuously.

Discrete sensor output waveform An output changes between low and high states when the process crosses a switching threshold. ONOFFTime Best fit: presence, end position, threshold alarm, count, or a defined machine state.
Analog

The PLC receives a changing value

The electrical signal varies with the measured quantity. The controller scales the raw input and can create multiple alarms, trends, or control actions.

Analog sensor output waveform A continuously changing signal rises and falls with the measured process value. HighLowTime Best fit: level, pressure, position, distance, temperature, force, flow, or another magnitude.
Separate the choices

Five terms buyers often combine into one incorrect question

Each term answers a different design decision. Keeping them separate makes product comparisons and supplier quotes much clearer.

Sensing principle
What it meansHow the device detects or measures: inductive, photoelectric, ultrasonic, pressure, temperature, magnetic, and so on.
Selection effectDetermines target compatibility, useful range, environment, geometry, and achievable sensing behavior.
Discrete / digital output
What it meansA finite state, commonly ON/OFF, high/low, or present/absent.
Selection effectFits a PLC digital input when no numeric measurement is required.
Analog output
What it meansA variable voltage or current that represents a stated measurement span.
Selection effectNeeds a compatible analog input, scaling, and an error/noise review.
PNP / NPN
What it meansThe current-switching arrangement of a common DC transistor output.
Selection effectMust match the PLC input circuit. It does not describe sensing accuracy or analog range.
NO / NC and IO-Link
What they meanNO/NC defines output logic in a stated normal condition. IO-Link is point-to-point digital communication through a master.
Selection effectLogic, wiring, process data, parameters, diagnostics, and replacement behavior must be reviewed separately.
Digital switching outputs

PNP and NPN must form a complete current path with the PLC.

On common three-wire DC sensors, a PNP output generally sources positive current when active. It is paired with an input circuit that accepts that current and returns it to 0 V. An NPN output generally sinks current toward 0 V and is paired with an input circuit that supplies current to the field device.

Input groups, common terminals, module wiring, voltage, current, and connector pinout decide compatibility. Some input cards are configurable, but that does not remove the need to read the exact diagram.

Do not use the label alone: “PNP sensor” and “sinking input” describe complementary sides of one circuit. Confirm the exact sensor and PLC module, not a regional wiring habit.

References: OMRON PNP/NPN sensor FAQ and AutomationDirect sinking and sourcing wiring basics.

PNP sourcing outputActive path toward positive supply
Sensor outputProvides positive current when the selected output state is active.
Compatible PLC inputAccepts current and completes the return path to 0 V.
Common description: PNP sensor with a sinking PLC input circuit.
NPN sinking outputActive path toward 0 V
Compatible PLC inputSupplies current through its field input circuit.
Sensor outputCompletes the path toward 0 V when the selected state is active.
Common description: NPN sensor with a sourcing PLC input circuit.
NO/NC is another choice. It defines how the output behaves in the manufacturer’s stated normal condition. It does not change a PNP output into NPN, and it does not by itself create a functional-safety circuit.
Analog signal choice

0–10 V and 4–20 mA solve the same measurement task with different loop conditions

Neither interface is universally better. Compare the complete sensor, cable, supply, input module, grounding, burden, response, diagnostic behavior, and maintenance practice.

Voltage interface

0–10 V: simple when the reference and wiring are controlled

A voltage-output sensor drives a receiving input with a specified impedance. The signal is easy to understand, but the measurement depends on a suitable common/reference arrangement and can be affected by loading, conductor resistance, ground-potential differences, and coupled noise.

Confirm the input rangeThe channel must be configured for the exact voltage span.
Check output loadThe PLC input impedance must meet the sensor’s specified load requirement.
Control the referenceUse the documented common, grounding, shield, and isolation arrangement.
Current interface

4–20 mA: robust when the loop has enough voltage headroom

The transmitter regulates loop current within its specified operating limits. Four milliamps represents the normal lower endpoint, creating a live zero that may help the receiving system distinguish a valid low-range value from a zero-current open loop.

Calculate loop burdenInclude input resistance, cable, barriers, isolators, indicators, and all series devices.
Confirm loop powerSensor compliance and supply limits must still be satisfied at full-scale current.
Define fault rangesThe exact transmitter and input module decide how under-range, over-range, and wire break are handled.
InterfaceWhat reaches the inputUseful fitChecks before ordering
0–10 VVoltage changes across the stated measurement span.Compatible voltage-input systems with controlled reference, loading, and cable environment.Check input impedance, common/reference, grounding, shielding, range, and output load.
4–20 mALoop current changes from the live lower endpoint to full scale.Many industrial runs where current signaling, loop powering, or live-zero behavior is useful.Check supply, compliance, total burden, active/passive loop arrangement, isolation, and fault interpretation.
0–20 mACurrent changes from zero to full scale.Systems specifically configured for this range.Check whether a 0 mA process value can be distinguished from an open loop in the control philosophy.
1–5 VVoltage uses a nonzero lower endpoint.Compatible voltage inputs or systems deriving voltage from a current loop through a precision resistor.Check whether the signal is native or converted, plus impedance, grounding, scaling, and total error.

Technical reference: NI 4–20 mA current-loop fundamentals. For xsz sensor applications, compare 0–10 V and 4–20 mA analog proximity outputs.

Industrial sensors connected to control cabinets in clean and electrically noisy factory environments
Signal-installation illustration: xsz sensor
Signal integrity

A good sensor can still produce a bad PLC value.

Many apparent sensor failures begin at the interface. Diagnose the full acquisition chain before replacing the sensing head.

  • Wrong analog range, digital input common, or PNP/NPN pairing
  • Insufficient 4–20 mA loop voltage after all burden is included
  • Floating reference, ground-potential difference, or unsuitable isolation
  • Signal cable routed beside drives, motors, contactors, or high-energy conductors
  • Shield and grounding applied by habit instead of the equipment instructions
  • Filtering that hides a real dynamic requirement or delays a fast event

Continue with sensor cable shielding for AC and DC installations and the PLC sensor-input wiring guide.

PLC analog scaling

Convert the raw electrical input before making a process decision.

Scaling maps the configured input reading to engineering units. Some PLC modules perform this conversion internally. Others expose current, voltage, or integer counts that the program must scale.

The formula assumes a linear relationship over the configured span. It does not remove transmitter tolerance, installation error, input-module accuracy, temperature effects, calibration status, or filtering delay.

Check the raw value first. A beautiful engineering-unit display can still be wrong when the channel is configured for the wrong input range or the scaling endpoints do not match the sensor.
Value = EngLow + ((Raw - RawLow) / (RawHigh - RawLow)) × (EngHigh - EngLow)

Raw can be mA, V, or configured PLC counts. Use the exact module representation.

Sensor span0–10 barPressure measurement range
Input span4–20 mAConfigured PLC current range
Worked point12 mA = 5 barIdeal midpoint before real-world error
Do not stop at resolution

The usable result belongs to the complete measurement chain

Resolution, repeatability, accuracy, and response time answer different questions. Build the acceptance test around the machine decision.

01Sensor behaviorRange, linearity, repeatability, temperature drift, response, and installation sensitivity.
02Signal pathCable, loading, loop power, grounding, shielding, isolation, and connectors.
03PLC inputRange, resolution, conversion time, accuracy, filter, diagnostics, and common terminals.
04Program and processScaling, alarm limits, validation reference, units, fault handling, and real process variation.
Automated factory conveyor system illustrating industrial sensor signal use cases
Photo: Freek Wolsink / Pexels
Factory use cases

Choose from the machine question, not from a favorite interface.

These scenarios are starting points. The final output still depends on the real target, process, speed, environment, PLC hardware, diagnostic philosophy, and acceptance test.

01
Carton presence on a conveyor

The reject logic needs only a reliable event at the correct time.

Start with discrete
02
Continuous tank level

Control, batching, trending, and multiple alarms need the actual level.

Start with analog or IO-Link
03
Press home plus actual position

One state and one measured position may need separate signals or a suitable combined device.

Use the right signal for each job
04
Device settings and maintenance status

Recipes, identification, events, and replacement data must be integrated and used.

Consider IO-Link
Fast-event warning: A digital output can switch correctly and still be missed when the pulse is shorter than the PLC input filter, scan, or acquisition method. Review sensor switching frequency and missed signals.
Commission the complete chain

Verify the raw signal before trusting the HMI value.

A short, controlled commissioning record makes later troubleshooting much faster and separates sensor behavior from wiring, input, and programming faults.

1
Confirm exact part numbers

Sensor, cable, connector, PLC input, master, barrier, isolator, and power supply.

2
Check wiring before power

Pinout, common terminals, polarity, loop type, shielding, grounding, and load.

3
Observe the raw input

Digital state, mA, V, counts, IO-Link process data, and diagnostic status.

4
Apply a known condition

Use a representative target, reference value, simulator, or process condition where permitted.

5
Test real dynamics

Maximum speed, shortest pulse, process ramp, noise sources, and restart behavior.

6
Record the baseline

Raw value, scaled value, supply, target/process condition, parameters, and acceptance result.

Industrial technician inspecting a control panel during sensor and PLC commissioning
Photo: Bulat843 / Pexels
A practical selection workflow

Move from the machine decision to a verifiable interface

This sequence keeps output type from driving the application definition and gives suppliers enough information to quote the right variant.

STEP 01Write the control question

Detect each cap, measure level from 0 to 2 m, or report value and device health.

STEP 02Choose the information type

State, continuous value, or process data plus parameters and diagnostics.

STEP 03Define real sensing conditions

Target, medium, range, background, speed, temperature, contamination, mounting, and washdown.

STEP 04Match the control hardware

Exact PLC or master, channel type, common, range, isolation, power, load, and timing.

STEP 05Define fault behavior

Open circuit, short circuit, power loss, out-of-range, communication loss, and replacement.

STEP 06Validate the installation

Raw signal, scaled value, real speed/noise, diagnostics, limits, and restart procedure.

For broader model selection, use the automation sensor basics guide and verify every quoted field with the sensor data-sheet guide.

Troubleshoot by signal path

The symptom often reveals which layer is wrong.

Capture the raw sensor output, PLC input, scaled value, supply, target/process state, and timing together. Avoid changing several parameters before recording the fault.

Observed symptomLikely mechanismConfirmation checkCorrective direction
Digital input always OFFWrong PNP/NPN pairing, input common, supply, NO/NC assumption, broken output conductor, or load limit.Measure sensor supply and output state, then compare the exact sensor and input-module diagrams.Correct the circuit and PLC logic; verify voltage, input current, and output-current limit.
Digital input flickersLow sensing margin, vibration, target variation, optical contamination, noise, or unsuitable hysteresis/filtering.Observe the sensor indicator and raw PLC input while changing gap, alignment, speed, and motion.Improve target and mounting conditions before adding filtering that may hide the process problem.
4–20 mA stays near an endpointReal process endpoint, wrong range, loop-power or burden problem, wiring fault, or transmitter diagnostic state.Compare measured loop current, sensor indication, supply across the transmitter, and channel configuration.Resolve configuration, power, burden, or process issues using the exact manuals.
Analog value is noisyEMI coupling, grounding/shield error, ground loop, wrong reference, poor connection, unsuitable filter, or real process variation.Separate raw input behavior from the scaled display and test against a controlled condition.Correct installation and input configuration before masking the behavior with software filtering.
Value is stable but wrongIncorrect zero/span, wrong scaling endpoints, installation effect, loading, unit mismatch, or sensor/input accuracy.Apply a known reference or simulator where permitted and compare raw, configured, and displayed values.Correct scaling or installation; recalibrate where allowed; choose a range that fits the useful process span.
IO-Link communicates but data is wrongIODD mapping, byte order, unit, scaling, parameters, quality/status interpretation, or replacement settings.Review master diagnostics, IODD, process-data layout, parameters, and a controlled reference condition.Map documented data and status, control parameter changes, and test device replacement behavior.
Industrial sensor RFQ

“Analog sensor” or “digital sensor” is not a complete specification.

Ask for the exact output format, range, wiring style, electrical limits, connection, response behavior, data sheet, and acceptance evidence for the proposed part number.

For supplier-level questions, continue with the industrial sensor supplier selection guide.

RFQ 01Function and PLC action

Presence, count, distance, level, pressure, position, force, temperature, speed, or quality decision.

RFQ 02Target or process

Material, size, surface, color, medium, range, background, approach, operating span, and mounting.

RFQ 03Output and control hardware

PNP/NPN, NO/NC, 0–10 V, 4–20 mA, IO-Link, exact PLC/card/master, desired units, and fault treatment.

RFQ 04Timing

Maximum event rate, target length and gap, response, latency, PLC filter, scan, high-speed input, or IO-Link cycle need.

RFQ 05Electrical installation

Supply, cable length and route, input burden/load, common, grounding, shielding, isolation, connector, and available ports.

RFQ 06Environment and acceptance

Temperature, vibration, ingress, chemicals, approvals, housing, reference target/value, pass limits, sample quantity, and documents.

Sensor-to-PLC compatibility review

Does the proposed signal fit your control hardware and machine decision?

Share the target or process, required information, exact PLC or I/O part number, supply, cable route, environment, timing, and failure behavior. xsz sensor can help identify the output and validation details to confirm before sampling.

Request a compatibility review
Include these details
  • State, measurement, or diagnostic information required
  • Target, medium, range, geometry, and speed
  • PNP/NPN, NO/NC, voltage, current, or IO-Link preference
  • Exact PLC input card or IO-Link master
  • Cable route, supply, load, shielding, and connector
  • Environment, response, fault behavior, and acceptance test
Frequently asked questions

Analog vs digital sensor questions

Is an analog sensor more accurate than a digital sensor?

Not necessarily. Analog and digital describe the output information, not a universal accuracy ranking. Compare the specifications that matter to the task, including accuracy, repeatability, hysteresis, resolution, response, temperature behavior, installation effects, and the complete PLC input chain.

When should I use a digital sensor?

Use a digital or discrete output when the controller needs one state, such as object present, target reached, clamp closed, level switch made, or threshold alarm. Verify sensing margin, PNP/NPN compatibility, NO/NC logic, response time, input filtering, load limits, and failure behavior.

When should I use an analog sensor?

Use an analog output when the PLC needs the measured magnitude for control, multiple alarms, trending, batching, position, quality, or process monitoring. Match the exact electrical range to the input module and define scaling, error, response, cable, grounding, load, and fault behavior.

Is 4–20 mA better than 0–10 V?

Neither is universally better. A correctly designed 4–20 mA loop is often useful in industrial installations because current signaling and a 4 mA live zero can support robust transmission and fault distinction. A 0–10 V interface can be simple and appropriate with compatible inputs and controlled reference, loading, and wiring. Use the exact manuals and a complete loop review.

Are PNP and NPN analog or digital?

PNP and NPN normally describe common DC transistor switching outputs and are therefore usually part of a discrete-output wiring decision. PNP generally sources current and NPN generally sinks current. They do not describe analog accuracy, measurement range, or sensing technology.

Can a sensor provide both switching and measured values?

Yes, some models offer a discrete output plus an analog output, multiple switching outputs, or digital communication carrying a measured value and status. Select the exact variant and confirm how each value reaches, scales, and maps into the controller.

Does IO-Link replace analog sensors?

IO-Link can carry process values digitally through an IO-Link master in suitable architectures. It does not remove the underlying measurement requirements or automatically simplify the project. The device, master, IODD, PLC mapping, timing, parameter control, replacement, and maintenance workflow must support the design.

Why does an analog value jump when the process is steady?

First compare the raw electrical input with the scaled value. Possible causes include real process movement, EMI, routing, shield or ground problems, a floating reference, poor connections, inadequate 4–20 mA loop voltage, wrong input range, unsuitable filtering, or a sensor installation issue. Correct the interface before hiding the symptom in software.

Technical references

Primary sources used for this guide

  1. IEC 61131-9:2022 — single-drop digital communication interface for small sensors and actuators.
  2. IO-Link System Description — masters, devices, process data, parameters, identification, and diagnostics.
  3. NI 4–20 mA Current Loop Fundamentals — live zero, loop components, current transmission, and system design.
  4. OMRON PNP/NPN Sensor Output FAQ — common sensor transistor-output distinction.
  5. AutomationDirect Sinking and Sourcing Wiring Basics — complementary sensor and PLC input paths.
  6. Rockwell Automation Analog Input Calibration — examples of voltage and current input ranges.
  7. Siemens Input/Output Connection Examples — digital and analog sensor connection, shielding, and ground-loop cautions.
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