Zhejiang Xinsenzheng Automation Co., Ltd.

Industrial Sensor Manufacturer OEM & Application Support Factory-direct Supply

Industrial position detection guide

Sensor for Position Detection: Options and Selection Rules

Choose the sensor by the information the controller needs. Use a switching sensor for an end point or part-present signal, a measuring sensor for continuous linear distance, and an encoder for shaft angle, travel, or motion feedback. Target, tolerance, environment, interface, and safety then decide the exact model.

  • Discrete vs continuous position
  • Linear vs rotary motion
  • Accuracy and repeatability
  • PLC output compatibility

Quick answer

First decide whether you need a switching point or a measured position.

A sensor for position detection can answer very different questions. "Has the cylinder reached the end?" needs one reliable ON/OFF point. "Where is the slide across its full stroke?" needs a continuous value. "What is the shaft angle after power returns?" may require an absolute encoder. Buying by the word "position" alone is how systems become either under-specified or needlessly expensive.

Question 1

Has the target reached a defined point?

Use a proximity, photoelectric, fiber optic, magnetic cylinder, slot, or mechanical position switch.

Typical output: PNP/NPN, NO/NC
Question 2

Where is the target inside a linear range?

Use an analog proximity, optical displacement, inductive distance, ultrasonic, LVDT, or linear-position sensor.

Typical output: voltage, current, IO-Link, serial
Question 3

What is the shaft angle, speed, or travel?

Use a rotary or linear encoder, then choose incremental or absolute feedback according to startup behavior.

Typical output: pulses or coded position

The decision before the technology

Specify the information the controller must receive.

The same machine may use all three information types at different points.

1

Discrete position

A threshold answers yes or no: home reached, clamp closed, pallet present, label edge found, or cylinder extended.

SWITCHING SIGNAL
2

Continuous linear position

A measured value reports where the target sits inside a range: gap, height, displacement, stroke, roll diameter, or tool approach.

MEASUREMENT VALUE
3

Encoded motion

Pulses or coded data report rotation, direction, speed, or absolute angle for a shaft, motor, table, or linear scale.

PULSE OR POSITION CODE
Selection rule: never buy a precision measuring sensor when the PLC only needs one end point, and never expect a single ON/OFF proximity switch to report the exact position across a stroke.

Interactive starting-point selector

Which position must your machine confirm or measure?

Select the closest task. The result narrows the technology, but the final model still depends on real application data.

Recommended starting technology

Inductive proximity sensor

Use a non-contact switching sensor when a conductive metal target only needs to confirm one defined position.

Expected signal PNP or NPN switching output, with NO or NC logic
  • Confirm target material, size, and direction of approach.
  • Reserve stable sensing margin rather than mounting at the rated limit.
  • Choose flush or non-flush construction around the available metal clearance.

If the controller needs a changing distance value rather than one switch point, move to an analog inductive or displacement sensor.

Technology comparison

Match the sensing principle to the target and motion.

No position sensor family is best everywhere. Each responds to a different physical property.

01

Inductive proximity

Detects conductive metal without contact and produces a switching point. It is a strong fit for metal stops, fixtures, machine tools, gears, and end positions where oil, dust, or target color would complicate optical sensing.

Check before selection Target metal and size, set distance, surrounding metal, flush/non-flush mounting, output logic.
02

Capacitive proximity

Detects a dielectric change from non-metal materials, liquids, powders, packaging, and many solids. It can confirm presence or level when an inductive sensor cannot see the target.

Check before selection Material, container wall, empty/full states, buildup, humidity, adjustment range, and process variation.
03

Photoelectric

Uses emitted and received light to detect an object or defined optical position. Through-beam, retro-reflective, diffuse, and background-suppression arrangements solve different conveyor and assembly layouts.

Check before selection Target size, transparency, color, gloss, speed, background, ambient light, alignment, and lens contamination.
04

Fiber optic or slot

Brings a focused optical point into narrow spaces or fixes the emitter and receiver across a small slot. Use it for tiny parts, edges, labels, holes, pins, and fast indexing where a standard sensor head will not fit.

Check before selection Minimum target, beam geometry, slot width, fiber routing, bend radius, amplifier response, and teach margin.
05

