The RMP Motion Controller APIs

◆ MoveCamLinear()

void MoveCamLinear ( int32_t masterAxisNumber,
RSIAxisMasterType masterFeedbackSource,
const double *const masterDistances,
const double *const slavePositions,
int32_t pointCount )
Description:
MoveCamLinear enables this Axis to be linear follower (slave) using an electronic cam.
Parameters
masterAxisNumberWhich Axis is the master? (0 to 31).
masterFeedbackSourceA RSIAxisMasterType value.
*masterDistancesRelative distance btween points on the master.
*slavePositionsPosition of the slave at given master distances.
pointCountNumber of points in the cam table.
Remarks
This function is also available in RapidSequencer. Part of the Camming 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:
MoveCamLinear is only functional in RapidCode 03.03.XX releases.
See also
MoveCamCubic, FrameBufferSizeGet and FrameBufferSizeSet
Examples
GearingCamming.cs.