AX2500/2850 Motor Controller Users Manual 139
Using the Encoder to Measure Speed
Using the Encoder to Measure Speed
The encoder module will automatically compute rotation speed for each encoder. The
resulting measured speed is a value ranging from 0 to + 127 and 0 to -127, where 127 rep-
resent a relative ratio of a maximum speed value chosen by the user.
For example, if the encoder module is configured so that the highest measured speed
value is 3,000 RPM, then a reading of 63 (127/2) would be 1,500 RPM.
The relationship between the measured speed and the actual speed is a factor of two vari-
able parameters: a Time Based period value stored inside the Encoder module and the
Encoders number of Pulses per Revolution. Note: the Encoders number of Pulses per
Revolution is not stored in the controller.
The Time Base is a number of 256us time intervals between two counter reads.
A simple procedure is included in the Roborun PC utility to easily determining 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 correspond 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 correspond to the following measurable min. actual RPM val-
ues
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.