Magnetic cylinder switch

Detects the field of a magnet integrated into a pneumatic-cylinder or gripper piston through a non-magnetic wall. It provides compact, non-contact end or intermediate switching points.

Check before selection Cylinder slot, piston magnet, switch point, stroke, mounting retention, nearby magnetic fields, and output.
06

Analog proximity or displacement

Produces a changing value related to target distance instead of one threshold. Optical, inductive, ultrasonic, and other displacement principles support gap, height, stroke, thickness, and process-feedback tasks.

Check before selection Measurement window, linearity, resolution definition, repeatability, target angle, output scaling, and temperature drift.
07

Rotary or linear encoder

Converts shaft rotation or linear travel into pulses or coded position data. Use encoders when the controller needs motion, speed, direction, travel count, or angle rather than one checkpoint.

Check before selection Incremental/absolute behavior, resolution, speed, interface, coupling, shaft load, homing, and cable noise.
08

LVDT or contact displacement

LVDTs use transformer coupling around a moving core for continuous linear displacement. Contact probes directly follow the workpiece when physical access and contact force are acceptable.

Check before selection Stroke, mechanical installation, contact force when applicable, signal conditioning, calibration, and environment.

The most common selection fork

Do you need one checkpoint or the complete position?

A conveyor station and a controlled axis may both use the word "position," but their signal requirements are different.

Industrial conveyor where sensors can confirm objects at fixed positions
Conveyor control often needs discrete checkpoints such as "part arrived" or "station clear." Photo by Frans van Heerden on Pexels.

Use switching detection for sequence permission

A switching sensor is usually enough when the PLC only needs to permit the next step: part seated, clamp closed, pallet stopped, cylinder retracted, or home flag reached. Repeatable switching at the real target position matters more than an unnecessary display of millimeters.

Use continuous measurement for control or tolerance

A continuous position sensor is appropriate when the PLC must compare the measured value with several limits, regulate an actuator, monitor drift, or calculate gap, height, diameter, or stroke. Define the useful measurement window and acceptable total error before choosing the output.

Discrete example

Clamp closed confirmation

The controller needs a stable YES before machining starts. One inductive switch and a properly designed metal target may solve the task more reliably than a continuous measurement channel.

Continuous example

Clamp position monitoring

The controller must distinguish open, approach, contact, and over-travel positions. A measured signal or several independently validated switching points may be required.

Application map

Choose the sensor around the real machine position.

These starting points prevent common technology mismatches before model comparison begins.

Machine home or reference flag

Use an inductive sensor for a metal flag, photoelectric sensor for an optical flag, or a dedicated encoder index where the motion architecture requires it.

Define repeatable approach direction and stopping tolerance.

Cylinder extended or retracted

Use a magnetic cylinder switch when the piston includes a suitable magnet and the cylinder provides the required slot or bracket.

Confirm magnet compatibility, slot geometry, and switch point.

Part seated in a metal fixture

Use inductive sensing when the target is metal; use background-suppression photoelectric or fiber sensing when fixture metal would dominate the field.

Test the smallest target and worst seating tolerance.

Carton or bottle at a station

Use photoelectric sensing and select the mode around target transparency, reflectivity, available mounting sides, background, and line speed.

Test all colors, surfaces, and package variants.

Packaging registration position

Use a color-mark sensor for printed registration marks or a slot/fiber sensor for an edge, hole, label gap, or physical feature.

Provide the actual film, mark, background, and speed.

Tool gap, height, or short displacement

Use an analog inductive sensor for a suitable metal target or a displacement sensor selected for the surface, range, angle, and required performance.

Specify the complete measurement window and error budget.

Rotary table or motor shaft

Use an incremental encoder for relative motion and speed, or an absolute encoder when position must be available without a new reference move.

Confirm turns, power-loss behavior, speed, and interface.

When the task needs encoded motion

Incremental and absolute encoders answer different startup questions.

Both can report rotation or travel, but they establish position differently.

Relative motion

Incremental encoder

Produces pulses as motion occurs. The controller counts those pulses from a known reference and can use phase relationship to determine direction.

  • Good for speed, direction, and relative travel
  • Usually needs a reference or homing strategy after startup
  • Count integrity depends on wiring, input speed, mechanics, and noise control
