Zhejiang Xinsenzheng Automation Co., Ltd.

Industrial Sensor Manufacturer OEM & Application Support Factory-direct Supply
Automation technician operating an industrial machine control panel
Automation sensor selection guide

Discrete vs Continuous Sensors in Automation: Choose the Information First

A discrete sensor tells the controller whether a condition is true. A continuous sensor tells it how much of a variable is present. The right choice depends on the machine decision, not on whether the signal happens to be called digital or analog.

Direct answer

Use a switching sensor for dependable sequence states such as part present or cylinder extended. Use a measuring sensor when the PLC needs distance, pressure, temperature, level, flow or position for control, trends or adjustable limits. Use a hybrid sensor only when both outputs serve a defined purpose.

Choose the signal path →
Switching vs measuring PLC input matching Commissioning evidence Updated August 22, 2026

Photo: Bulat843 / Pexels.

DiscreteIs the condition true?

One state for sequence logic, counting, confirmation, permissives or simple alarms.

ContinuousWhat is the value?

A measured magnitude for feedback, adjustment, trending, quality or diagnostics.

HybridDo both have a job?

A switching point plus measurement can help, but shared sensing elements remain a common dependency.

Start with the PLC decision.

Do not begin with a connector, output acronym or sensor family. Write what the controller and operator must know. That one sentence usually makes the first choice clear and prevents paying for unused data or losing information the process actually needs.

Choose discrete

One stable condition is enough

Examples: part present, clamp closed, end position reached, pressure above a permissive or tank at a fixed high level.

Confirm switching margin, logic, timing and PLC electrical compatibility.
Choose continuous

The magnitude changes the action

Examples: closed-loop pressure, distance feedback, inventory level, process temperature, flow trend or multi-position control.

Confirm measuring range, total error, update time, scaling and fault values.
Choose hybrid

Logic and visibility are both useful

Examples: a fast pressure switch for a permissive plus a measured pressure value for HMI, trend and maintenance review.

Confirm simultaneous outputs, pin mode, common failures and parameter ownership.
The core difference

Discrete answers whether; continuous answers how much.

Information type comes before electrical signal type.

A discrete sensor exposes a limited state such as ON/OFF, present/absent or open/closed. A continuous sensor exposes a numerical value across a range. Either result may travel through a digital interface, so “digital” does not automatically mean “discrete.”

A standard inductive proximity switch may internally respond to a continuously changing electromagnetic condition but expose only one evaluated state. An IO-Link distance sensor can send a numerical distance in a digital process-data frame. A pressure sensor may provide a PNP switching output, a 4–20 mA measurement and device diagnostics from one sensing element.

The controller choice is therefore not simply binary versus analog electronics. It is a chain: physical variable, sensing principle, information required, output or protocol, receiving input, PLC processing, failure handling and final machine action. If any link is undefined, a technically good sensor can still become the wrong automation point.

Technical basis: Balluff switching versus measuring sensors.

Side-by-side comparison

Decision factorDiscrete sensorContinuous sensor
Controller questionIs the condition true? Usually one Boolean state or a small set of defined states.What is the measured value? A number plus units, status and sometimes diagnostics.
Typical examplesInductive proximity switch, photoelectric presence sensor, limit switch, pressure switch, float switch.Distance sensor, pressure transmitter, temperature transmitter, level sensor, flowmeter, linear-position sensor.
Common interface24 VDC PNP, NPN, push-pull, relay, two-wire switching, pulse or qualified safety output.4–20 mA, 0–10 V, RTD, thermocouple, IO-Link process value, fieldbus or industrial Ethernet data.
PLC workRead a digital input or bit; debounce, interlock, count, time or sequence it.Validate and scale a number; filter if justified, compare, trend, alarm or use it in control.
Main strengthSimple, direct and easy to troubleshoot when one threshold is enough.Shows magnitude, margin and trend; supports adjustable thresholds, feedback and richer diagnostics.
Main limitationNo visibility between states; the PLC cannot see approach to the threshold.More integration work, performance terms, fault modes and verification are required.
Commissioning proofProve both transitions, hysteresis, normal/fault logic and timing at real speed.Prove low, middle and high values, units, direction, tolerance, faults and total response.
A discrete sensor is not automatically less precise. For a repeated end-position task, switching repeatability may be more useful than a calibrated distance number. The limitation is the information exposed to the PLC, not necessarily the quality of the device.
Separate three layers

