AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Troubleshooting

Why travel is wrong after a servo drive swap with a 22-bit encoder

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

Short answer

After a servo drive swap, travel that is wrong by the same factor on every move is a command-scaling fault, not a tuning fault. The old 15-bit encoder resolves 32,768 counts per turn and the new 22-bit one 4,194,304, but travel is set by the drive's configured command pulses per motor revolution and the mechanical travel per revolution. Measure the error ratio, compare those two settings with the old axis, and correct one of them.

On this page
  1. Measure the error ratio before changing anything
  2. Checks in order, cheapest first
  3. What the encoder bit count changes and what it does not
  4. The two settings that decide travel
  5. Worked example: 100 mm commanded travels 0.78125 mm
  6. Fix the scaling in one place and prove it
  7. Questions asked

When a replaced servo amplifier leaves the axis travelling wrong by the same factor on every move, the fault is command scaling, not tuning and not the program. The new 22-bit encoder resolves far finer than the old 15-bit unit, but that resolution never decides travel on its own: travel is set by the drive's configured command pulses per motor revolution together with the mechanical travel per motor revolution, gear ratio included. Measure the error ratio first, compare those two settings against the old axis, and correct exactly one of them.

Measure the error ratio before changing anything #

Judge the fault by physically measured travel, never by the controller's distance display, because the display computes from the same commands the drive just misapplied. Command a short move well inside the permitted travel, measure what the machine actually did with a scale or dial indicator on the moving member, and divide measured travel by commanded travel. Repeat at a second distance and in the opposite direction.

A ratio that stays the same at both distances and both directions is a scaling fault. This is the same measured-over-commanded test described for a stepper axis that travels 1.25 times the commanded distance. A ratio that flips sign or size with direction is backlash or lost motion; one that drifts with speed points at the command path or the tuning, not at scaling.

Checks in order, cheapest first #

  • Compare commanded distance, the drive's position readback and the physical measurement on one short move. If the drive and the scale agree but the program's display disagrees, only the display conversion is wrong; if scale and display agree with each other but not with the commanded value, the command path is wrong.
  • Run the ratio test at two distances and both directions. A near-constant ratio is command scaling; a direction-dependent error is backlash, coupling keys or screw end play; a speed-dependent error is the command transmission or the tuning.
  • Read the replacement drive's electronic gear or equivalent command scaling and its movement amount per revolution, and lay them beside the old drive's records or commissioning sheet. A mismatch between those two values and the old axis is the fault itself.
  • Check the drive's control mode before hunting numbers. If the position command arrives over a network or another interface rather than as step pulses, the conversion lives in that interface's scaling, and the pulse settings are not the ones to change.
  • Leave the servo gains alone until the measured ratio is 1.000. No set of gains removes a fixed conversion factor.

What the encoder bit count changes and what it does not #

A 15-bit single-turn encoder resolves 2^15 = 32,768 counts per turn. The high-resolution absolute encoder on the MELSERVO-J4 family is documented in that series' catalog at 4,194,304 pulses per turn, which is 2^22, so the swap raises the feedback resolution by a factor of 2^(22-15) = 128.

That resolution describes what the drive measures about the motor shaft. It does not change what the controller must send: the electronic gear function maps whatever command pulse count is configured to one motor revolution, independent of the feedback resolution. A measured error near a factor of 128 therefore means some conversion on the axis is using raw encoder counts where it should use the configured command scaling. It is not a reason to multiply or divide every distance in the program by that factor; find which value sits on the command path first.

This case is also a different fault from swapping the feedback device itself on an unchanged amplifier, where the commutation rules for swapping a servo resolver for an encoder decide the repair.

The two settings that decide travel #

Two values convert commanded distance into motion on a pulse-commanded axis: the number of command input pulses the drive accepts for one motor revolution, and the distance the machine travels per motor revolution. The AC Servo practice course for the MELSERVO-J4 family documents the first as the command input pulses per revolution selection inside the electronic gear function; the second is the movement amount per rotation, and it must include every gearbox and belt between motor and screw. For a screw-driven axis:

  • Gear ratio = motor revolutions ÷ screw revolutions
  • Travel per motor revolution = screw lead ÷ gear ratio

Reversing that gear ratio definition produces a wrong conversion even when the entered numbers look familiar. If the mechanics and the program are unchanged, the cleanest repair is to set the new drive's command pulses per revolution to the old axis's effective value; every distance calculation in the program then stays valid as written.

Worked example: 100 mm commanded travels 0.78125 mm #

