Troubleshooting
Why a Servo Axis Runs Away During Tuning
Short answer
A servo that completes its commanded move, then throws itself into reverse at full speed while the velocity command has no effect, has a feedback fault: reversed encoder direction, or open, crossed or noisy encoder wiring. Uncouple the motors, verify feedback polarity and continuity with the drive disabled, then retune from default gains. Raising gains cannot fix positive feedback.
On this page
A servo axis that finishes its commanded move and then throws itself into reverse at full speed, while the velocity setting has no effect, has a feedback fault — reversed feedback direction, or open, crossed, or noisy encoder wiring — not a tuning problem. The same root cause explains the sibling symptom of an axis that never moves and reports Position Error Exceeded: the controller is comparing its command against a position signal that does not represent the shaft. The first action is mechanical, not electrical. Uncouple the motors from the screws before the next live move, because a saturated servo obeys nothing but full torque through the gearbox, and in the documented field case the limits did not stop it before it tore a coupling apart. Then verify feedback polarity and continuity with the drive disabled, restore the default gains, and only after that retune.
What the symptom pair tells you #
A position loop subtracts measured position from commanded position and drives the motor to shrink the difference. That only works while the feedback counts move the way the controller expects. Reverse the feedback direction and every correction grows the error instead of shrinking it: the loop commands more speed, the error grows further, and the drive output saturates at full command. Feed the loop counts that jump or drop out and the calculated error stops representing the shaft at all, with the same end state — a saturated drive.
Saturation is what the controls are telling you. Below saturation, axis speed follows the profile velocity; at saturation it follows available torque and nothing else. The field case changed the commanded velocity and the reversal speed did not move — that is the signature of a saturated loop, not a mistuned one. On a brushed DC servo the matching polarity fault is swapped armature leads; on a brushless servo it is the feedback or commutation mapping, and the motors in this case were brushless. A drive taking an analog speed command adds one more reversal path, a swapped command pair, though that one usually fails on the first fraction of the first move. Feedback that degrades partway through can instead let a move finish and then diverge, which matches a completed 50 mm command followed by a reversal. The uncoupled checks below decide between direction and integrity; the symptom alone does not.
This is a different fault from why a servo oscillates between two positions. Oscillation is a stability-margin problem the gains can fix; a post-move reversal that ignores the velocity command is a feedback fault the gains cannot touch.
The branch table: one axis at a time #
Diagnose one axis at a time. The axis that still runs is a reference for your controller and your test method, not evidence about the other two: it has its own motor, load, and wiring. In the field case, X ran its move and then reversed destructively, Y never moved and faulted, and Z ran normally — and both faulted axes had just been rewired, re-motored, and moved to a higher DC bus with changes inside the drives. The fault arrived with the rework, which is where the checks start.
| Observed behavior | First checks, cheapest first | What the result decides |
|---|---|---|
| Completes the 50 mm move, reverses at full speed, overruns the limits, tears the coupling; velocity setting ignored, integral gain changes the speed | Encoder connector seating and pinout against the documentation; conductor-by-conductor continuity with the cable flexed; feedback sign and smoothness by hand-rotating the uncoupled shaft; shield and ground path | Wrong sign means feedback direction; jumping or dropping counts mean feedback integrity; both clean means check the command path and the drive settings changed during the supply upgrade, then retune from defaults |
| No motion at all; Position Error Exceeded on every attempt | Replacement motor's power and feedback connectors against the working axis; then substitute a known-working motor on that axis | Known-good motor runs means the fault is the replacement motor or its plug wiring; known-good motor also fails means drive, supply, or controller channel |
| Runs normally | None; reference only | Confirms the controller and your test method; proves nothing about the other axes' wiring |
The substitution test is the fastest split on the dead axis. In the field case the original Y motor still ran after the replacement motor would not, isolating the fault to the replacement motor or its plug wiring in one swap. A substitution proves something only when motor, drive, and wiring compatibility are confirmed before power goes on. For what to measure on the suspect motor itself, see how to tell if a servo motor is actually faulty.
Before the next live move: uncouple and inspect #
Isolate and lock out the drive supply, and confirm the bus is discharged before touching any connector. Uncouple both faulted motors from their screws, secure each one so a free shaft cannot whip, and keep the machine in a clear, supervised area while any axis is energized. Treat the limit switches as travel inputs, not a controlled stop: in the field case the axis ran straight through them.
With power off, inspect the torn coupling, both shafts, the screw, and the actuator for cracks, looseness, or binding, and turn the screw by hand where the design permits; a screw that binds will fault a healthy servo. A torn metal flex coupling is not a repairable part — replace it with a flexible shaft coupling matched to the shaft sizes and transmitted torque before that axis runs again.
The uncoupled test sequence #
Work with the drive disabled unless a step says otherwise, and one axis at a time.
- Photograph and label both ends of every motor and encoder connector. Do not trust matching wire colors between axes — the field case motors were wired alike, and interchangeability is what these checks must prove, not assume.
- Identify every pin function from the motor and drive documentation. Motor power and encoder feedback are separate circuits; check them separately.
- Check each conductor end to end for continuity, and for shorts to adjacent conductors and to the shield. Pass is continuity on the intended path and nothing else.
- Flex the cable along its length while watching the meter. An intermittent conductor shows itself under flex, not at rest.
- Reseat the connectors and inspect crimps, bent contacts, and strain relief.
- Hand-rotate the uncoupled shaft and watch the controller's position display. Counts must change smoothly and monotonically, with the sign that matches the direction you turned. Jumps or dropouts mean feedback integrity; the wrong sign means feedback direction. This one check separates the two candidate causes.
- Verify the limit and home inputs electrically: operate each switch by hand and watch the controller's input status change once, reliably, and confirm the configured active state matches the real input.
- First live command: motor still uncoupled, low speed, short positive command, hand near the disable. Stop immediately if measured position moves the wrong way, jumps, or does not change.
- Only an axis that passes gets recoupled — and then with default gains, following the drive maker's tuning procedure.
On cabling: the field case ran unshielded ribbon cable throughout, and separating the power and feedback runs by several feet changed nothing, so separation alone does not clear a feedback fault. Replace the feedback run with the shielded twisted pair the drive documentation specifies, ground the shield where that documentation says, and treat single-ended encoder outputs as the weak point. Any feedback retermination puts you back at step 6 — re-verify sign and smoothness before the next commanded move; fixing servo travel error after swapping resolver and encoder covers the same class of fault when the feedback device itself changes.
Why raising the gains makes it worse #
The field case's tuner showed the tell: the default integral value of 0.5, raised to 5 and then 10, increased the speed of a move whose velocity setting did nothing. An integrator ramps its output while any error persists; on a false error it winds the command up until the drive saturates, and a steeper integrator — 10 is twenty times 0.5 — gets there sooner and stays there. Gains multiply the error they are handed; they cannot correct its sign or its source. Restore every adjustment to the documented defaults before further tuning, because an arbitrarily adjusted loop can be unstable on its own account, and then follow the published procedure from that known state.
Worked example: a 50 mm command through a 10:1 gearhead and a 20 mm lead #
This is a calculated example for these inputs, not a measured result.
Inputs.
- Screw lead: 20 mm of table travel per screw revolution (the actuator's rated lead in the field case).
- Gearhead ratio: 10:1, motor to screw (field case).
- Commanded tuning move: 50 mm (the move that completed).
- Usable axis travel: 500 mm (the axis's rated travel).
Rule. Table travel per motor revolution equals the screw lead divided by the gear ratio, and the motor revolutions for a move equal the move distance divided by that figure.
Arithmetic.
- 20 mm/rev ÷ 10 = 2.0 mm of table travel per motor revolution.
- 50 mm ÷ 2.0 mm/rev = 25 motor revolutions for the commanded move, which is 50 mm ÷ 20 mm/rev = 2.5 turns of the screw.
- 500 mm ÷ 2.0 mm/rev = 250 motor revolutions from end to end of the axis.
Result. The part of the move that behaved was 2.5 screw turns, and every motor revolution of the reversal that followed carried the table 2 mm, so the reversal distance was set by how long the drive stayed saturated — not by anything in the move profile. For comparison, the same motor and gearbox on the 10 mm lead of the dead axis would be 1.0 mm per motor revolution.
Decision. The velocity test has already been run, unintentionally, in this case: commanded velocity changed and the reversal speed did not. That is a saturated loop, and at 2 mm of table travel per motor revolution the reversal covers ground as fast as the motor and gearbox allow, for as long as the false error persists — the limits never had a chance. Treat it as a feedback direction or integrity fault and stop tuning. The rule going forward: if axis speed ignores a halved velocity command, fix feedback first; if speed follows the command, restore the documented default gains and retune by the drive maker's procedure.
Questions asked
Can a limit switch wiring error cause the reversal itself?
No. A limit or home switch fault can fail to stop an axis or can stop it in the wrong place, but it cannot command motion — the reversing drive command comes from the position loop acting on bad feedback. In the field case the switches were simply overrun. Verify each switch electrically anyway, because a runaway axis has to be stopped by an input that actually reads back at the controller.
Why did raising the integral gain speed up a move that ignored the velocity setting?
Because the loop was saturated and the integrator was winding up on a persistent false error. Integral action drives the average error toward zero, so on an error that is not real it produces motion that looks like tracking while the axis actually diverges. The reported default was 0.5, raised to 5 and 10 — ten and twenty times steeper — so the integrated command reached the drive's full output sooner and the move looked faster.
Should I go back to the last working configuration?
Yes, on one axis, as a diagnostic. The axes ran before the rework, so restoring the previous motor placement and supply arrangement on a single axis is a legitimate test: if the axis behaves again, the fault is in the rework, not the machine. Then reintroduce the changes one at a time, checking feedback sign after each, so the failing change identifies itself instead of hiding in a set of four.
Is the motor damaged after it ran into its limits?
Check it uncoupled before trusting it again. Turn the shaft by hand for smooth rotation with no rough spots or end play, then watch the controller's position display while you rotate it: the counts must change smoothly and monotonically. A motor that passes both checks and shows no visible damage to the shaft, keyway, or connector is usually serviceable — the coupling is the part that failed, and it is the cheaper part to have sacrificed.
Which axis should I bring back first?
The one you can test with the least stored energy. Keep the axis that ran away uncoupled until its feedback sign and continuity pass the checks above, then recouple and retune it alone. Bring the dead axis back with the known-good motor substitution, because one swap splits the fault between motor-or-plug and drive-or-controller. Never test two changed axes at once; you will not know which change caused what.