Do not mix the process question, data and interface.

Most wrong selections begin when one word is used for several different layers. Keep these three decisions separate in the specification.

Layer 01

Physical variable

Presence, distance, pressure, temperature, level, flow, position, speed or another real process condition.

Question: what is happening at the machine?
Layer 02

Information required

A state, a numerical value, a pulse count or frequency, direction, quality status, diagnostics or a justified combination.

Question: what must the PLC know?
Layer 03

Transport and input

PNP/NPN switching, relay, 4–20 mA, voltage, RTD, pulse, IO-Link or network data matched to the receiving hardware.

Question: how will valid data reach the controller?
Useful terminology: “Switching” and “measuring” often communicate the choice more clearly than “discrete” and “continuous.” Analog describes an electrical interface. Digital describes logic levels, pulses or encoded data. IO-Link can carry switching channels, measured values, identification, parameters and diagnostics.
xsz sensor photoelectric switching sensor used for discrete object detection
Product photo: xsz sensor.
Discrete sensing path

Turn a physical condition into a stable state.

A discrete sensor evaluates the sensed condition against a switching rule and exposes a limited state the PLC can use. Its electronics may be sophisticated, but the control result remains simple.

1
Sense the target or process

Detect light, metal, pressure, position, level or another physical condition.

2
Evaluate against a threshold

Use a fixed point, taught point, window, contrast level or other defined rule.

3
Drive a compatible output

PNP, NPN, push-pull, relay or another switching stage must match the PLC input.

4
Prove both states in the machine

Test real targets, both travel directions, input filtering, sequence meaning and fault behavior.

Switching stability

Switching point and reset point are not normally identical.

Hysteresis is the difference between the point where an output changes in one direction and the point where it resets in the other direction. It helps prevent chatter when a target vibrates or moves slowly near the threshold.

Too little hysteresis can create repeated ON/OFF transitions. Too much can make the reset point farther from the required machine position. Commission both directions and record the actual process meaning of each state.

Approach: OFF → switch point → ONReturn: ON → reset point → OFF. The gap between the two points is the hysteresis band.
Electrical output

PNP, NPN and NO/NC answer different questions.

PNP and NPN describe current direction in common three-wire DC sensor circuits. NO and NC describe selected output behavior relative to the sensing condition. A PNP sensor can be NO or NC; an NPN sensor can also be NO or NC.

  • PNP: normally sources current toward a compatible sinking PLC input.
  • NPN: normally sinks current from a compatible sourcing PLC input.
  • Two-wire electronic: check OFF leakage and ON voltage drop.
  • Pulse or encoder: check frequency, pulse width and high-speed input capability.

Continue with the verified PLC sensor input guide or NPN vs PNP wiring guide.

Industrial pressure gauge illustrating a continuous process measurement
Photo: Robert So / Pexels.
Continuous sensing path

Convert the process into a value the PLC can interpret.

A measuring sensor reports a variable across a defined range. Its internal chain can include the sensing element, excitation, signal conditioning, compensation, linearization, filtering, analog-to-digital conversion and output formatting.

The result has finite range, resolution, accuracy, repeatability and update time. A display with many digits does not prove that every digit is accurate. A high-resolution PLC input cannot recover information that the sensor did not measure accurately.

  • Map the approved physical range to the configured electrical or digital range.
  • Preserve units, direction, status and invalid-data information.
  • Check sensor error, input-module error, temperature effects, noise and mechanics together.
  • Verify low, middle and high values plus overrange, underrange and lost-signal behavior.
Interface map

Match the sensor information to the correct receiving hardware.