Inputs for this example case, a screw-driven axis whose program was written for the old amplifier and run unchanged on the replacement:

  • Command scaling carried over from the old axis: 32,768 command pulses per motor revolution, on the 15-bit count basis.
  • Command pulses per revolution configured in the replacement drive's electronic gear: 4,194,304, set on the new encoder's count basis.
  • Mechanical travel per motor revolution: 10.0 mm, a 10 mm lead screw at a 1:1 coupling.
  • Test move commanded by the program: 100.0 mm, run at reduced speed and measured on a scale.

Rule in words: actual travel equals the pulses the drive receives, times the travel per motor revolution, divided by the configured command pulses per revolution.

Arithmetic:

  • Resolution ratio: 4,194,304 ÷ 32,768 = 128, so the drive demands 128 times more pulses per revolution than it receives.
  • Pulses sent for 100 mm: (32,768 pulses/rev ÷ 10.0 mm/rev) × 100.0 mm = 327,680 pulses.
  • Actual travel: 327,680 pulses ÷ 4,194,304 pulses/rev = 0.078125 rev, × 10.0 mm/rev = 0.78125 mm.
  • Predicted short travel: 100.0 mm × 0.0078125 = 0.78125 mm.

Result: measured travel is 0.78125 mm, and measured ÷ commanded = 0.0078125, the same at both test distances. Decision: a constant measured ratio near 1/128 after a 15-bit to 22-bit swap is command scaling. Set the drive's command pulses per revolution back to the old effective 32,768, or rescale the controller to the new basis, but never both.

Fix the scaling in one place and prove it #

  • Record first. Save the controller project and write down every drive scaling value before touching anything; the what-has-changed troubleshooting method keeps a drive swap from turning into three simultaneous faults.
  • Choose one correction point. Restore the drive's command pulses per revolution to the old effective value, or deliberately rescale the controller's output to the new basis. Compensating in both places stacks a second error onto the first.
  • Recompute, don't guess. Where the scaling must be rebuilt from scratch, work it through with the step and direction servo pulse scaling calculation rather than by trial.
  • Apply and re-reference. Save and activate the settings the way the amplifier manual requires, then re-establish the axis reference, because the relationship between position counts and machine position has changed.
  • Prove it physically. Make the first verification move at reduced speed, with clear travel and a hand near the stop. Command a short distance, measure the machine, and confirm measured ÷ commanded = 1.000; repeat at a second distance before releasing the axis to production.

Questions asked

Does a 22-bit encoder make the controller send more pulses than a 15-bit one?

No. The encoder's counts per turn describe what the drive measures, not what the controller sends. The electronic gear function maps whatever command pulse count you configure to one motor revolution, independent of the feedback resolution, so the controller can keep its original output scaling. Travel changes only when the configured command pulses per revolution or the mechanical travel per revolution actually changed, which is why an unchanged program can be correct and only the drive settings need comparing.

I no longer have the old drive's settings. How do I recover the scaling?

Command a short known distance at reduced speed, measure the actual travel, and divide measured by commanded. That ratio tells you how far the new drive's conversion is off. Adjust the command pulses per revolution by the inverse of that ratio, or rescale the controller by it, in one place only. Re-establish the axis reference, then repeat the move and confirm the ratio reads 1.000 before trusting a longer travel.

The controller display shows the commanded distance but the machine moved wrong. Which one is true?

Neither is a measurement of the machine. The controller's position display is computed from its own commands, so it repeats the same scaling assumption the drive just misapplied. Trust an independent measurement such as a scale or dial indicator on the moving member until the ratio test passes. If the display and the measurement still disagree after the scaling is corrected, compare the display's engineering-unit conversion against the raw position value and its configured scaling.

Keep reading

  • Troubleshooting

    Fix Servo Travel Error After Swapping Resolver and Encoder

    Travel that does not match the position display after a resolver-to-encoder swap is a scaling fault: the drive or the technology axis is still converting counts with the other feedback's increments per revolution. Measure one commanded move and divide actual by displayed travel; a constant ratio equal to the resolution ratio names the encoder data. Fix both layers, re-home, then re-tune.

    Servo and stepper motion

  • Troubleshooting

    Using a servo motor encoder as external machine feedback

    A servo motor's native encoder is the drive's feedback interface, not a spare input for the controller. Changing i7010 from 8 to 3 can reassign the hardware that also carries the pulse command, which is why the drive reports Invalid Pulse command as soon as you jog. Keep i7010 = 8, take machine feedback from the drive's documented encoder output, and scale that signal into counts per unit on a separate controller input.

    Servo and stepper motion

  • Explainer

    Servo Positioning Resolution Versus Stepper Step Angle Explained

    A 0.018° move needs 360 ÷ 0.018 = 20,000 usable feedback counts per revolution, which come from the encoder and the drive's decoding and scaling, not from the servo label. Matching 3,000 command pulses per revolution on a stepper and a servo only matches command scaling; short-time overload capacity and high-speed performance still differ.

    Servo and stepper motion