Coded position

Absolute encoder

Reports a unique position value rather than only accumulating pulses. The controller can read the position without rebuilding the count from a chosen origin.

  • Useful when startup position must be known
  • Single-turn and multi-turn requirements must be separated
  • Interface, retained turns, and power-loss behavior remain model-specific
Important: an absolute reading can reduce the need for a homing move, but it does not automatically make an axis safe. Any position used to protect people requires a safety-rated device, architecture, validation, and risk assessment appropriate to the machine.

Performance terms buyers often mix up

Resolution is not accuracy, and neither guarantees repeatability.

Read the exact definition, test conditions, target, and temperature range attached to every number.

Resolution

The smallest distinguishable step or the specified output fluctuation, depending on sensor type and datasheet definition.

Accuracy

How close the reported position is to the accepted reference after all stated errors are considered.

Repeatability

How closely repeated readings or switch points agree under the same approach and conditions.

Linearity

How far a continuous output departs from its specified ideal line across the measurement range.

Hysteresis

The difference between operate and reset points when the target approaches and then moves away.

Build a position error budget

Do not assign the complete process tolerance to the sensor alone.

  • Mechanical backlash and compliance
  • Target and bracket movement
  • Sensor repeatability or measurement error
  • Temperature and voltage effects
  • Controller conversion and scaling
  • Calibration and reference uncertainty
  • Approach direction and hysteresis
  • Production target variation

Why more digits may add no usable information

A display or data word can show very small increments while the mechanism moves unpredictably by a larger amount. If backlash, vibration, target variation, or thermal movement exceeds the sensor's fine resolution, the extra digits mainly reveal system movement rather than useful process capability.

Why repeated approach direction matters

Switching sensors have hysteresis, and mechanical systems have backlash. Commission a reference point using the same approach direction and realistic speed used in production. Test from both directions when the machine can reach the position either way.

Compare like with like. Encoder resolution may be stated as pulses or counts per revolution, while a displacement sensor may define resolution as static output fluctuation. The number and unit alone do not make them equivalent.
Industrial engineer commissioning a CNC machine where sensor performance must match mechanics
Position performance belongs to the complete machine, including mechanics, mounting, controller, and sensor. Photo by Sergey Sergeev on Pexels.

Environmental screening

The target and installation eliminate technologies before price does.

Use the matrix as a screening tool, then confirm every environmental rating in the exact product documentation.

Condition Strong starting point Main risk to check Application evidence
Metal target with oil or dust Inductive proximity or analog inductive Metal chips, surrounding steel, wrong set distance Target material/size, gap range, mounting drawing, contamination sample
Mixed cartons, bottles, or trays Photoelectric mode matched to layout Color, gloss, transparency, background, ambient light All target variants, background distance, speed, mounting sides
Very small target or narrow space Fiber optic or slot sensor Beam geometry, fiber bend, alignment, response margin Minimum target, gap, orientation, speed, available head space
Pneumatic cylinder position Magnetic cylinder switch Wrong slot, weak/incompatible piston magnet, switch movement Cylinder model, slot profile, stroke, desired switch points
Washdown, coolant, or condensation Sealed technology appropriate to target Connector sealing, chemical compatibility, lens or face buildup Fluid, pressure, temperature, cleaning cycle, mated connector
High temperature near the target Rated high-temperature sensor or remote sensing head Cable, amplifier, magnet, adhesive, and electronics temperature limits Continuous and peak temperature, duration, distance from heat source
VFDs, welders, or moving cables Any suitable principle with correct EMC and cable design Noise coupling, surge, grounding, cable fatigue, lost counts Cable route, drive wiring, cycle count, bend radius, input circuit
An IP rating is not a complete washdown specification. Confirm the exact housing, connector, cable entry, chemical exposure, pressure, temperature, and installation conditions.

Controller compatibility

Choose the signal and input together.

