Mechanical Deviation Compensation

B&R has powerful tools to increase positional accuracy of motorized systems by compensating for mechanical deviation. This deviation can be characterized by correlating precise, external axis position measurements (where did the axis actually end up) with intended axis positions.

We’ve seen confusion around terminology and conventions with this process. Recent improvements to the Automation Studio Help (i.e. AS 4.10 vs AS 4.5), the addition of more modes, and having explicit formulas included has clarified usage.

This guide seeks to explain usage and context around the tools, to make it easier to set up.

Software tools

The software mechanism for this compensation is the MC_BR_MechPosDeviationComp function block (GUID: a88d6428-8472-4cb0-93cf-040304cd7909)

Under the hood, this FUB generates a cam profile which translates between an intended position and the motor position required to actually get there. The cam implementation does motivate a few requirements:

  1. the deviations start and end values must be specified as whole numbers (numbers in-between do not need to be whole)
  2. the “master” start positions and end positions must be whole numbers (numbers in-between do not need to be whole)
  3. positions must monotonically increase but do not have to be equally spaced

To meet the whole number requirement, one can add an extra position outside of the axis’ range of travel on both the positive & negative end. Set the associated deviation for those positions to 0. This allows the data at the both ends of range of motion to be valid, and have deviations start & end with a whole number.

Suggested mode

mcDIR_DEPENDENT_SET_POS_AX_POS (261)

Note: this assumes the deviation is depending on direction of movement (hence DIR_DEPENDENT in the name), which is our usual case.

Formulas

Assuming the above mode is used: “Position” values are defined as the Axis Positions.

Deviation is defined as:

Deviation = Axis Position - Load Position

or phrased differently:

Deviation = (Position set point) - (Lasers measured position of axis)

Data gathering process

Move axes to a series of positions and use metrology equipment to take measurements of the load position (laser) vs axis position.

Assuming the error is direction-dependent, each position needs to be approached twice - once from the negative direction (toward positive), and once from the positive direction (toward negative). This data cooresponds to CompDataPos and CompDataNeg respectively. This is how backlash is considered.

More on Compensation Data here (GUID: 28a15c74-8a1d-4f89-ada8-4c1a9219d71b)