◆ EncoderRatioSet()

virtual void EncoderRatioSet ( RSIMotorFeedback  encoder,
int32_t  numerator,
int32_t  denominator 
)
pure virtual

Sets the ratio to scale Encoder counts.

ℹ This function is avaliable in RapidCode and RapidSequencer

Description:
EncoderRatioSet uses a user defined numerator / denominator to scale counts by the encoder specified.
Parameters
encoderA (RSIMotorFeedback) value. Generally Primary.
numeratorThe Numerator for the Ratio.
denominatorThe Denominator for the Ratio.
Sample Code:
axisOne->EncoderRatioSet(RSIMotorFeedbackPRIMARY, 2, 1);
Note
EncoderRatioSet is only functional in RapidCode 03.04.XX and later releases. The default is a 1:1 ratio. As EncoderRatios take up additional controller resources, you may want to disable this feature by setting the encoder with a 0 numerator and denominator once done with scaling.
Examples
Gantry.cpp.