Backlash Compensation

What is Backlash?

In mechanical engineering, backlash, sometimes called lash or play, is clearance or lost motion in a mechanism caused by gaps between the parts. It can be defined as:

The maximum distance or angle through which any part of a mechanical system may be moved in one direction without applying appreciable force or motion to the next part in mechanical sequence

(from Wikipedia)

and is a mechanical form of dead-band.

See the diagram below that shows how the Commanded Motor Position will be generated based on an example Desired Axis Trajectory. (from Dynomotion)


Backlash Example 1
Backlash Example 2

RapidCode API Usage

API Call



sets the full range of backlash.


gets the Backlash Width which was set by the user.


sets the rate at which you take up backlash within whatever motion you create.


gets the Backlash Rate which was set by the user.

Image taken from our RapidCode API site

RMP Usage

Backlash Compensation Procedure:

1. Enable servo lock on motors

2. (Determine location in give) Move 1.1x Backlash then back 0.5x Backlash.


We recommend slightly more than full width motion, but 1.0x would be fine if you are confident in your recent measurements.

3. Send the backlash width and rate to RMP

4. For all motion RMP will apply Backlash Rate per sample of motion in the appropriate direction clamped at Backlash amount. For each direction change the RMP adjust Backlash amount by Backlash Rate.

Assuming Backlash of 10 with a Rate of 1. It will move to the middle. Set the backlash amount to 0. If you are at the edge of Backlash say 5 and reverse direction, the next sample it will change Backlash compensation to 4, then 3, all the way to -5.

Common Questions

Does Backlash Compensation solve inaccuracy?

No, Backlash Compensation reduces inaccuracy but it does not solve it.

Can we compensate for external forces (cutting, gravity, etc)?

We cannot compensate for external forces without adding an external feedback source on the load itself. Primarily, when a motor is idle or disabled, forces can change where you are within the give. While the motor is disabled, there is no way to know what type of drift is going on.

This is why we have decided that anytime you disabled an Axis, we are going to wipe out the associated information and require you to repeat the Backlash Compensation Procedure.