A valid sensor output is useful only when the input module, common, range, timing and data format can receive it correctly.

Switching

PNP / NPN

Boolean machine states through a compatible 24 VDC digital input.

Check common, thresholds, load, leakage and filter.
Current

4–20 mA

Measured values for pressure, level, flow, temperature, position and other processes.

Check loop power, resistance, isolation and fault current.
Voltage

0–10 V

Measured values in many shorter machine-level cable runs and compatible controllers.

Check reference, impedance, grounding, noise and load.
Count / speed

Pulse or encoder

Digital transitions that represent quantity, position, direction or speed.

Check pulse width, maximum frequency and counter input.
Smart data

IO-Link

Switch states, measured values, parameters, identification, events and diagnostics.

Check IODD, profile, process-data map, cycle and validity.
IO-Link changes the communication path, not the process question. Under IEC 61131-9:2022, IO-Link is a point-to-point digital communication interface. A connected device can still be a switching sensor, a measuring sensor or both. The official IO-Link technology overview describes bidirectional process, parameter and diagnostic exchange.
When one sensor does both

A hybrid sensor is useful only when both data paths have a defined job.

Many pressure, flow, level, temperature and distance devices can provide switching outputs plus an analog value or digital process data. This can support fast machine logic and richer HMI or maintenance information without adding another process connection.

However, do not assume the outputs are independent. They may share the same sensing element, power, processor, cable and connector. One failure can therefore affect the switching state and measurement together. If independent protection is required, use the risk assessment and applicable safety or availability architecture rather than treating two outputs from one ordinary sensor as two independent channels.

Hybrid architectureUseful benefitWhat must be confirmed
Switch + analogDirect Boolean logic plus a value for display, trend or adjustment.Two input channels, pin assignment, signal common, simultaneous operation, aligned range and shared-failure behavior.
Switch + IO-LinkSimple switching mode plus remote parameters, measurement, identification and diagnostics.Master port mode, IODD, process-data layout, cycle time, parameter source, fallback and replacement restore.
Several software thresholdsOne measured value can create high, low and window states for several recipes.Hysteresis, invalid/stale data, update delay, common-cause failure and whether an independent limit is still required.
Measurement + pulseQuantity or rate can be transmitted as pulses for counting or totalizing.Pulse constant, maximum frequency, minimum width, counter interface, timeout, rollover and missed-event behavior.
Safety boundary: a normal switching output, software threshold or duplicate data field is not automatically a safety function. Safety-related control systems require appropriate devices, architecture, diagnostics, integration and validation. ISO 13849-1:2023 provides a methodology but does not prescribe one universal sensor or required performance level for every machine.
Industrial control panel representing PLC signal acquisition and processing
Photo: Brayan Ramirez / Pexels.
PLC processing

Scale the configured signal, not the sensor family brochure.

An analog module converts current or voltage into a raw number. The PLC maps that number into engineering units. Use the exact input range, raw representation and sensor endpoints from the approved configuration.

EU = EU_low + (Raw - Raw_low) × (EU_high - EU_low) / (Raw_high - Raw_low)EU means engineering units. The exact raw endpoints, overrange values and data format depend on the selected I/O module and configuration.

Do not clamp every abnormal value into the normal range. Preserve enough information to distinguish a real low process value from open circuit, underrange, invalid data or communication loss.

Reference: Siemens S7-1200 System Manual V4.7, processing of analog values.

Worked example

What does 12 mA mean in a 0–10 bar loop?

This example illustrates a linear 4–20 mA mapping. It is not a substitute for the exact transmitter and input-module documentation.

Configured span0–10 bar

The sensor maps 0 bar to 4 mA and 10 bar to 20 mA.

Observed signal12 mA

The reading is 8 mA above the live-zero endpoint.

Span fraction8 / 16 = 0.5

The signal is halfway through the 16 mA measurement span.

Engineering value5 bar

Half of the configured 10 bar span is 5 bar.

