The RMP Motion Controller APIs

◆ GearingEnable() [2/2]

void GearingEnable ( int32_t masterAxisNumber,
RSIAxisMasterType masterFeedbackSource,
int32_t numerator,
int32_t denominator )
Description:
GearingEnable enables this Axis to be follower (slave) using electronic gearing.
Parameters
masterAxisNumberAn index that represents the master axis.
masterFeedbackSourceA RSIAxisMasterType value.
numeratorMultiple of counts that slave follows relative to master.
denominatorDivisor of counts that slave follows relative to master.
Remarks
This function is also available in RapidSequencer.

Part of the Gearing method group.

Sample Code:
Gearing
//Create RapidCode Objects
Axis moving_axis = controller.AxisGet(Constants.MAIN_AXIS_NUMBER);
Axis follower_axis = controller.AxisGet(Constants.DRIVEN_AXIS_NUMBER);
HelperFunctions.CheckErrors(follower_axis);
int numerator = 2; // Specify the numerator of the gearing ratio.
int denominator = 1; // Specify the denominator of the gearing ratio.
// Configure the 'follower' axis to be a follow to the 'moving' axis at a ratio of 2:1, that is,
// for every rotation of the Moving Axis axis, the Driven axis will rotate twice.
follower_axis.GearingEnable(moving_axis,
RSIAxisMasterType.RSIAxisMasterTypeAXIS_COMMAND_POSITION, // If NOT using a Phantom Axis, switch to RSIAxisMasterTypeAXIS_ACTUAL_POSITION
numerator,
denominator);
// Perform a S-curve motion on the Moving Axis axis.
moving_axis.MoveSCurve(Constants.POSITION,
Constants.VELOCITY,
Constants.ACCELERATION,
Constants.DECELERATION,
Constants.JERK_PERCENT);
moving_axis.MotionDoneWait(); // Wait for motion to finish.
Notes:
The gearing ratio will be numerator/denominator.
See also
GearingRatioChange
Examples
GearingCamming.cs.