How to Choose a Magnetic Proximity Switch for Position Feedback
Choose a magnetic proximity switch by defining the position and output state you need, then matching the switch to the actual magnet and its movement. Confirm where the signal operates and releases, whether the mounting and electrical interface fit, and whether the controller recognizes the required state throughout the permitted movement. A successful response to a handheld magnet is only an initial check.

Quick Selection Guide
| Selection check | What to confirm before choosing a model |
|---|---|
| Required position and state | The mechanical region to confirm, where the signal must be absent, and whether confirmation must remain active during a stop. |
| Magnet and travel path | Magnet or cylinder identity, magnet orientation, separation, and the complete relative movement. |
| Switching behavior | Contact or electronic output, non-latching or latching behavior, and the conditions needed to reset. |
| Switching window and tolerance | Operate and release positions, repeated switching results, and permitted installation variation. |
| Mounting and environment | Housing or groove fit, mounting security, surrounding materials and magnets, and documented operating limits. |
| Output and input capture | Supply, load, output circuit, switching logic, controller input requirements, and signal duration. |
| Acceptance evidence | A recorded check of approach, hold, departure, return travel, and the controller's response under the intended conditions. |
Define the Position the Switch Must Confirm
Start with the machine's required state. “Cylinder extended” is useful only when everyone agrees how close to the end position the piston must be before that indication is accepted. Mark the acceptable confirmation region on a drawing, together with the positions where confirmation would be premature or must already have cleared.
A magnetic proximity switch provides a discrete signal in response to a magnetic target. It does not, by itself, report continuous displacement. In a cylinder application, it usually detects the piston magnet. On another mechanism, a separate magnet may travel with the moving assembly. An ordinary unmagnetized metal part is not a substitute for the specified magnet in this type of arrangement.
Also distinguish the position being detected from the process condition being inferred. A magnet attached to a clamp actuator can indicate actuator position; that signal alone does not prove that the workpiece is present or that the required clamping force has been reached. If the process needs those confirmations, identify them separately. Ordinary position feedback must not be assumed to provide a safety-rated interlock.
Match the Switch to the Magnet and Its Travel Path
Magnet Size, Polarity, and Orientation
The switch responds to the magnetic field at its sensing element. Magnet dimensions, magnetization direction, orientation, and separation determine the field presented to that element. Two magnets that fit the same bracket are therefore not automatically interchangeable.
For a Hall-based switch, the relevant field direction and polarity depend on its design. Other magnetic switching technologies have their own response characteristics. Use the finished sensor's specified sensing face or axis and compatible magnet information; the external housing shape does not establish either.
When replacing a sensor, record the magnet as part of the assembly. If its identity is unknown, supply its dimensions, mounting orientation, and the cylinder or machine identification to the supplier. A sensor test using a convenient spare magnet cannot qualify the original installation. Confirm the candidate with the magnet that will actually remain on the machine.
Approach Direction and the Complete Movement
A magnet approaching directly toward the sensing face creates a different sequence of field conditions from one passing sideways across it. Depending on the magnet and switch arrangement, travel can cross more than one actuation region. Checking only the final position can miss an earlier unwanted transition.
Trace the whole movement: approach, the required position, any overtravel, departure, and return. Note rotation or sideways movement that accompanies the main stroke. For position confirmation, the important result is a signal pattern that agrees with the mechanical requirement over that path. A strong response at one convenient point does not establish that agreement.
Choose the Required Switching Behavior
Reed Contacts and Electronic Magnetic Switches
A reed-based switch uses magnetically actuated contacts. Electronic magnetic switches use a sensing element and an output circuit; these may use Hall-effect or magnetoresistive technology. The distinction affects what the connected circuit must accept, but it does not establish a universal winner for position feedback.
A contact-output candidate needs a suitable switching rating for the actual load. An electronic-output candidate needs the correct supply and output compatibility. Both still need the right magnetic response and mounting arrangement. Choose the complete sensor configuration rather than treating the sensing technology name as a guarantee of compatibility.
Check whether the finished product contains additional circuitry, such as an indicator or protection components. Wire count alone does not describe everything inside the housing: a two-wire sensor must not automatically be treated as a bare dry contact.
Non-Latching Feedback and Latching Behavior
For a signal meaning “the mechanism is currently in this position,” non-latching behavior is generally the starting point: the state must clear when the magnet leaves the relevant region. Specify both the desired active condition and the required reset condition.
A latch behaves differently. In a conventional bipolar Hall latch, an opposite magnetic polarity is required to change the state back; simply moving the original pole away may leave the previous state retained. Such behavior can be useful when a remembered event is intended, but it cannot be substituted for present-position feedback without accounting for its reset logic.
Before ordering, describe the expected output after approach, withdrawal, reversal, and power-up. Ask for the candidate's behavior in each case. This exposes a functional mismatch that a simple “magnet detected” demonstration would not reveal.
Evaluate the Switching Window, Not Just the Sensing Distance
Operate Point, Release Point, and Hysteresis
The operate point is where the output changes into its actuated state. The release point is where it returns as the magnetic condition changes back. Hysteresis separates those thresholds. If documentation expresses thresholds in magnetic-field units, those values are not an installation tolerance in millimetres; the magnet and path determine their spatial meaning.
For selection, map where confirmation begins, remains valid, and clears. Consider a mechanism that must stop within an allowed region. The useful question is whether every permitted stop position produces the required state, while positions that must not be accepted remain distinguishable. Selecting the greatest advertised sensing distance does not answer that question.
Use the machine's acceptance limits to judge the observed switching region. An early transition is a problem if the controller interprets it as completion before the mechanism has arrived. A late release is a problem if the mechanism has left the permitted position but confirmation remains asserted. These are different failures and should be checked separately.