Do not assume one universal fault current. Device underrange, overrange and diagnostic behavior must be confirmed and tested with the exact transmitter and receiving module. Review the current 0–10 V versus 4–20 mA guide before approving the output.
Performance budget

Compare the specifications that control the real machine result.

After choosing state or measurement, build a complete performance budget. Sensing range and price alone do not tell you whether the point will be stable, fast or accurate enough.

SpecificationWhat it meansHow it changes selection
Sensing or measuring rangeThe region where the sensor is intended to detect or measure under stated conditions.Confirm target, geometry, dead zone, blind zone, usable linear zone and real installation margin.
Switching repeatabilityHow consistently the switching point is reproduced under defined conditions.Often more important than absolute sensing distance for repeatable part positioning.
AccuracyCloseness to a suitable reference under stated conditions, usually with several error components.Read the complete statement, including range, temperature and target conditions; do not replace it with resolution.
ResolutionThe smallest output step or change the system can distinguish or report.Fine steps help only when sensor noise, accuracy, mechanics and input conversion support them.
LinearityDeviation of the transfer function from the defined straight-line relationship.Changes the error across the range and matters when simple linear scaling is used.
HysteresisDifference between transition points for opposite travel directions or states.Prevents chatter but creates a reset band; verify both approach directions.
Response or update timeHow quickly a sensor or channel reacts or publishes changed information.Add sensor, filter, input conversion, network, PLC task and logic delays; one number is not total machine latency.
Temperature driftChange in output or threshold as ambient or process temperature changes.Important near ovens, outdoors, in cold storage, washdown areas and precision applications.
Output and diagnosticsElectrical load limits plus behavior for overload, short circuit, open circuit, out-of-range or invalid data.Must match the receiving I/O and programmed failure response, not just the normal signal.
Read the exact conditions. Typical values, display digits and family-level claims are not guaranteed performance for every model. Use the sensor datasheet guide and record the exact model suffix, range, output and test conditions.
Total response path

A fast sensor does not guarantee a fast machine response.

Every stage can add delay. Filtering may improve stability, but it can also reject a valid short pulse or slow a measured step. Define the maximum allowed end-to-end response before selecting parts.

Stage 01Physical event

Target enters the field, pressure changes or position moves.

Stage 02Sensor response

Sensing element and internal processing react to the change.

Stage 03Output or cycle

Switching edge, analog update or digital process data is published.

Stage 04Input and filter

PLC or remote I/O detects, converts and filters the signal.

Stage 05Network and task

Data reaches the PLC task and the program evaluates it.

Stage 06Final action

Output, valve, reject, drive, alarm or HMI changes state.

For high-speed applications, continue with response time versus switching frequency and why high-speed machines miss signals.

Application choices

Use the simplest signal that still supports the required decision.

These examples show how the same process can justify discrete, continuous or hybrid sensing depending on what the machine must do.

Conveyor carton detection

One transfer signal usually favors discrete.

If the PLC only needs a dependable carton-present transition before a timing window closes, a switching photoelectric sensor is usually the simpler choice. Check target surface, background, spot size, minimum object, speed, mounting and input filter.

Choose continuous only when height, distance, profile or margin is required.
Tank level and pump control

Fixed alarms may use switches; inventory needs a value.

Low-level pump protection and high-level alarm may be served by two qualified switches. Inventory, several recipes, variable-speed control, fill-rate trend or leak detection usually needs continuous measurement.

An independent high-high function may still be required by the risk assessment.
Pneumatic cylinder position

End positions favor discrete; full stroke favors measurement.

Two magnetic switches can prove fully retracted and fully extended. A continuous position sensor becomes useful for multiple tooling positions, motion monitoring, setup confirmation or wear trends.

Measurement adds alignment, numerical tolerances and update-time requirements.
Pressure permissive and trend

A hybrid sensor can serve logic and visibility.

A switching output can provide the machine permissive while 4–20 mA or IO-Link provides pressure for HMI, alarm history and leak analysis. Both paths must be checked against the same pressure reference.

Document set/reset points, units, fault states and common dependencies.
Troubleshooting

