AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Troubleshooting

Why a servo axis keeps moving past the home sensor

Servo and stepper motion Published 7 min read By AutomateDirectUSA engineering team

Short answer

A reversal at the home sensor can be part of the homing sequence; running on to the opposite limit means the sequence never registers the edge it must end on. Fix the homing input mapping and polarity, confirm the homing mode and its completion event, then retest at reduced commissioning speed.

On this page
  1. Reversal at the sensor is normal; the far limit is not
  2. First check: the input mapping, polarity and edge
  3. Second check: the homing mode and its completion event
  4. Third check: which device executes the sequence
  5. Stopping distance for a 30 mm free stroke at a 10 mm/s search speed
  6. The checks in order, cheapest first
  7. What a completed home looks like
  8. Questions asked

A servo axis that reverses when it reaches the home sensor may be doing exactly what its homing sequence was written to do. The fault is that the sequence never registers the edge it was configured to end on, so the search continues until the travel limit forces a stop. The two cheapest causes sit on the input side: the sensor wired or mapped into a limit function instead of the reference function, or an edge that never completes because of polarity or target geometry. After those, check the selected homing mode and which device actually executes the sequence. If the overshoot began right after a drive replacement, the input assignment changed with the drive; that variant is covered in why a servo axis runs past the limit switch after a drive swap. The checks below are written for a TIA Portal axis driven by an MC_Home instruction, but the order transfers to any controller that homes from a switch.

Reversal at the sensor is normal; the far limit is not #

Siemens' S7-1200 Motion Control documentation describes active homing as a reference-point approach that completes the reference when the homing switch is detected. Depending on the configured method, the detection that ends the sequence is a specific edge of the switch, not simply the first sight of it. A common pattern searches in one direction, reverses at the sensor, and finishes on the opposite edge, because a slow pass onto the trailing edge repeats better than a fast first contact. The sensor that starts the reversal therefore need not be the final event, and the reversal alone does not prove the controller read the sensor as a limit.

The failure signature is what happens after the reversal: the homing status stays active, no edge is ever accepted, and the axis runs on until the opposite limit trips. Watch the homing status and the physical input states together through one attempt. That single observation separates a sequence still waiting for its event from a controller that has stopped looking.

First check: the input mapping, polarity and edge #

Start with the electrical side, drives disabled and motion prevented. Trace the home sensor to its terminal, then open the technology object's homing configuration and find the Active homing section: the homing mode is selected there and the digital input for the homing switch is chosen from a drop-down list. The documented requirement for that input is that it be interrupt-capable; on-board CPU inputs meet it. A sensor wired to a point the list cannot select never delivers its edge to the sequence, whatever the wiring diagram says.

Next confirm the edge itself. A normally closed contact only inverts the electrical signal; what matters is the level configured for the homing input, so the controller sees inactive, then active, then inactive as the target passes. Correct an inverted state at that configuration point rather than scattering inverter logic through the program.

Confirming check: operate the sensor by hand and watch both the physical input indicator and the homing function's view of it. Expected result: only the reference function changes, and it follows inactive-active-inactive. If a limit function changes instead, the sensor is wired or mapped into a limit function — remap it to the reference function before touching any direction setting. Direction changes cannot fix a misidentified signal.

Second check: the homing mode and its completion event #

The method is selected with the Mode parameter of MC_Home, and the number depends on the TIA Portal and technology-object version, so take it from the MC_Home documentation for your version rather than from memory. Two documented reference points: the S7-1200 documentation as of V6 lists direct homing absolute at Mode = 0, which sets the current axis position to the value of the Position parameter with no motion at all; the documentation for the positioning axis technology object V4 with TIA Portal V18 lists active homing at Mode = 3, in which the instruction performs the reference-point approach and completes the reference when the switch is detected. A mode the configuration cannot support ends the instruction with an error instead of moving the axis, so a plain mode mismatch usually looks different from your symptom; an axis that keeps running means an active method is in use, still waiting for its event.

Confirm what that event is: which edge of the switch, and whether the method additionally needs a feedback event from the encoder. Every required event must have a physical source that occurs within the available stroke. If the sensor is unusable or the stroke cannot fit the approach, a documented alternative is homing a servo axis to a hard stop with torque limit; for an absolute encoder axis the reference normally survives power loss, with the loss case covered in why an MC_Home absolute encoder adjustment is lost after a power cycle.

Third check: which device executes the sequence #

PLC-side homing runs in the technology object, which reads the input configured in its own homing section. Drive-side homing runs in the servo drive, triggered by the PLC; the switch must then be assigned to the drive's reference function, and an assignment that puts the sensor on a drive limit input produces exactly this pattern: the drive reacts to the sensor as a limit, reverses, and finds no reference event on the way to the other end. Identify the command path from the program — whether MC_Home or a drive command starts the sequence — and configure only that device. Change one setting at a time so you can see which correction changed the behaviour.

Stopping distance for a 30 mm free stroke at a 10 mm/s search speed #

