MPIRatio

Declaration

typedef struct MPIRatio {

    long   numerator;

    long   denominator;

} MPIRatio;

Required Header: stdmpi.h

Change History: Added in 04.00.

Description

MPIRatio is used to set a ratio. The ratio is used for feedback scaling. It is programmed into the firmware by using a numerator and a denominator, where numerator/denominator = ratio. All 32-bit values are valid, however, the values 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 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 numerator and denominator to zero. If your application does not need an encoder ratio, set numerator and denominator to zero for optimal controller performance.

Notes:

Do not configure the motor encoder ratio while the amp is enabled.