Diagnose the signal at each stage instead of replacing the sensor first.

Compare the physical condition, sensor indicator or display, electrical output, PLC raw data, engineering tag and final logic. The first point of disagreement narrows the fault.

SymptomLikely causesHow to confirmCorrective direction
Discrete input chattersLow margin, vibration, interference, unstable power, sensitivity or insufficient hysteresis.Watch the raw sensor output and target position through both transitions.Improve mounting and margin, correct interference, teach properly, then add only justified filtering.
Fast parts are missedSlow sensor or input, narrow pulse, long filter, network/task delay or ordinary DI used for high-speed work.Measure pulse width and each delay stage against guaranteed limits.Use faster sensing and a high-speed input, counter or capture architecture.
Analog value is noisyMechanical instability, grounding, interference, wrong range, poor shielding or unsuitable output.Compare local display, signal at the input, raw counts and process stability.Correct the physical or electrical cause before adding documented filtering.
Analog value is offsetWrong scaling, common-reference error, voltage drop, calibration, incorrect range or drift.Test low, middle and high references through the whole loop.Correct configuration and wiring; recalibrate or replace only after isolating the error.
Value freezes but looks validStale network data, held-last-value behavior or a hidden communication/device fault.Monitor quality, update timestamp, timeout, sequence counter and device events.Program stale-data detection and a defined fallback; do not trust the number alone.
Switch works, value is wrongHybrid outputs mapped to different ranges or variables, wrong pin mode or units.Read device parameters and test both outputs against one reference.Align range, units and PLC mapping; document which path is authoritative.
Two-wire warning: OFF-state current and ON-state voltage drop can make a PLC input appear stuck or weak. Use the verified sensor leakage-current guide when screening the circuit.
Selection workflow

Move from the process question to a released configuration.

This sequence keeps sensing, wiring, PLC processing and acceptance evidence connected throughout design and purchasing.

1

Define the decision

State, magnitude, count, frequency, direction or a justified combination. Explain how the PLC uses it.

2

Define the target

Record material, size, surface, range, speed, direction, process media and expected variation.

3

Choose information class

Select switching, measuring or hybrid. Treat encoder, pulse and safety functions as special architectures.

4

Choose the interface

Match output or protocol to supply, PLC input, cable, grounding, isolation, update and maintenance capability.

5

Build the budget

Check range, margin, repeatability, accuracy, resolution, hysteresis, drift, response, I/O and mechanics.

6

Define failures

Plan for stuck state, missing transition, short/open circuit, invalid value, stale data and communication loss.

7

Test extremes

Use real targets and speeds. Test both discrete transitions or low/mid/high values plus fault behavior.

8

Release the record

Store model, suffix, wiring, range, units, filters, IODD, scaling, setpoints, test evidence and exact spare.

Commissioning and acceptance

Commission the complete loop, not only the sensor LED.

A correct local indication can still reach the wrong PLC channel, use the wrong polarity, be inverted in logic or be scaled to the wrong range. Preserve evidence from physical input to final machine action.

IdentificationExact supplied configuration

Verify model, suffix, firmware, output, protocol, connector, range, units, supply and I/O channel.

MechanicalReal target and mounting

Check gap, approach, target size, alignment, bracket, torque, dead zone, process connection and environment.

Electrical / dataCorrect receiving path

Verify PNP/NPN common or analog range, loop budget, isolation, shield, IODD, mapping, quality and diagnostics.

Discrete functionBoth transitions at real speed

Prove OFF-to-ON, ON-to-OFF, hysteresis, filter, pulse width, normal state, fault state and repeated operation.

Continuous functionLow, middle, high and faults

Prove units, direction, tolerance, response, overrange, underrange, invalid/stale data and downstream logic.

ReleaseDrawings, values and spare

Record wiring, setpoints, range, scaling, parameters, filters, acceptance result and replacement restore method.

xsz sensor manufacturing and application support facility
Factory photo: xsz sensor.
Supplier application review

Send the information needed to check the complete signal chain.

