Troubleshooting
Fix Servo Travel Error After Swapping Resolver and Encoder
Short answer
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.
On this page
A servo that overshoots and stops somewhere other than its commanded position after a swap between resolver and absolute-encoder feedback is reporting a scaling fault, not a tuning fault. The increments per motor revolution stored in the configuration belong to the feedback device that is no longer mounted, so every count is converted with the wrong divisor. A 1FK7 motor with a resolver and the same motor with an AM20DQI absolute encoder are two different feedback systems, and their resolution is configured in two places: the drive and the technology axis in S7 Technology. Fix both, re-home, then re-tune — and let one measured jog settle the diagnosis before anything is changed.
Two symptoms, two different faults #
Travel that does not match the position parameter and overshoot at the end of a move look like one problem but have different origins. Travel error proportional to distance is scaling: the units per motor revolution are wrong. Overshoot with correct travel is loop tuning: gains set for feedback the axis no longer has. Separate them first, because the fix for one does nothing for the other.
| What you observe | Most likely cause | Confirming check |
|---|---|---|
| Actual travel is a constant multiple of displayed travel | Encoder increments per revolution, gear ratio or ball screw pitch in the configuration does not match the hardware | Divide measured travel by displayed travel over a long move |
| Travel error drifts with direction or start position | Backlash or slip in the coupling, belt or gearbox | Dial indicator over a long stroke, both directions |
| Travel correct, position overshoots at the end of the move | Speed and position loops not optimized for the mounted feedback | Re-run the optimization with the load coupled |
| Behavior changed only after loading the restored program | Stored axis or encoder data still describes the other feedback device | Compare the live configuration with the motor nameplate |
Where the resolution lives #
The drive and the motion controller each keep a copy of the encoder data, and a repair that fixes one layer leaves the other wrong.
In the drive configuration, the encoder selection for the motor loads the preset data for that type, resolution included — the same ground covered in the encoder reconfiguration procedure for a 1FK7 with an AM20DQI swap — but only when the selection matches the mounted hardware. Restoring an archived project can put the resolver-era selection back, or leave it in place while the motor changed underneath it.
In the technology axis on the CPU 317T, the axis encoder data carries the encoder type, the increments per motor revolution, any fine-resolution bits and the absolute-encoder parameters, alongside the mechanics data: gear ratio, ball screw pitch and the position units. Both sets must describe the motor that is bolted to the machine now.
One measured jog names the fault #
- Confirm what is physically mounted, from the nameplate and the feedback cables — identifying resolver and encoder feedback on an old servo keeps you from configuring against a guess. Write down the encoder type.
- Read the encoder selection in the drive, then the encoder data in the technology axis, from the live system rather than from the project file. Write down both increments-per-revolution values and the mechanics data.
- With the guards closed and the E-stop within reach, jog a known commanded distance at low speed — 100 mm on a slide, or one full load revolution on a rotary axis.
- Measure the real displacement with a dial indicator or a scale.
- Compute the correction factor: measured travel divided by displayed travel.
The decision follows from that one number. A constant factor equal to the ratio of configured to actual increments per revolution is encoder data. A constant factor that instead matches a gear-ratio or pitch error is mechanics data. A factor that is not constant is mechanical: backlash, a slipping coupling or a loose belt. Do not touch tuning until the factor is 1.000.
Worked example: a clean 4:1 #
Take a slide with a 10 mm/rev ball screw, gear ratio 1:1, and a project configured for 8192 increments per motor revolution while the mounted feedback actually delivers 2048. Both resolution values are illustrative — take the real ones from the datasheet of the mounted motor and its feedback. Command 100.0 mm:
- Commanded motor revolutions: 100.0 mm ÷ 10 mm/rev = 10.0 rev
- Counts the axis demands: 10.0 rev × 8192 counts/rev = 81,920 counts
- Revolutions the motor actually turns: 81,920 counts ÷ 2048 counts/rev = 40.0 rev
- Real travel: 40.0 rev × 10 mm/rev = 400 mm
- Correction factor: 400 mm ÷ 100 mm = 4.0, which equals 8192 ÷ 2048
A factor of 4.0 against a 4:1 resolution ratio is the encoder data — not tuning, not the screw. This is a calculated example for those inputs, not a measurement. Run the same arithmetic in the other direction, with the axis configured at 2048 and an encoder delivering 8192, and the slide stops at 25 mm for the same 100 mm command: the identical 4:1 error, moving short instead of long.
Fix both layers, then re-tune #
- In the drive configuration, reselect the mounted motor and its encoder so the preset encoder data reloads. Recompile, download, and confirm the encoder actual values update.
- In the technology axis, set the encoder data to the same values: type, increments per revolution, fine-resolution bits, and the absolute-encoder parameters for an AM20DQI.
- Re-enter the mechanics: gear ratio, pitch, position units. Verify by counting the motor-shaft revolutions for one measured unit of slide travel and comparing that count with the configured ratio.
- Re-establish the reference. An absolute encoder needs its adjustment or homing run so the zero is valid; a resolver needs a homing mode that fits incremental feedback.
- Re-run the full optimization — static, speed controller, position controller — with the load coupled. The gains from the resolver period do not carry over, because the loops now act on a different position resolution.
Verify before you call it done #
Command long moves in both directions and make three numbers agree within the machine's own tolerance: commanded distance, displayed position and a mechanical measurement. Trace following error and actual speed in the technology trace; the axis should settle at the end of the move without ringing. Repeat from several start positions and after a power cycle to confirm the absolute reference holds. Overshoot that persists with correct travel is a tuning matter, and continuous hunting is a different fault altogether — why a servo oscillates between two positions covers that case.
Pitfalls of a two-encoder history #
- Fixing the drive leaves the axis wrong, and fixing the axis leaves the drive wrong: each layer holds its own copy of the encoder data.
- Restoring an archived program can overwrite an encoder selection someone corrected after the last swap.
- A lost absolute reference produces a position offset that does not scale with distance — offset means reference, proportional error means scaling.
- Tuning with the load decoupled produces gains that overshoot the moment the load is coupled.
- The additional setting once applied for the resolver variant, per the vendor's swap instruction at the time, is not something to guess at: compare the live configuration value by value against a freshly generated one for the mounted encoder, and read any difference from that instruction.
If both layers match the mounted hardware, the mechanics verify against the machine, and the correction factor still is not 1.000, stop editing data and test the hardware itself — how to tell whether a servo motor is actually faulty lists the bench checks.
Questions asked
Why doesn't the drive fault out when the encoder resolution is wrong?
Some drives refuse to enable and raise a fault when the configured resolution or absolute-measuring range cannot be reconciled with the mounted feedback. Others accept the data and simply convert every count with the wrong divisor, so the axis runs mis-scaled instead of stopping. That silent case is the dangerous one, because it looks like a mechanics problem and invites the wrong fix.
How do I tell an encoder-data ratio from a gear-ratio or pitch error?
Compute the ratio of configured to actual increments per revolution, and separately the ratio of configured to actual gear ratio times pitch. A travel factor equal to the first means encoder data; equal to the second means mechanics data. If it matches neither, mark the motor shaft and count its revolutions for one measured unit of slide travel, then compare that count with the configured gear data to see which side is wrong.
Is re-tuning necessary if the travel is correct after the data fix?
Yes. Gains optimized while the resolver was mounted act on a different position resolution than the absolute encoder delivers, while the load inertia is unchanged. If travel is now correct and the axis overshoots or settles slowly, re-run the static, speed and position optimization with the load coupled. Loops tuned to the last count on coarser feedback can also hunt between two adjacent counts.
Why did the resolver run fine for years and the restored setup fail?
Because the resolver installation carried its own configuration, including the additional setting from the vendor's swap instruction at the time. Loading the original program swaps one set of assumptions for another instead of clearing both: whichever stored value still describes the other feedback device shows up as travel error. Compare the live configuration with the motor nameplate rather than trusting either archived version.