Explainer
When a rotary encoder can stand in on a linear motor
Short answer
A rotary encoder can stand in for a linear scale on a linear motor only when all three conditions hold at once: a slip-free, rigid mechanical conversion, a whole-number result from pole-pair width divided by encoder lines — 30000 µm divided by 2000 lines is exactly 15 µm per line, 2048 lines is not — and a proven pole-position identification before powered motion. Miss one and the drive commutates against the wrong magnets or holds a position the carriage never reached.

On this page
- Can a linear motor use a rotary encoder instead of a linear scale?
- Why does a linear motor need pole position in its feedback?
- What does the integer scaling rule require?
- What does slip-free and rigid mean for the conversion mechanics?
- How do you prove pole position before powered motion?
- What accuracy do you give up by measuring through the mechanism?
- How do you verify the conversion on the bench?
- When should you keep or restore the linear scale instead?
- Questions asked
You cannot meet the linear encoder's mounting requirements, and the rotary encoder on the shelf looks tempting. It can carry a linear motor — on three conditions that all hold at once. The conversion from carriage travel to encoder rotation has to be slip-free and stiff, the scaling built from pole-pair width and line count has to land on a whole number of micrometres per line — 30000 µm divided by 2000 lines gives exactly 15 µm per line, 2048 lines does not — and pole-position identification has to pass with the Hall diagnostics agreeing before the axis makes its first powered move. Miss any one and the drive either commutates against the wrong magnets or holds a position the carriage never reached. The sections below give the arithmetic, the mechanics, the bench checks and the decision for each case.
Can a linear motor use a rotary encoder instead of a linear scale? #
Yes — when three conditions hold at once: the conversion from carriage travel to encoder rotation is slip-free and rigid, the scaling built from pole-pair width and encoder line count lands on a whole number of micrometres per line, and pole-position identification passes before the first powered move.
Each condition rules out a specific failure. A slipping or compliant conversion lets the encoder count revolutions the carriage never made, so the loop holds a position that exists only in the feedback. A scaling result with digits after the decimal point leaves the drive no exact displacement to assign to each line count, and its pole-position identification then has nothing exact to relate to the magnetic sectors. An unproven pole relationship steers phase current into the wrong sector, which on a linear motor shows up as reversed thrust, an overcurrent trip or an axis that sits and heats.
The encoder's signal type does not decide this; the line-count arithmetic does. A sin/cos encoder with fine interpolation is still bound by its line count — the documented failure case is exactly such a part — while any encoder whose line count passes the division and whose signal your drive's feedback port accepts can work in principle. Port compatibility comes from the drive manual; the arithmetic you can do today.
Why does a linear motor need pole position in its feedback? #
Because the drive must steer phase current against the magnets, and on a linear motor that magnet pattern repeats every pole-pair width along the travel, not once around a shaft — the feedback therefore has to tell the drive where the carriage sits inside that repeating pattern.
Commutation is the coordination of phase current with magnet position. On a rotary motor, one electrical cycle spans one mechanical revolution, so a shaft encoder holds the magnet relationship by construction once identification has run. On a linear motor, the magnetic pattern repeats along the track every pole-pair width, and the drive needs to know where the carriage sits inside that repeating strip at all times.
A rotary encoder knows only how far its shaft has turned. Geared to a rack, a pinion or a screw, it reports revolutions, and the mechanism's travel per revolution is the entire bridge between shaft angle and magnet position. A linear encoder is a tape measure laid along the track; a rotary encoder is a measuring wheel rolled along it, and a measuring wheel is only as honest as its grip and its rolling diameter. That is why the two checks that follow — exact scaling and stiff mechanics — are not refinements. They are the difference between feedback and a coincidence.
What does the integer scaling rule require? #
Pole-pair width over encoder line count has to land on a whole number: with one encoder revolution arranged to equal the 30 mm pole-pair width of travel, 2000 lines give exactly 15 µm per line and 2048 lines give 14.6484375 µm, which fails the whole-number requirement.
Worked example, with the numbers from the documented case for this substitution:
- Pole-pair width: 30 mm = 30000 µm.
- Arrangement: one encoder revolution equals one pole-pair width of travel.
- Encoder A, 2000 lines: 30000 µm divided by 2000 lines = 15 µm per line — whole, so every line lands on an exact displacement.
- Encoder B, 2048 lines on the same 30 mm: 30000 µm divided by 2048 = 14.6484375 µm per line — not whole, and the substitution fails on scaling alone.
- Cross-check: 15 µm × 2000 lines = 30000 µm = 30 mm, which closes the circle.
If your mechanism turns the encoder at some other ratio, the same division generalises: displacement per line equals travel per revolution divided by lines per revolution, and the pole-pair width has to come out as a whole number of those line displacements. Keep every length in micrometres so nothing hides in a conversion step. A fractional result is not a rounding nuisance you can trim in configuration; the scaling has to be exact, because pole-position identification has nothing exact to work with otherwise. Compute this before ordering hardware, and read the exact form of the requirement — which quantity must be whole — from the feedback section of your drive's commissioning manual, since the enforcement lives in the drive, not in the arithmetic. Turning a mechanical ratio into exact feedback scaling is the same discipline as setting gear ratio for degree moves on a rotary servo axis: one ratio, one division, no rounding.
What does slip-free and rigid mean for the conversion mechanics? #
Slip-free means positive engagement — gear teeth or a toothed belt, never a friction roller — and rigid means the encoder path deflects so little under load that the carriage cannot move appreciably while the encoder stands still.
Positive engagement is the documented route: gear teeth on a rack or pinion, or a toothed belt. Engagement alone is not rigidity. Teeth rock within their backlash on every reversal, teeth and belts deflect under load, the encoder shaft twists, its bearings have clearance, and the bracket carrying the encoder has its own spring rate. None of that raises a fault; it shows up as a carriage sitting somewhere other than the reported count while the loop contentedly holds the report.
This is the documented concern with the substitution, and it is a fair one: you are adding a second mechanical path the linear scale never had, and it is likely to be the softest link in the chain. A feedback path that does not represent the load is also one of the classic ways a closed loop starts hunting — the same mechanism behind a closed-loop stepper hunting on linear encoder feedback. The verification section below turns 'probably too flexible' into a measured number, which is the only form of this argument that settles anything.
How do you prove pole position before powered motion? #
Use the drive's pole-position identification with the Hall sensors as the independent cross-check: parameters p497, r498 and r499 on the drive platform most often discussed for this substitution report the Hall state, and that state must step in the same order and direction as the physical travel.
Read those identifiers' documented definitions in the manual for your installed configuration; the numbers alone do not define a valid sequence. Then run the drive's pole-position identification. If the Hall state disagrees with the direction or the order of travel, fix the cause — wiring, scaling, a shifted commutation angle — and repeat the identification. Do not tune around a disagreement, because the loop will close happily over a wrong magnetic relationship and deliver wrong-direction thrust at the first reversal. The discipline is the same as commissioning a replacement servo encoder with motor identification data: prove the magnetic relationship once, from evidence, and only then let the loop close on it.
Identification moves the axis, so commission inside a small motion envelope with conservative speed and torque limits and the mechanical end stops fitted.
What accuracy do you give up by measuring through the mechanism? #
You give up every error the transmission owns: backlash on each direction reversal, compliance under load, tooth pitch error and any creep, all of which sit between what the encoder reports and where the carriage truly is.
A linear encoder reads the carriage like a tape measure, so its accuracy holds no matter what the transmission does. The rotary path reads the motor side of the mechanism, and every micron of lost motion lands in the positioning result: backlash on each reversal, deflection under load, and a periodic ripple that repeats with the mechanism's pitch. How much that costs depends on where the position loop closes — measuring at the motor and positioning the load through a compliant path is exactly the trade described in where the position loop closes decides your servo conversion.
Whether the budget fits is arithmetic, not opinion. For example, a handling axis with a ±0.5 mm process tolerance rides over a measured 0.05 mm lost-motion budget without noticing, while an axis specified to ±0.02 mm spends its entire tolerance on that same budget. Your tolerance and your measured budget decide; the next section sorts the outcomes.
How do you verify the conversion on the bench? #
Rotate the mechanism through exactly ten encoder revolutions by hand with the drive locked out and confirm the carriage moved ten times the design travel; then reverse through the same ten and measure how much the carriage failed to return, because that split is your permanent error budget.
Run the remaining checks in the same session:
- Travel per revolution. Ten revolutions must produce exactly ten times the travel per revolution the scaling used. A shortfall means the ratio you scaled with is not the ratio you built — remeasure and rescale before anything else.
- Direction and sign. Move the carriage the way the drive calls positive and confirm the feedback count increases. Correct a mismatch in the feedback configuration, never by swapping motor phases to make the number look right.
- Lost motion. Approach a fixed reference from both directions and record the split. That split is the backlash-plus-deflection budget the decision below consumes, and it belongs in the machine file.
- Deflection under load. Apply a controlled opposing load at the carriage and compare reported position with actual displacement. The difference is compliance the control loop cannot see.
- Hall sequence. Step the carriage through several feedback increments in each direction and confirm the Hall state steps in the documented order, read through the drive's Hall diagnostic channel.
- Identification and first motion. Run pole-position identification, then make the first enabled moves inside the small envelope described above.
When should you keep or restore the linear scale instead? #
Keep the substitution only where the process tolerance is wider than the lost motion and deflection you measured on the conversion; if the accuracy need is tighter than that budget, or the scaling cannot be made exact, mount the linear scale properly instead.
The decision, case by case:
- Scaling exact, conversion engaged and stiff, measured lost motion below the process tolerance: run the rotary feedback. All three conditions are met and the bench numbers say the error budget fits the application.
- Scaling fractional with every encoder and ratio you can realistically build: the linear scale stays. No tuning compensates for a scaling the drive cannot represent exactly.
- Measured lost motion at or above the process tolerance: fix the mechanics or mount the linear scale. This is the same trade as switching a CNC axis from linear scale to motor encoder — accuracy moves with the measurement point, and moving the measurement point cannot recover it.
- Hall identification inconsistent after wiring and scaling checks: stop commissioning. A wrong pole relationship on a linear motor does not degrade performance gracefully; it produces wrong-direction thrust. Resolve the cause before the next enabled move.
Stated once more as the decision rule: exact scaling, positive stiff mechanics, proven pole position — run it. Short of any one of the three, the linear scale is not optional hardware; it is the feedback.
Questions asked
Should I arrange one encoder revolution to equal one pole-pair width of travel?
Yes, that is the cleanest arrangement, and it reduces the whole scaling check to a single division of pole-pair width by line count, as in the worked example. Any other ratio can work, but each gear stage adds its own backlash and compliance, and every ratio you introduce is one more chance to land the division on a fraction.
Can a friction roller or measuring wheel drive the encoder slip-free?
No. Friction drive depends on tangential grip, and acceleration, oil on the track, wear and slight misalignment all let the roller creep, so the encoder loses count with no fault to show for it. Use positive engagement such as gear teeth or a toothed belt, then measure backlash and deflection on the bench before trusting the feedback.
Do the Hall sensors replace the encoder for commutation?
No. Hall sensors divide each electrical cycle into six coarse sectors, enough for the drive to find pole position and start, not for smooth torque at low speed or for accurate positioning. They act as the independent cross-check on the identification result, while the rotary encoder carries the fine position once the pole relationship is proven.
Can the rotary conversion also serve the machine's safety or overtravel functions?
No. Every error the conversion adds, from backlash and deflection to the possibility of slip, sits between the real carriage and the reported position, so a limit or stopping function driven from that path can be late or wrong by the same budget. Hard overtravel protection and any safety function measure the carriage itself, and the machine's risk assessment sets the required level.


