Learn how to configure Gearing coordinated motion between axes in C#.
Console.WriteLine("📜 Gearing");
const int NUMERATOR = 2;
const int DENOMINATOR = 1;
const double POSITION = 10;
const double VELOCITY = 10;
const double ACCELERATION = 100;
const double DECELERATION = 100;
const double JERK_PERCENT = 50;
try
{
Helpers.PhantomAxisReset(movingAxis);
Helpers.PhantomAxisReset(followerAxis);
numerator: NUMERATOR,
denominator: DENOMINATOR);
movingAxis.
MoveSCurve(POSITION, VELOCITY, ACCELERATION, DECELERATION, JERK_PERCENT);
Console.WriteLine($"Moving axis final position: {movingAxis.CommandPositionGet()}");
Console.WriteLine($"Follower axis final position: {followerAxis.CommandPositionGet()}");
Console.WriteLine($"Gear ratio: {NUMERATOR}:{DENOMINATOR}");
Helpers.AbortMotionObject(followerAxis);
Helpers.AbortMotionObject(movingAxis);
}
finally
{
controller.Delete();
}
Constants used in the C# sample apps.
const int AXIS_0_INDEX
Default: 0.
const int AXIS_1_INDEX
Default: 1.
void GearingDisable()
Disable the electronic gearing.
void GearingEnable(int32_t masterAxisNumber, RSIAxisMasterType masterFeedbackSource, int32_t numerator, int32_t denominator)
Enable this Axis to be follower (slave) using electronic gearing.
void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct)
Represents a single axis of motion control. This class provides an interface for commanding motion,...
static MotionController * Get()
Get an already running RMP EtherCAT controller.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
int32_t MotionDoneWait()
Waits for a move to complete.
int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds=AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState=false)
Enable all amplifiers.
int32_t NumberGet()
Get the axis number.
RSIAxisMasterType
Sources available to a slave Axis for electronic gearing & camming.
Helpers namespace provides utility functions for common tasks in RMP applications.