using System.Threading;
Console.WriteLine("📜 MultiAxis Motion: Velocity");
const int CYCLES = 3;
try
{
Axis axis0 = controller.
AxisGet(Constants.AXIS_0_INDEX);
Axis axis1 = controller.
AxisGet(Constants.AXIS_1_INDEX);
Axis axis2 = controller.
AxisGet(Constants.AXIS_2_INDEX);
double[] accelerations = [1000, 1000, 1000];
double[] velocities = [0, 0, 0];
Random rnd = new Random();
for (int i = 0; i < CYCLES; i++)
{
velocities[0] = rnd.Next(1, 100);
velocities[1] = rnd.Next(1, 100);
velocities[2] = rnd.Next(1, 100);
Console.WriteLine($"Cycle {i + 1}: Velocities = [{velocities[0]}, {velocities[1]}, {velocities[2]}]");
Thread.Sleep(100);
}
}
finally
{
}
static void AbortMotionObject(RapidCodeMotion motionObject)
Aborts motion on the given RapidCodeMotion object (Axis or MultiAxis), waits for motion to stop,...
static void CheckErrors(RapidCodeObject rsiObject)
Checks for errors in the given RapidCodeObject and throws an exception if any non-warning errors are ...
Helpers class provides static methods for common tasks in RMP applications.
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.
void MotionCountSet(int32_t motionCount)
Set the number of processed Motion Supervisors in the controller.
static MotionController * Get()
Get an already running RMP EtherCAT controller.
void Delete(void)
Delete the MotionController and all its objects.
MultiAxis * MultiAxisGet(int32_t motionSupervisorNumber)
MultiAxisGet returns a pointer to a MultiAxis object and initializes its internals.
int32_t AxisCountGet()
Get the number of axes processing.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
void AxisRemoveAll()
Remove all axes from a MultiAxis group.s.
void MoveVelocity(const double *const velocity, const double *const accel)
Velocity move.
void AxisAdd(Axis *axis)
Add an Axis to a MultiAxis group.
Represents multiple axes of motion control, allows you to map two or more Axis objects together for e...
void ClearFaults()
Clear all faults for an Axis or MultiAxis.
void Abort()
Abort an axis.
int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds=AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState=false)
Enable all amplifiers.