Console.WriteLine("📜 Motion: Path Gantry");
try
{
const string xLabel = "X-Axis";
const string yLabel = "Y-Axis";
const string yPrimeLabel = "Y-Prime";
Helpers.PhantomAxisReset(primeAxis);
MultiAxis jointsMultiAxis = controller.MultiAxisGet(0);
Axis[] axes = [xAxis, yAxis, primeAxis];
jointsMultiAxis.
AxesAdd(axes, axes.Length);
const LinearUnits units = LinearUnits.Millimeters;
const string modelName = "RSI_XY_Yp";
const double scaling = 1.0, offset = 0.0;
LinearModelBuilder builder = new(modelName);
builder.UnitsSet(units);
builder.JointAdd(new LinearJointMapping(0, CartesianAxis.X) { ExpectedLabel = xLabel, Scaling = scaling, Offset = offset });
builder.JointAdd(new LinearJointMapping(1, CartesianAxis.Y) { ExpectedLabel = yLabel, Scaling = scaling, Offset = offset });
builder.JointAdd(new LinearJointMapping(2, CartesianAxis.Y) { ExpectedLabel = yPrimeLabel, Scaling = scaling, Offset = offset });
const int motionFrameBufferSize = 50;
Robot robot = Robot.RobotCreate(controller, jointsMultiAxis, builder, motionFrameBufferSize);
Console.WriteLine($"Model name: {robot.ModelGet().NameGet()}");
Console.WriteLine($"Model units: {robot.ModelGet().UnitsGet()}");
Console.WriteLine("Gantry configuration: Y-axis and Y-Prime axis are geared 1:1");
Robot.RobotDelete(controller, robot);
}
finally
{
controller.Delete();
}
Constants used in the C# sample apps.
const int AXIS_0_INDEX
Default: 0.
const int AXIS_1_INDEX
Default: 1.
const int AXIS_2_INDEX
Default: 2.
void UserLabelSet(const char *const userLabel)
Set the axis User defined Label.
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...
void AxesAdd(Axis **axes, int32_t axisCount)
Represents multiple axes of motion control, allows you to map two or more Axis objects together for e...
Helpers namespace provides utility functions for common tasks in RMP applications.