Important notice, Using the encoder to track position – RoboteQ AX2850 User Manual

Page 81

Advertising
background image

AX2550 Motor Controller User’s Manual

81

Using the Encoder to Track Position

A simple procedure is included in the Roborun PC utility to easily determine and set these
parameters.

For information, the exact formula is shown below:

Measured Speed Value = RPM * PPR * 4 * (Time Base+1) * 256 / (60 * 1000000)

or Measured Speed Value = RPM * PPR * (Time Base + 1) / 58593.75

Example: a motor spinning at 1,000 RPM, with an encoder with 200 Pulses per Revolution,
and a Time Base set at 4 will produce the following measurement:

1000 *200 * (4 + 1) / 58593.75 = 17

The same formula modified to show the actual RPM at a given Measure Speed Value is as
follows:

RPM = Measured Speed Value * 60 * 1000000 / (PPR * 4 * 256 * (Time Base+1))

or RPM = Measured Speed Value * 58593.75 /((Time Base + 1) * PPR)

In our example, a measured speed value of 127 corresponds to the following measurable
max actual RPM values.

RPM at Max Measurable Speed Value = 127 * 58593.75 / ((4 + 1) * 200) = 7441 RPM

A measured speed value of 1 corresponds to the following measurable min. actual RPM
values.

RPM at Min. Measurable Speed Value = 1 * 58593.75 / ((4 + 1) * 200) = 58.6 RPM

The Roborun Utility automatically makes the above calculations when setting up the
encoder.

Important Notice

The time base value should not exceed 63 so that a new speed value can be mea-
sured at every 16ms loop. The roborun utility automatically limits the time base
value that can be entered.

Using the Encoder to Track Position

The encoder module can be used to report the distance between the actual motor position
and a desired destination. The resulting measured “distance” can then be used by the con-
troller in the position mode to move the motor in the right direction until the destination is
reached. This movement is controlled by the PID position algorithm inside the controller
and is therefore best suited at tracking position.

Since the controller uses a signed 8-bit value (-127 to +127) for the distance measurement
in the Position Mode, a special algorithm is used to convert the real distance which can be
much higher than -127 to +127, as both the counter and destination registers are 32-bit
wide.

Advertising