Explainer
What an upper Z-axis limit switch needs for stopping clearance
Short answer
An upper Z-axis limit switch marks a detection point, not a stop. The gap from detection to the first mechanical contact must exceed the axis stopping travel, which is about 13 mm for an axis detecting at 50 mm/s with a 10 ms delay and a 100 mm/s² deceleration. Mount the detection point at least 20 mm before first contact, measure the real stopping travel at working speed, and configure the stop to hold a vertical load.

On this page
- What the switch actually does
- The stopping-travel formula
- Sizing the clearance for a Z axis detecting at 50 mm/s
- On a vertical axis the stop must also hold the load
- Mount the switch for its detection point, not its body
- Prove the clearance with a controlled approach
- When the input trips but the axis keeps moving
- The decisions
- Questions asked
An upper Z-axis limit switch is a detection point, not a stop. What it buys you is warning distance: the clearance that matters is the gap between the switch's detection point and the first thing the rising axis can hit, and that gap must exceed the axis's stopping travel — the speed at detection times the total delay, plus speed squared over twice the deceleration. For a Z axis detecting at 50 mm/s with a 10 ms delay and a 100 mm/s² deceleration, the arithmetic lands near 13 mm, so I put the detection point at least 20 mm below the first contact. The sections below give the formula, the worked numbers, the vertical-axis holding requirement, and what to check when the input trips but the axis keeps moving.
What the switch actually does #
A travel-limit switch — mechanical plunger, inductive sensor, or a software limit in the controller — changes an electrical state at a position. Nothing in that state removes the axis's kinetic energy. Between detection and a stopped axis sit the sensor's response time, the controller's scan or cycle, the stop command's path, and the drive's deceleration ramp, and the axis covers distance during every one of them. A Mitsubishi AC servo training text puts the intent plainly: operate the limit and the servo motor stops — but stopping means a ramp to zero speed, and the ramp is distance.
Some controllers make the dependency explicit in their documentation. On the Siemens S7-1500T, a software limit switch set to stop with current dynamic values stops the axis using the programmed dynamics of the active job, so a faster approach produces a longer stop by construction. Treat the switch as a tripwire with a reaction time, and size the space behind it for that reaction. Keep its job in perspective too: Beckhoff's AX5000 servo drive documentation states that its limit switch monitoring is purely functional and not suitable for personal protection — machine protection only, unless the entire sensing, logic and stopping chain has been designed and validated as a safety function.
The stopping-travel formula #
In words: stopping travel = (velocity at detection × total delay) + (velocity² ÷ (2 × deceleration)). The first term is the coast before the ramp starts; the second is the ramp itself. Convert to consistent units — metres, seconds, metres per second squared — before computing.
The three inputs come from three places. The velocity is the fastest command that can cross the detection point, and your motion program sets it. The total delay bundles sensor response, input processing and drive reaction; the sensor datasheet and the controller and drive documentation give those figures. The deceleration is whatever the configured stop actually commands, and the drive's user manual is where stop modes live — Rockwell's Kinetix 5500 servo drives manual is one such document. The formula assumes constant speed during the delay and constant deceleration after; real profiles can differ either way, which is why the last step is a measurement.
Two sensitivities fall out of the algebra: the delay term grows in proportion to speed, and the deceleration term grows with its square, so doubling the approach speed roughly quadruples the stopping travel.
Sizing the clearance for a Z axis detecting at 50 mm/s #
Each input below is an example value so the arithmetic is concrete — replace them with your own before mounting anything.
- Approach velocity v = 50 mm/s = 0.05 m/s — the programmed upward jog speed. Size for the fastest command that can cross the switch.
- Total delay t = 10 ms = 0.010 s — sensor response plus input processing plus drive reaction. Bundle the real figures from the sensor datasheet and the controller and drive documentation.
- Deceleration a = 100 mm/s² = 0.1 m/s² — what the configured limit stop commands. Read the stop ramp from the drive documentation; on controllers like the Siemens behavior above, that is simply the active job's dynamics.
Formula in words: stopping travel = velocity × delay + velocity² ÷ (2 × deceleration).
Arithmetic:
- Delay term: 0.05 m/s × 0.010 s = 0.0005 m = 0.5 mm.
- Deceleration term: (0.05 m/s)² ÷ (2 × 0.1 m/s²) = 0.0025 m²/s² ÷ 0.2 m/s² = 0.0125 m = 12.5 mm.
- Total: 0.5 mm + 12.5 mm = 13 mm of travel between detection and standstill for these inputs.
Decision: the first mechanical contact — spindle nose, tool, fixture, way-cover lip, cable carrier — must sit further from the detection point than that travel. My working margin is half again the calculated figure for repeatability, load and supply variation, so on this axis I put the detection point at least 20 mm below the first contact. If the frame cannot yield the room, halve the approach speed and the deceleration term falls to a quarter, or double the configured deceleration and it halves — then recompute and re-measure.
With the same delay and deceleration, approach speed is what moves the number. These are calculated examples for those inputs, not measured results:
| Approach speed at detection | Delay term | Deceleration term | Total stopping travel |
|---|---|---|---|
| 10 mm/s | 0.1 mm | 0.5 mm | 0.6 mm |
| 50 mm/s | 0.5 mm | 12.5 mm | 13 mm |
| 100 mm/s | 1 mm | 50 mm | 51 mm |
| 200 mm/s | 2 mm | 200 mm | 202 mm |
The deceleration term dominates from the mid-range upward, which is why a careful slow jog hides a clearance problem that working speed exposes.
On a vertical axis the stop must also hold the load #
On a Z axis the load does not disappear when motion stops. If the configured upper-limit response ends with the drive disabled or the motor unpowered, gravity takes over, and a low-friction screw or a worn brake lets the head run back down — away from the upper limit, which is fortunate, but violent with a heavy head. Configure a stop that ends in a holding state: drive-controlled deceleration into a standstill with the brake engaged or motion inhibited. IEC 60204-1's stop categories describe the choices, and this is the shape of a category 1 stop — controlled deceleration with power present until standstill. If the axis already drifts or the motor runs hot simply holding position, suspect the counterbalance or brake first; that failure pattern is described in why a vertical axis servo motor overheats: counterbalance loss.
Mount the switch for its detection point, not its body #
Dimension from the sensing point, not the housing. On an inductive switch the detection point is where the target first enters the rated sensing range, and the sensor's repeatability and hysteresis smear it slightly — take both figures from the sensor datasheet. Keep the target inside the rated sensing range over the full stroke, including wobble and vibration; a bolt or washer on the moving carriage is the usual target, and the geometry that makes that detection reliable is covered in how a proximity switch detects a target bolt on an axis.
Converting a machine that ran a mechanical limit has one more trap: the striker lever has its own overtravel and its own trip position, so the old switch's mounting location is not the new detection point. That conversion is covered in replacing a mechanical limit switch with a proximity sensor. Whatever the hardware, establish the detection point empirically: jog until the input changes, record that encoder position, and treat it as the zero of every clearance measurement.
Prove the clearance with a controlled approach #
Before loosening a bracket on a vertical axis, support the gravity-loaded head per the machine's lockout practice. Then verify in this order:
- Jog slowly toward the switch and record the encoder position where the input changes; that is the detection point.
- Let the stop complete and record where the axis comes to rest; the difference from the detection point is the measured stopping travel.
- Repeat at the fastest approach the axis is permitted to use. A slow jog proves the wiring and the input; it never proves the clearance, because travel grows with the square of speed.
- Compare the stopped position with the first contact under the worst case: longest tool, tallest fixture, fully extended cable carrier.
- Confirm the controller reports the limit, refuses further upward travel, and that acknowledging or releasing the limit starts no unexpected motion.
If an approach ends with the axis already past the switch, stop and recover it by the documented method rather than powering it out blindly — the steps are in safe recovery for a servo axis stuck beyond its travel limit.
When the input trips but the axis keeps moving #
A trip without a stop is a signal-chain or configuration fault, not a clearance problem. Work from cheapest to dearest:
- Compare the sensor's indicator with the controller's input diagnostic while you move the target through the sensing range by hand; a mismatch points to supply, wiring or interface type.
- Check the input's assignment and polarity in the axis configuration.
- Check that the limit function is armed. Many controllers ignore travel limits until homing has established the position, and some use the homing input itself as the limit afterward; the convention is documented controller by controller.
- Check what the stop is configured to do on the drive. A stop mode left at coast, or a deceleration configured near zero, turns a working signal into a long roll.
- If the trouble began after a drive swap, suspect phasing and signal mapping first; that failure pattern is in why a servo axis runs past the limit switch after a drive swap.
The decisions #
Per case, then. Clearance: stopping travel plus margin, measured rather than assumed — for the worked inputs that means the detection point sits at least 20 mm below the first contact. Frame too tight: cut the approach speed or raise the configured deceleration, recompute with your own inputs, and re-measure. Vertical axis: a stop that ends holding the load, never a coast. Input trips but the axis keeps moving: signal chain, arming, then stop configuration, in that order. People near the axis: the limit switch is not the safeguard — the machine's risk assessment and the safety-standard requirements for safety-related controls govern what is.
Questions asked
Does the axis stop exactly where the limit switch sits?
No. The switch only reports that the target has reached the detection point. Travel then continues for the sensor response, the controller scan, the drive reaction and the deceleration ramp. With the worked example's 50 mm/s approach, 10 ms delay and 100 mm/s² deceleration, that comes to about 13 mm, which is why the detection point must sit clear of the first contact.
Can the homing input also serve as the upper limit?
On many controllers yes, and some document the convention directly: during homing the input locates the axis, and after homing the same input acts as a limit. Check the controller's axis documentation for whether your input changes role after homing, and configure a stop response for it. Until homing completes, treat travel toward that direction as unprotected and keep approach speeds low.
How much margin goes on top of the calculated stopping travel?
A working rule of thumb is half again the calculated figure, rounded up, plus the sensor's repeatability from its datasheet. Widen it when the approach speed is not fixed, the load varies, or the sensor supply voltage can droop, because each of those moves the real stopping point. Then confirm the margin with a measured approach at the fastest permitted speed and compare the stopped position with the first contact.
Why did a slow test approach pass but the axis hit at working speed?
Stopping travel grows with the square of the speed. At the example's deceleration, an axis arriving at 10 mm/s stops within about 0.6 mm of the detection point; at the example's full jog speed the same arithmetic needs more than twenty times that. A reduced-speed check proves the wiring and the input, never the clearance, so repeat the measurement at working speed.
Does a heavier load increase the stopping travel?
Not by itself. With a servo, stopping travel follows the configured deceleration as long as the drive can deliver the torque the ramp needs; if the load demands more torque than the stop allows, the real deceleration drops and the travel grows. A heavier vertical load also raises the holding question after the standstill. Take the deceleration limit from the drive documentation and, for heavy heads, verify with a measured approach at working speed.
