.

MEIMotorEncoderRatio

Definition

 
typedef struct MEIMotorEncoderRatio {
    long    A;    /* numerator */
    long    B;    /* denominator */
} MEIMotorEncoderRatio;

Description

MEIMotorEncoderRatio is used to set the Encoder ratio. The ratio is programmed into the firmware via a numerator (A) and a denominator (B), where A/B = ratio. All 32 bit values are valid, however, the values A and B should be the smallest integers possible that will give the desired ratio. This allows for the highest velocity attainable using a ratioed feedback value.

WARNING!

Do not configure the Numerator (A) x Maximum Actual Velocity (counts per sample) to be greater than +/-2,147,483,647 (31 bits). If the motor's Actual Velocity exceeds +/-2,147,483,647 (counts per sample) / A, the Actual Velocity value will roll-over to a negative value, causing erratic servo motor control. This condition could cause the motor to run-away, potentially resulting in damage to equipment or injury.

To disable the encoder ratio calculation in the controller, set A and B to zero. A value of zero for either A or B will set both A and B to zero. If your application does not need an encoder ratio, set A and B to zero for optimal controller performance.

Note:

  • Do not configure the motor encoder ratio while the amp is enabled.
  • Do not set A/B = 1 because it is equivalent to disabling this functionality while consuming more controller resources.

For an example of how to configure this parameter, please refer to the encRatio.c sample application.

Controller firmware with the Encoder Ratio build option is required to use this feature. To determine if your controller firmware supports this feature, please check the Firmware Features Table.

 
A

The numerator. Default value is zero.

B

The denominator. Default value is zero.

See Also

encRatio.c

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering