2 / 16 · Foundations

Units, encoders and screw pitch

Convert counts to millimetres, check direction and understand the reference offset.

The screw turns twice

A direct-driven ball screw advances its carriage 10 mm per revolution. Feedback supplies 4096 effective counts per motor revolution. After 8192 counts, the carriage demand represents two revolutions, or 20 mm. The calculation is short; the configuration errors around it are often less obvious.

Counts per revolution must mean the count value actually supplied to the motion system. An encoder's advertised resolution, a quadrature pulse count and the drive's normalized feedback value can be different numbers. Confirm the interface definition before entering a scaling factor.

Convert rotation into travel

For a direct screw, use:

position_mm = encoder_count / counts_per_revolution * screw_pitch_mm + offset_mm
speed_rpm = linear_speed_mm_per_second / screw_pitch_mm * 60

At 500 mm/s with a 10 mm/revolution screw, the shaft runs at 50 revolutions per second, or 3000 rpm. That speed must fit the motor, screw, bearings and coupling limits. A longer screw may have a critical-speed restriction even when the motor can turn faster.

If a gearbox makes the motor turn five times per screw revolution, divide motor revolutions by five before multiplying by screw pitch. Write the ratio in words on the configuration sheet: five motor turns per screw turn. A bare value of 5 leaves room for someone to invert it.

A belt uses the effective travel per pulley revolution. A rotary table may use degrees per output revolution, with the gearbox between motor and table. Keep motor-side and load-side values distinct throughout the calculation.

What the offset changes

An offset defines the reported coordinate at a known physical location. If the carriage is at a verified datum and you assign its coordinate to 0 mm, later feedback is measured relative to that datum. Changing the offset alone does not move the carriage.

The scaling bench lets you change counts, screw pitch and offset independently. With 4096 counts, 4096 counts/rev and 10 mm/rev, the unshifted coordinate is 10 mm. Add an offset of -10 mm and the reported coordinate becomes zero. The mechanics have not moved.

This also explains why MC_SetPosition is not a replacement for a reference search. It can change the coordinate, but it does not discover where the load is. An absolute encoder can preserve a position relationship only if its mounting, configuration, retained data and mechanical relationship remain valid.

Direction and resolution

With 4096 counts per revolution and a 10 mm screw, one count corresponds to about 0.002441 mm. That is a coordinate increment, not a promise of mechanical accuracy. Backlash, compliance, thermal expansion, encoder accuracy and servo tracking all affect the delivered position.

Check direction at a permitted low speed under the machine's commissioning procedure. A positive command should produce the documented positive physical movement and feedback change. Do not correct an inverted feedback signal by blindly inverting several settings; record which part of the chain is reversed and use the vendor's approved procedure.

A scaling mistake with a visible consequence

A technician enters 5 mm/revolution for a screw that advances 10 mm/revolution. The motion controller interprets twice the actual travel as necessary for a given millimetre command, depending on how that vendor defines its conversion. This can double physical travel. Verify the vendor's numerator/denominator convention with a small measured move before allowing a full stroke.

Create a units sheet containing motor encoder resolution, gear ratio, screw pitch, positive direction, home offset, usable travel and speed units. Include where each value came from. Do not label all numeric tags REAL and assume that makes incompatible units interchangeable.

Exercises

  1. A motor encoder accumulates 12288 counts with 4096 effective counts/rev and a 10 mm direct screw. Calculate travel, then repeat with a 5:1 motor-to-screw reduction.
  2. A direct 5 mm screw must travel at 250 mm/s. Calculate required motor rpm.
  3. Your bench reads 10 mm at a known datum that should be zero. Calculate the coordinate offset and explain which physical checks must precede applying it.

The answers are 30 mm, then 6 mm with the reduction; 3000 rpm; and -10 mm if the existing datum measurement is valid. A numerically correct offset can still conceal an incorrectly mounted or slipping encoder.

References

PLCopen motion control describes axis-oriented commands. Scaling conventions and encoder normalization are defined by the target drive and controller, so record their library and configuration versions with your worksheet.

Check your reasoning

4096 counts/rev and 10 mm/rev: what is 8192 counts with zero offset?

  • 2 mm
  • 409.6 mm
  • 20 mm
Worked answer

20 mm. 8192 / 4096 = 2 turns; 2 × 10 = 20 mm.

Changing a position offset directly does what?

  • Tests the reference switch
  • Changes the reported coordinate
  • Moves the load to a physical datum
Worked answer

Changes the reported coordinate. A coordinate shift does not move the mechanics or verify their position.