AutomateDirectUSAMotion LibraryShop the parts catalog

How-to

How to Calculate Step and Direction Servo Pulse Scaling

Servo and stepper motion Published 7 min read

Short answer

The controller's pulse scale equals the commanded pulses per motor revolution divided by the travel per revolution: 2,000 pulses per revolution on a 5 mm lead is 400 pulses/mm, or 10,160 pulses per inch. Check that your rapid's pulse rate fits under the controller's kernel frequency, then correct the number with a measured move.

On this page
  1. What does the pulse scale actually command on a servo axis?
  2. How do I calculate the pulse scale for a ball screw?
  3. Where does the pulses-per-revolution input come from?
  4. How does a belt or gearbox ratio change the number?
  5. How high a pulse rate does a 200 IPM rapid need?
  6. How do I calibrate the number against the real screw?
  7. Why does travel test differently in each direction?
  8. Questions asked

The controller's travel scale is the commanded pulses per motor revolution divided by the travel per revolution, corrected once against a measured move. For a 5 mm lead screw whose drive is geared for 2,000 incoming pulses per revolution, that is 400 pulses per mm, or 10,160 pulses per inch, and a 200 IPM rapid then demands about 33.9 kHz of step pulses, which decides the controller's kernel-frequency setting before anything else. Every input below belongs to a labeled worked example; substitute your own lead, gear value, and rapid, and the same arithmetic commits your numbers.

What does the pulse scale actually command on a servo axis? #

It is the controller's travel scale: how many step pulses it must issue for one unit of commanded motion, with the drive's position loop closed internally on the motor encoder instead of in the controller. A step-and-direction interface carries two signals: a direction level and a pulse train. The drive's electronic gear fixes what fraction of a motor revolution one incoming pulse commands, and the drive holds the motor to that position using its own encoder feedback.

The controller, by comparison, is open-loop: it counts the pulses it sent and trusts the drive to have turned accordingly. Two consequences follow. First, scaling correctness lives entirely in the controller's setting, because the drive will faithfully execute a wrong number. Second, the controller cannot see following error or fault detail; those live in the drive, which is why the arithmetic and the measured calibration below both happen outside the drive.

How do I calculate the pulse scale for a ball screw? #

Divide commanded pulses per motor revolution by the travel per revolution: 2,000 incoming pulses over a 5 mm lead gives 400 pulses per mm, which converts to 10,160 pulses per inch.