Stroke lengths and homing speeds differ from machine to machine, so this is an illustrative case: the inputs are examples, and you substitute your own.

Inputs:

  • Search speed: 10 mm/s, an example value for a reduced commissioning homing speed.
  • Axis deceleration: 50 mm/s², an example value; read the configured dynamics from your axis settings.
  • Free stroke from the sensor's far edge to the opposite limit: 30 mm, measured on the machine.

The rule in words: the distance needed to stop is the search speed squared divided by twice the deceleration.

The arithmetic: (10 mm/s)² ÷ (2 × 50 mm/s²) = 100 mm²/s² ÷ 100 mm/s² = 1 mm.

The result: about 1 mm of travel past the last edge the sequence accepts, roughly 3% of the example stroke.

The decision: with the logic fixed, these inputs leave the axis stopping comfortably inside the stroke. The threshold to check against your own numbers: if speed squared over twice the deceleration comes out larger than the free stroke, no homing method can finish before the limit trips — lower the search speed or raise the deceleration. The same deceleration at a 50 mm/s search speed needs 2500 mm²/s² ÷ 100 mm/s² = 25 mm, more than 80% of the 30 mm stroke, and methods that run a slower final approach after the edge need margin on top. This is a calculated example for these inputs, not a measured result.

The checks in order, cheapest first #

  1. Sensor mapped as a limit. Force each sensor with the drives disabled and watch the on-screen functions; only the reference function may change. Remap the sensor to the reference function.
  2. Edge that never completes. Watch the input through the target's full pass; expect inactive, active, inactive. Correct polarity or target geometry until that pattern appears.
  3. Input that cannot be selected. If the homing drop-down cannot choose the sensor's input, it is not interrupt-capable; move the sensor to an on-board CPU input.
  4. Mode or event mismatch. Compare the configured method and its final edge with the MC_Home documentation for your TIA Portal version.
  5. Drive-side homing with the wrong assignment. Confirm the command source, then assign the switch to that device's reference function.
  6. Stroke too short for the approach. Run the stopping-distance calculation above before the next powered attempt; lower the search speed if the result exceeds the free stroke.

What a completed home looks like #

Retest with one change at a time at the reduced commissioning speed. Success is the homing status completing with the axis stopped inside the stroke and the reference flag valid — a zero on the position display alone is not proof, because the controller must also report the reference as taken. Before any powered attempt, prove that the travel limits and guarding work; treat an attempt that ends on a limit as a failed test rather than a finished reference, and let the machine's risk assessment govern the procedure — this article is not a safety validation.

Questions asked

Why does the axis reverse at the home sensor before homing finishes?

Many active homing methods use two edges of the same switch: a fast search in one direction, then a slower pass that ends on the opposite edge, which repeats more consistently than the first contact at speed. The reversal itself is part of the sequence. Only travel that continues past the sensor with no edge ever accepted points to a missing completion event.

When is direct homing better than active homing?

With an absolute encoder, direct homing sets the axis position to the configured Position value instantly, with no motion and no sensor, so there is nothing to run past. It suits axes whose encoder keeps position through power loss. Active homing is the choice when a switch must define the machine reference, for example after an incremental encoder loses its position at power-off.

Does a normally closed home sensor need different settings?

The contact arrangement only inverts the electrical signal. Configure the expected level in the axis homing configuration so the controller still sees inactive, then active, then inactive as the target passes, and correct it there rather than with inverter logic scattered through the program. With the drives disabled, watch the input indicator while you move the target by hand to confirm the pattern.

How much travel does the axis need between the home sensor and the far limit?

At least the deceleration distance from the homing speed, which is the speed squared divided by twice the configured deceleration, plus margin for any slower final approach the method runs after the edge. Compute it with the velocities and dynamics set in your own axis configuration before the first powered test, and keep the result well inside the measured free stroke.

Keep reading

  • Troubleshooting

    Why a Servo Axis Runs Past the Limit Switch After a Drive Swap

    When a servo axis reaches the homing limit switch, changes speed slightly and keeps moving into an overload alarm, the switch input is confirmed good and the fault is downstream in the homing sequence. After a drive swap, check the replacement drive's input function assignment, then the homing method and direction, then firmware-dependent settings a parameter copy cannot carry — and clear the supply overvoltage before any retry.

    Servo and stepper motion

  • Explainer

    Absolute Position Control With an Incremental Encoder

    An incremental encoder cannot name the current position at power-up; it only counts motion from a starting reference. Give the axis one machine coordinate by homing to a repeatable switch event, by absolute feedback, or by restoring a still-valid position, and after that one reference it executes absolute moves as readily as relative ones.

    Servo and stepper motion

  • How-to

    Homing a Servo Axis to a Hard Stop With Torque Limit

    Approach the stop in torque control at a torque below the actuator's allowable end-stop load and low speed, accept contact only as sustained torque with near-zero velocity inside the permitted travel window, stop, then execute MC_Home with the Zero position preset method. The preset only writes the coordinate; sequence logic must qualify the stop first.

    Servo and stepper motion