A useful recommendation requires more than a sensor category. Share the target, control decision, environment and installed I/O so the proposed model can be checked against the real machine.

1
Process and target

Material, size, surface, distance or measuring span, speed, direction and operating extremes.

2
Required information

State, value, pulse, direction, switch points, trend, feedback or diagnostic purpose.

3
Electrical and PLC path

Supply, input-module model, common, current/voltage range, IO-Link master, cable and grounding.

4
Acceptance criteria

Allowed error, repeatability, response, fault behavior, test points, documentation and OEM quantity.

Prepare the enquiry

Let xsz sensor review the task before you freeze the model.

Send the real process and controller details. We can help narrow the sensing principle, switching or measuring output, wiring, range, housing, cable and sample-test direction for an OEM or replacement project.

DecisionWhat must the PLC or operator know?
TargetMaterial, size, range, speed and direction
InterfacePLC module, signal type, supply and wiring
EnvironmentTemperature, washdown, dust, oil, vibration and EMC
PerformanceRepeatability, accuracy, response and diagnostics
SupplyQuantity, cable, connector, label and sample plan
Frequently asked questions

Discrete and continuous sensor FAQ

Short answers to the questions that commonly appear during automation design, replacement and purchasing.

What is a discrete sensor in automation?

A discrete sensor reports one of a limited number of states, usually OFF or ON. Examples include a proximity switch reporting metal present, a limit switch reporting end position or a pressure switch reporting pressure above a setpoint. The physical condition may change continuously, but the controller receives the evaluated state.

What is a continuous sensor in automation?

A continuous or measuring sensor reports the magnitude of a physical variable across a defined range. Examples include pressure, distance, level, temperature, flow and linear position sensors. The value may be carried through 4–20 mA, voltage, IO-Link or another digital protocol.

Is a continuous sensor the same as an analog sensor?

No. Continuous describes the information: a measured value across a range. Analog describes an electrical interface such as current or voltage. A continuous measurement can also be transmitted digitally through IO-Link, fieldbus or industrial Ethernet.

Can one sensor provide both discrete and continuous outputs?

Yes. Many pressure, flow, level, temperature and distance sensors provide a switching output plus analog or digital process data. Confirm the exact model, pin mode, whether outputs work simultaneously, what each output represents and how shared failures are handled.

Is a proximity sensor discrete or continuous?

It can be either. A standard inductive or photoelectric proximity switch usually provides a discrete target-present output. Analog and smart proximity sensors can report distance, position, signal strength or another measured value. Check the exact output and process data rather than classifying by sensing principle alone.

Why use 4–20 mA instead of 0–10 V?

A 4–20 mA loop is often selected for longer runs or electrically noisy environments, while 0–10 V can be straightforward for shorter machine-level runs. The correct choice depends on input availability, grounding, isolation, loop-voltage budget, cable route, response and the exact sensor and module specifications.

Can a PLC create a discrete alarm from a continuous sensor?

Yes. The PLC can compare a validated measured value with one or more thresholds. Use separate trip and reset points or hysteresis, and define behavior for invalid, stale or out-of-range data. A software alarm does not automatically replace an independent or safety-rated protective function.

What is the difference between sensor accuracy and resolution?

Resolution is the smallest output step or change the system can distinguish. Accuracy describes closeness to a suitable reference under stated conditions and may include offset, span, linearity, temperature and other errors. Many display digits do not prove matching accuracy.

Does an encoder use a normal discrete PLC input?

Not always. An encoder produces digital transitions, but position, direction and speed depend on capturing pulse count, phase and frequency correctly. If the signal exceeds an ordinary input's guaranteed pulse width or frequency, use a suitable high-speed counter, encoder, capture or motion interface.

How should a continuous sensor be commissioned?

Verify the complete loop at low, middle and high reference values, plus direction, units, output range, PLC raw value, scaling, tolerance, response, overrange, underrange, invalid or stale data, HMI display, alarms and final control action. One-point testing cannot reveal an incorrect span or reversed mapping.

Primary technical references

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