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.
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/NCWhere 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, serialWhat 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 positionThe decision before the technology
Specify the information the controller must receive.
The same machine may use all three information types at different points.
Discrete position
A threshold answers yes or no: home reached, clamp closed, pallet present, label edge found, or cylinder extended.
SWITCHING SIGNALContinuous linear position
A measured value reports where the target sits inside a range: gap, height, displacement, stroke, roll diameter, or tool approach.
MEASUREMENT VALUEEncoded motion
Pulses or coded data report rotation, direction, speed, or absolute angle for a shaft, motor, table, or linear scale.
PULSE OR POSITION CODEInteractive 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.
- 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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.
The smallest distinguishable step or the specified output fluctuation, depending on sensor type and datasheet definition.
How close the reported position is to the accepted reference after all stated errors are considered.
How closely repeated readings or switch points agree under the same approach and conditions.
How far a continuous output departs from its specified ideal line across the measurement range.
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.
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 |
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.
Selection mistakes that create field problems
Most failures begin with an incomplete requirement.
Correct the question before changing the model.
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.
Buying resolution finer than the mechanism can repeat
Backlash, target movement, vibration, and temperature may exceed the sensor's smallest reported step.
Testing one ideal target instead of all production variants
Metal grade, target size, color, gloss, transparency, angle, and surface condition can change detection.
Installing at the edge of the rated operating range
Reserve margin for tolerance, temperature, voltage, mounting drift, contamination, and real target behavior.
Ordering before checking the PLC or counter input
PNP/NPN, analog range, pulse frequency, line receiver, pinout, and software scaling must be confirmed together.
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.
Define the required machine decision
Write the needed position states or measurement range, process tolerance, direction, speed, and power-loss behavior.
Test the worst target
Use the smallest metal part, darkest package, weakest magnet, most reflective surface, or largest expected gap variation.
Install with mechanical margin
Follow model-specific mounting clearances, alignment, bracket rigidity, coupling, shaft load, and cable bend requirements.
Verify the electrical interface
Confirm supply, output circuit, input common, analog scaling, pulse frequency, connector mapping, and controller configuration.
Run the complete motion envelope
Approach from both directions where applicable, use real speed, and test minimum and maximum positions across repeated cycles.
Test the real environment
Operate motors, VFDs, adjacent sensors, washdown, lighting, temperature, and any machine events that can change the signal.
Document acceptance limits
Save switch points, scaling, teach values, calibration reference, firmware parameters, wiring, and acceptable variation.
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.
Continue your selection
Compare the XSZ sensor families related to position detection.
Use the technology that matches the target and signal requirement identified above.
Proximity Sensors Overview
Compare inductive, capacitive, analog, ring, long-distance, and high-temperature options.
Compare proximity sensors → Continuous feedbackAnalog Proximity Sensors
Review short-range metal distance and position feedback for compatible analog applications.
Review analog options → Optical positionPhotoelectric Sensors Overview
Choose through-beam, retro-reflective, diffuse, or background-suppression arrangements.
Compare photoelectric modes → Small targetsFiber Optic Sensors Overview
Detect small parts, edges, labels, and narrow-space positions with compact fiber heads.
Explore fiber sensing → Cylinder positionMagnetic Switches
Confirm piston and gripper positions using a suitable cylinder magnet and mounting arrangement.
Review magnetic switches → Broader selectionHow to Choose Industrial Sensors
Build a complete requirement around target, distance, environment, output, and supplier support.
Open the selection guide →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
- OMRON: Overview of Proximity Sensors - non-contact position detection and sensing classifications.
- OMRON: Overview of Photoelectric Sensors - sensing modes and optical selection factors.
- OMRON: Displacement and Measurement Sensor Principles - continuous distance and measurement outputs.
- OMRON FAQ01465: Resolution - why resolution does not represent distance accuracy.
- OMRON: Overview of Rotary Encoders - incremental and absolute position feedback.
- Balluff: Monitor Piston Position on Cylinders - magnetic detection through the actuator wall.
- Balluff: Electrical Wiring of Sensors - PNP, NPN, NO, and NC fundamentals.
- OMRON: Proximity Sensor Safety Precautions - application, mounting, wiring, and safety limitations.
- Hero photo: Freek Wolsink on Pexels; additional photo credits are shown below each image.