A correct sensing principle can still fail at commissioning when its output does not match the PLC, counter, drive, or motion controller. Confirm the complete electrical interface before ordering.

  • DiscretePNP or NPN, NO or NC, voltage, switching current, response time, connector pinout.
  • AnalogVoltage or current range, scaling direction, load/input impedance, resolution, fault behavior.
  • Encoder pulsesA/B/Z phases, line driver or other output circuit, maximum frequency, counter compatibility.
  • Absolute dataSingle-turn or multi-turn, bit resolution, interface, update rate, startup and retained-position behavior.
  • Smart sensingIO-Link or serial support, process data map, parameter storage, diagnostics, and master compatibility.
Industrial control cabinets that receive position sensor signals
The sensor, cable, input module, scaling, and program must form one compatible signal path. Photo by Shameer Vayalakkad Hydrose on Pexels.

Selection mistakes that create field problems

Most failures begin with an incomplete requirement.

Correct the question before changing the model.

Wrong information type

Using a switch when the controller needs a measurement

A single threshold cannot report the complete stroke. Define every value or state the program must distinguish.

Unusable precision

Buying resolution finer than the mechanism can repeat

Backlash, target movement, vibration, and temperature may exceed the sensor's smallest reported step.

Catalog-only target

Testing one ideal target instead of all production variants

Metal grade, target size, color, gloss, transparency, angle, and surface condition can change detection.

Range without margin

Installing at the edge of the rated operating range

Reserve margin for tolerance, temperature, voltage, mounting drift, contamination, and real target behavior.

Interface mismatch

Ordering before checking the PLC or counter input

PNP/NPN, analog range, pulse frequency, line receiver, pinout, and software scaling must be confirmed together.

Safety assumption

Using a standard detection sensor as a personnel safeguard

A normal position sensor is not automatically a safety component. Use the required safety-rated system and validation.

Commissioning sequence

Validate the position signal on the real machine.

Bench detection proves function, not production margin.

1

Define the required machine decision

Write the needed position states or measurement range, process tolerance, direction, speed, and power-loss behavior.

A statement such as "detect position accurately" is not yet a measurable requirement.
2

Test the worst target

Use the smallest metal part, darkest package, weakest magnet, most reflective surface, or largest expected gap variation.

Include production tolerances, not only a clean engineering sample.
3

Install with mechanical margin

Follow model-specific mounting clearances, alignment, bracket rigidity, coupling, shaft load, and cable bend requirements.

Record the final gap and bracket position so replacements can be installed consistently.
4

Verify the electrical interface

Confirm supply, output circuit, input common, analog scaling, pulse frequency, connector mapping, and controller configuration.

Check the exact model suffix and input-module channel type.
5

Run the complete motion envelope

Approach from both directions where applicable, use real speed, and test minimum and maximum positions across repeated cycles.

Observe hysteresis, overshoot, target wobble, lost counts, and unexpected switch points.
6

Test the real environment

Operate motors, VFDs, adjacent sensors, washdown, lighting, temperature, and any machine events that can change the signal.

A quiet machine does not reproduce production noise, heat, vibration, or contamination.
7

Document acceptance limits

Save switch points, scaling, teach values, calibration reference, firmware parameters, wiring, and acceptable variation.

The next replacement should reproduce the approved setup without rediscovering it.

Do not use a standard position sensor as a protective device for people.

If the position signal controls access, hazardous motion, brake release, or another safety function, use components and an architecture designed and rated for that safety function. Perform the required machine risk assessment, wiring design, diagnostics, validation, and proof testing.

RFQ and sample checklist

Provide these details before asking for a model.

A complete application description reduces sample changes and makes supplier comparisons meaningful.

Requirement What to provide Why it changes the sensor
Position information Discrete points, continuous range, or rotary/linear feedback Separates switching sensors, measuring sensors, and encoders.
Motion Linear or rotary, stroke/angle, direction, speed, cycle rate Sets sensing geometry, response, and mechanical interface.
Target Material, size, shape, color, surface, magnet, and actual samples Determines whether inductive, capacitive, magnetic, or optical sensing is viable.
Distance and tolerance Minimum/maximum gap, required switch window, process tolerance Defines range, margin, repeatability, and measurement performance.
Mechanics Mounting drawing/photo, space, metal, bracket, cylinder slot, shaft Changes housing, flush/non-flush style, head shape, and coupling.
Environment Temperature, dust, oil, water, chemicals, vibration, washdown, light Changes housing, sealing, optical method, cable, and maintenance.
Controller Supply, PLC/input model, PNP/NPN, analog range, counter or bus Prevents output, frequency, scaling, and pinout mismatch.
Startup and safety Homing allowed, position retention, safety function, fault response Affects incremental/absolute choice and need for safety-rated architecture.
Commercial Quantity, connector/cable, OEM label, destination, sample schedule Confirms build configuration and repeat-order requirements.