Repeatability and Installation Tolerance
Repeatability concerns how consistently the same arrangement switches when the test is repeated under defined conditions. Hysteresis concerns the difference between operation and release. Variation between sensors, magnets, or mounting assemblies is another issue. A narrow hysteresis specification does not prove that replacement units will all switch at the same mechanical position.
Record the spread of observed switching positions, then consider allowed bracket, magnet, and machine-position variation. Do not test an ideally centered sample and assume the result covers an installation at the edge of its adjustment range. Where practical, check representative combinations near the permitted limits.
The required allowance comes from the machine and the selected assembly. There is no universal percentage that turns a nominal sensing-distance figure into a guaranteed position window. If the acceptance region is too narrow for the observed variation, resolve the magnet, mounting, or sensing choice before treating a software adjustment as the cure.
Check the Mounting Arrangement and Surrounding Materials
Threaded Mounts, Cylinder Grooves, and Adapters
A threaded sensor on a bracket and a sensor fitted into a cylinder groove solve different mounting problems. Check not only whether the body fits, but also whether the sensing element can reach the required position and remain there after fastening. Allow room for the connector, cable bend, adjustment, and later replacement.
Cylinder sensors can detect a compatible piston magnet through an appropriate non-magnetizable cylinder wall. Groove dimensions and adapter fit are mechanical checks; piston-magnet compatibility is a separate magnetic check. A sensor sliding into the groove is not sufficient evidence that it will provide the intended feedback.
Record a repeatable mounting reference, rather than relying only on a temporary mark made during commissioning. After final tightening and cable routing, repeat the switching check. This confirms the final assembly rather than the loose, hand-adjusted setup used to find a signal.
Nearby Steel, Other Magnets, and Operating Conditions
Include nearby steel, other magnets, and the final mounting hardware in the evaluation. A bench arrangement in open space does not reproduce every condition around a machine-mounted sensor. Check neighboring actuators in their relevant positions as well as the selected actuator; otherwise, a successful test may cover only one machine configuration.
Detection through a non-magnetizable wall is possible, but “through metal” is too broad a selection claim. Establish the actual material, wall thickness, and spacing. Do not assume all stainless steels behave alike or that a compatible material permits unlimited separation.
Compare the intended temperature, vibration, moisture, and chemical exposure with the selected sensor, magnet, cable, and connector documentation. Then define which permitted operating conditions must be represented in validation. A room-temperature bench check cannot establish performance across an untested operating range. Keep unverified environmental requirements open rather than turning them into a product capability claim.
Match the Output to the Controller Input
Contact Ratings, NPN/PNP, and NO/NC Logic
Magnetic actuation and electrical compatibility are separate requirements. For a contact-output device, check the permitted voltage, switching current, and load type. Switching an inductive load can produce arcing when the contact opens, affecting contact life. Any protection arrangement must suit the particular load and circuit; a generic suppression component is not a complete design recommendation.
For common three-wire DC outputs, PNP is a sourcing arrangement and NPN is a sinking arrangement. Match the output to the receiving input circuit and its common connection. Normally open (NO) and normally closed (NC) describe switching logic, a separate choice from PNP or NPN. Neither label alone defines how the PLC program interprets the mechanical position.
For electronic two-wire devices, check off-state current, on-state voltage drop, and applicable load requirements. Their electrical behavior can differ from an ideal open or closed contact. Use the exact sensor and input documentation to establish that both states will be recognized; matching the supply voltage alone is insufficient.
Write the required relationship explicitly: magnet condition, sensor output state, controller input state, and machine meaning. This avoids discovering after installation that the indicator behaves as expected while the input or program interprets it differently.
Signal Duration, Input Filtering, and Restart Behavior
A switch used to confirm a stopped position may provide a sustained state. A moving magnet passing the same sensor may produce only a brief signal. Check the duration at operating speed against the receiving input's documented requirements, including its filter settings and the program's acquisition method.
Input filtering can reject short transitions along with unwanted noise. Reducing a filter setting is not automatically a solution: it changes what the controller accepts and must be assessed for the actual installation. Compare the sensor output with the controller's recorded state during the intended motion. The indicator alone is not proof that the required event was captured.
Also verify restart behavior with the magnet both inside and outside the intended region. Confirm when the sensor and controller become ready and how the program establishes an initial position state. Do not assume a signal retained before power loss, a latching function, or the first observed input is sufficient evidence of the mechanism's present position.
Validate the Complete Position-Feedback Setup
Use an acceptance check that can be repeated after replacement or adjustment. The following is a proposed selection method, not a report of tests already completed. Perform machine movement under the site's controlled commissioning procedure; do not bypass guards or protective functions to reach the sensor.
- Identify the assembly. Record the sensor order code, magnet or cylinder identity, mounting reference, wiring, controller input, and relevant settings. Attach the drawing that defines acceptable and unacceptable confirmation positions.
- Map the transitions at low speed. Observe operation and release along the full allowed travel in both directions. Record their locations and any additional transitions, rather than noting only that the sensor works.
- Check holding and clearing. Stop at the permitted positions and check that the required state remains stable. Move into regions where confirmation must be absent and verify that it clears. Include allowed sideways movement or orientation changes.
- Test the intended operating conditions. Repeat with final mounting, representative installation limits, normal motion profiles, and relevant neighboring equipment states. Record which environmental conditions were covered and which still need validation.
- Compare the complete signal path. Check the electrical output and the controller's interpreted state, including departure, return, and controlled restart. A mismatch should be located before accepting the assembly.
- Record the decision and unresolved items. Retain observations, test conditions, and acceptance criteria. Set the amount of repeated testing from the application requirement; do not invent a universal cycle count or reliability percentage.
A useful result states where the setup passed, under what conditions, and what remains unproven. “The LED turned on” does not provide enough information to select a replacement or reproduce the installation.
Prepare the Information Needed for Model Selection
Give the supplier a compact specification package that separates requirements from observations:
- A drawing of the required position region, the release region, movement direction, and available mounting space.
- The magnet specification or cylinder identification, including orientation and any information still unknown.
- The required output behavior during approach, holding, departure, and restart.
- The sensor supply, receiving input model, load details, connection requirements, and relevant timing settings.
- The operating conditions, mounting materials, and nearby magnetic equipment to be considered.
- Existing sample observations, acceptance criteria, and any conditions not yet tested.
For a model-selection discussion with XSZ, provide this package together with any existing sensor documentation. Confirm the proposed configuration against its actual data sheet and the installed sample checks before ordering. This gives the discussion a defined position-feedback requirement instead of asking for a replacement based only on appearance or nominal range.
Technical Sources
- Standex Detect — Magnet Interaction: magnet geometry and reed-switch actuation regions.
- Texas Instruments — Transition Detection Using Hall-Effect Sensors, SLYA055A: field thresholds, position transitions, hysteresis, and variation; revised June 2022.
- Texas Instruments — What Is a Hall-effect Sensor?, SSZT164: sensing direction and switch/latch behavior; May 2021.
- ifm — Sensors for Pneumatic Cylinders and Cylinder Sensor Technology Overview: piston-magnet detection, mounting options, and examples of magnetoresistive sensing.
- ifm — Magnetic Sensors: magnetic detection through non-magnetizable material.
- Littelfuse — Inductive Load Arc Suppression: reed-contact effects when switching inductive loads; application note, 2016.
- Pepperl+Fuchs — Magnetic Field Sensors: Three-Wire Sensors and Two-Wire Sensor Connection Principles: output circuits and electrical compatibility. The latter discusses inductive products; its electrical principles are not magnetic-sensing specifications.
- Siemens — Configuring Digital Input Filter Times: input filtering and pulse acceptance, S7-1200 manual collection V20, November 2024. Use the documentation for the installed controller to determine its settings.