The formula with the example inputs:

  • P = commanded incoming pulses per motor revolution = 2,000 (set by the drive's electronic gear)
  • R = motor revolutions per screw revolution = 1 (direct coupling)
  • L = screw lead = 5 mm of travel per revolution

pulses per mm = (P × R) ÷ L = (2,000 × 1) ÷ 5 = 400 pulses/mm

For inches, multiply by 25.4 mm per inch: 400 × 25.4 = 10,160 pulses/in.

Use the lead, meaning travel per full revolution, not the thread pitch; on a single-start screw they are equal, and on a multi-start screw the lead equals pitch times the number of starts. This 10,160 is a calculated example for these inputs, not a measured result. Decision: enter it as the starting value, then calibrate it with the measured move at the end of this procedure.

Where does the pulses-per-revolution input come from? #

It comes from the drive's electronic gear setting, the parameter that fixes how many incoming step pulses equal one motor revolution, and from that drive's documentation alone, never from another machine's number. Vendors name it differently (gear number, command pulses per revolution, pulse division), but it always answers the same question. A documented machine build ran a suggested gear value of 500 for its controller; treat that figure as evidence of that one installation, not a conversion you can borrow. Take yours from the manual of the exact drive you have, and write it next to the controller setting, because every number downstream depends on it.

The value also fixes commanded resolution. Travel per pulse = lead ÷ pulses per revolution = 5 mm ÷ 2,000 = 0.0025 mm, so one pulse commands 2.5 µm. That is controller resolution, not machine accuracy: the screw's lead accuracy grade governs what the axis actually holds over travel, and lead choice is itself a resolution-versus-speed trade, the one weighed in ballscrew vs zero-backlash leadscrew for aluminum milling.

How does a belt or gearbox ratio change the number? #

Multiply by motor revolutions per screw revolution: a 2:1 belt reduction turns the example's 400 pulses per mm into 800, and 10,160 pulses per inch into 20,320. R covers every transmission element between motor and screw. For a belt drive, R = driven pulley tooth count ÷ driver pulley tooth count; a 20-tooth motor pulley driving a 40-tooth screw pulley gives R = 40 ÷ 20 = 2.

Worked numbers at R = 2: pulses per mm = (2,000 × 2) ÷ 5 = 800, and per inch 800 × 25.4 = 20,320. The same 200 IPM rapid then needs 20,320 × 3.33 = 67,733 Hz, about 67.7 kHz, past what the lower kernel selections supply, and the motor must turn 2,032 rpm instead of 1,016. Reduction buys torque and resolution at the cost of pulse rate and speed headroom, so run the frequency check in the next section before committing to a ratio.

How high a pulse rate does a 200 IPM rapid need? #

Multiply pulses per inch by rapid speed in inches per second: 10,160 pulses per inch at 200 IPM is 10,160 × 3.33 = 33,867 Hz, about 33.9 kHz, and that must sit under both the controller's kernel frequency and the drive's maximum input pulse rate. The arithmetic: 200 IPM ÷ 60 = 3.33 in/s, then 10,160 × 3.33 = 33,867 Hz.

PC-based step-and-direction controllers generate the pulse train from a selectable kernel clock that defaults to 25 kHz. Since 33.9 kHz overruns 25 kHz, move one selection up; a documented 5 mm-lead build reached 200 IPM on exactly the second-lowest kernel selection. If you must stay at 25 kHz, the rapid ceiling is 25,000 ÷ 10,160 = 2.46 in/s, which is 148 IPM.

Check the motor as well: 3.33 in/s × 25.4 mm/in = 84.7 mm/s, ÷ 5 mm per revolution = 16.9 rev/s = 1,016 rpm, which must sit under the motor's rated speed with margin. That is the same margin arithmetic as checking servo speed margin for a rack and pinion axis, with the screw lead standing in for the pinion circumference. On the drive side, take the maximum input pulse frequency and required pulse width from the drive's datasheet and confirm 33.9 kHz sits inside both.

Decision: with 10,160 pulses per inch, select a kernel frequency above 33.9 kHz before commanding 200 IPM, or cap the rapid at 148 IPM.

How do I calibrate the number against the real screw? #

Command a long move, measure actual travel, and scale the setting by commanded over measured: 10,160 × (10.000 ÷ 9.985) = 10,175 pulses per inch for a move that finishes 0.015 inch short. The procedure:

  1. Enter the calculated 10,160 and jog both directions at low speed. If the axis moves opposite to the controller display, fix the direction signal, not the scale.
  2. Before any full-speed move, prove that the E-stop and every limit switch stop the axis at low speed, and keep people and fixtures clear of an unproven axis.
  3. Command the longest convenient move, here 10.000 in, and measure actual travel with a dial indicator or scale: 9.985 in.
  4. Correct the setting: new value = old × commanded ÷ measured = 10,160 × (10.000 ÷ 9.985) = 10,160 × 1.00150 = 10,175.
  5. Enter 10,175 and repeat the test. A small residual that no longer scales with distance is the screw's lead accuracy, not the setting.
  6. Repeat the same commanded distance in the opposite direction; the next section covers what a direction difference means.

The 0.015 inch shortfall is 0.15 percent, a plausible mix of lead deviation and the example's assumed inputs. The measured correction, not the calculation, is the value you leave in the controller.

Why does travel test differently in each direction? #

Direction-dependent travel error is mechanical lost motion, such as backlash, coupling wind-up, or thrust-bearing play, not a scaling error, because a wrong pulses-per-unit value errs identically in both directions. Put the indicator on the moving table and a mark on the motor shaft. If the same commanded distance reads short one way and long the other, or differs by a constant offset regardless of length, work through the cheap checks first: coupling set screws and keyways, then thrust-bearing preload as covered in fixing ballscrew thrust bearing axial play and preload, then ball-nut preload. A scaling error, by contrast, is proportional to commanded distance and sign-consistent, and that signature tells you to change the controller number rather than the hardware.

Questions asked

If I change the drive's electronic gear value, what happens to my controller number?

They move opposite ways, and you must recalculate. Raising the incoming pulses required per motor revolution raises the pulse scale in the controller, sharpens commanded resolution, and raises the step frequency at any given speed; lowering it does the reverse. Set the gear value first, then calculate and calibrate once, so the reference is not moving underneath you.

Why calibrate with the longest move the axis can make?

Scaling error is proportional to distance, so a long baseline lifts it above measurement noise. The worked example's 0.15 percent error is 0.0015 inch over a one-inch move, hard to resolve on an indicator, but 0.015 inch over ten inches, which reads cleanly. Calibrate long, then verify short.

How do I cut the pulse rate without cutting the rapid?

Reduce the pulse scale at the source: fewer incoming pulses per revolution in the drive's electronic gear, a coarser screw lead, or a smaller belt reduction. Each costs commanded resolution. Halving the example to 1,000 pulses per revolution doubles travel per pulse from 2.5 to 5 micrometers and halves the 33.9 kHz demand to about 16.9 kHz.

What does the controller see when the drive faults mid-move?

On plain step and direction wiring, only a fault or enable signal, not the fault detail and not the axis position. In one documented build the controller dropped to E-stop while the actual error had to be read from the drive's own setup software over its serial link. Prove that diagnostic path before production.

Keep reading

  • Troubleshooting

    Diagnosing a Servo Axis That Jogs in Steps With Fluctuating Current

    Stepping motion with a 1-2 A current swing and clean encoder feedback means torque demand is changing along the travel: check brake drag, coupling condition, gibs and screw alignment under load before substituting drives or motors. Record current and encoder error together, work the cheap checks in order, and let the uncoupled motor test separate mechanics from motor.

    Servo and stepper motion

  • How-to

    Reversing an Axis After a Belt Drive Retrofit in Mach3

    Yes — flip the direction active level for that axis in Config > Ports and Pins > Motor Outputs (the Dir LowActive checkbox) and commanded travel reverses; never mirror programs or swap motor and encoder wiring. The 0.02 in of lost motion is separate: seat the ball screw in its thrust supports mechanically, because no polarity change removes it.

    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