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
{
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
{
controller.Delete();
}
Constants used in the C# sample apps.
const int AXIS_0_INDEX
Default: 0.
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,...
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.
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.
Helpers namespace provides utility functions for common tasks in RMP applications.