Need a position sensor for an XSZ-supported detection task?

Send the target, required position, minimum and maximum gap, machine photo, speed, environment, supply voltage, controller input, cable or connector, and quantity. XSZ can help narrow suitable proximity, photoelectric, fiber optic, analog, and magnetic-switch options.

Discuss your application

Frequently asked questions

Sensor for position detection FAQ

Direct answers for machine builders, automation engineers, and industrial buyers.

Which sensor is best for industrial position detection?

There is no universal best type. Use an inductive sensor for a metal checkpoint, a photoelectric sensor for optical object position, a magnetic switch for a cylinder piston, a fiber or slot sensor for a small target, an analog or displacement sensor for continuous distance, and an encoder for shaft angle or motion feedback.

What is the difference between a proximity sensor and a position sensor?

A standard switching proximity sensor usually reports whether a target crossed one threshold. The broader term position sensor also includes continuous displacement sensors and encoders that report where an object or shaft sits across a range. Analog proximity sensors can bridge the two categories by returning a changing value inside a limited sensing window.

Which sensor should detect a metal end position?

An inductive proximity sensor is a strong starting point because it detects conductive metal without contact. Confirm the target metal and size, stable set distance, flush or non-flush mounting, surrounding-metal clearance, output type, and environment before choosing the model.

Can a photoelectric sensor be used for position detection?

Yes. A photoelectric sensor can provide a repeatable switching point when an object reaches or interrupts a beam. Select the sensing mode around target transparency, color, gloss, speed, background, alignment, and available mounting sides. Use a displacement sensor when the controller needs a continuous distance value.

What sensor detects pneumatic cylinder position?

A magnetic cylinder switch commonly detects a magnet integrated into the piston through a non-magnetic actuator wall. Match the switch to the cylinder slot, magnet, desired end or intermediate point, output, connector, speed, and environment.

When do I need an absolute encoder instead of an incremental encoder?

Choose absolute feedback when the controller must read a unique position without rebuilding a relative count from a reference. Choose incremental feedback when pulse-based relative motion, speed, and direction are sufficient and the system has an acceptable reference or homing strategy. Confirm single-turn or multi-turn behavior and interface details.

Is higher sensor resolution always better?

No. Resolution does not equal accuracy or repeatability. Very fine output steps add little process value when mechanical backlash, vibration, target variation, thermal movement, or calibration uncertainty is larger. Select performance from the complete position-error budget.

How do I choose between 0-10 V and 4-20 mA position output?

Start with the available PLC analog input, cable length, electrical-noise environment, load or input limits, scaling, and required fault behavior. Current and voltage outputs have different wiring and compliance requirements. Use the exact sensor and input-module specifications rather than a universal distance rule.

Can a normal position sensor be used for machine safety?

Not automatically. A standard detection sensor should not be treated as a protective device for people. A safety function requires safety-rated components and architecture selected from the machine risk assessment, followed by suitable diagnostics, validation, and proof testing.

Technical references and image sources

  1. OMRON: Overview of Proximity Sensors - non-contact position detection and sensing classifications.
  2. OMRON: Overview of Photoelectric Sensors - sensing modes and optical selection factors.
  3. OMRON: Displacement and Measurement Sensor Principles - continuous distance and measurement outputs.
  4. OMRON FAQ01465: Resolution - why resolution does not represent distance accuracy.
  5. OMRON: Overview of Rotary Encoders - incremental and absolute position feedback.
  6. Balluff: Monitor Piston Position on Cylinders - magnetic detection through the actuator wall.
  7. Balluff: Electrical Wiring of Sensors - PNP, NPN, NO, and NC fundamentals.
  8. OMRON: Proximity Sensor Safety Precautions - application, mounting, wiring, and safety limitations.
  9. Hero photo: Freek Wolsink on Pexels; additional photo credits are shown below each image.
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