using System.Threading;
Console.WriteLine("📜 Axis Motion: Modify");
const double POSITION = 10;
const double VELOCITY = 10;
const double ACCELERATION = 100;
const double DECELERATION = 100;
const double JERK_PERCENT = 50;
try
{
Axis axis = controller.
AxisGet(Constants.AXIS_0_INDEX);
Console.WriteLine("\n1. Feed Rate");
Console.WriteLine($"\tPosition commanded: {POSITION}");
Thread.Sleep(10);
Console.WriteLine($"\tPosition after FeedRate (1.5): {axis.CommandPositionGet()}");
Thread.Sleep(500);
Console.WriteLine($"\tPosition after FeedRate (-1): {axis.CommandPositionGet()}");
Console.WriteLine($"\tPosition after FeedRate (1): {axis.CommandPositionGet()} (expected: {POSITION})");
Console.WriteLine("\n2. Change Motion Speed");
axis.
MoveSCurve(POSITION, VELOCITY, ACCELERATION, DECELERATION, JERK_PERCENT);
Thread.Sleep(10);
axis.
MoveSCurve(POSITION, VELOCITY * 10, ACCELERATION, DECELERATION, JERK_PERCENT);
Console.WriteLine($"\tFinal position: {axis.CommandPositionGet()} (expected: {POSITION})");
}
finally
{
}
static void CheckErrors(RapidCodeObject rsiObject)
Checks for errors in the given RapidCodeObject and throws an exception if any non-warning errors are ...
static void PhantomAxisReset(Axis phantomAxis)
Configures a phantom axis on the controller.
Helpers class provides static methods for common tasks in RMP applications.
double CommandPositionGet()
Get the current command position.
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,...
Axis * AxisGet(int32_t axisNumber)
AxisGet returns a pointer to an Axis object and initializes its internals.
static MotionController * Get()
Get an already running RMP EtherCAT controller.
void Delete(void)
Delete the MotionController and all its objects.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
int32_t MotionDoneWait()
Waits for a move to complete.
void Resume()
Resume an axis.
int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds=AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState=false)
Enable all amplifiers.
void FeedRateSet(double rate)
Set the feed rate for an Axis.