This is a sample program to assist in the integration of the RMP motion controller with your application. It may not contain all of the logic and safety features that your application requires.
- Warning
- This is a sample program to assist in the integration of the RMP motion controller with your application. It may not contain all of the logic and safety features that your application requires. We recommend that you wire an external hardware emergency stop (e-stop) button for safety when using our code sample apps. Doing so will help ensure the safety of you and those around you and will prevent potential injury or damage.
The sample apps assume that the system (network, axes, I/O) are configured prior to running the code featured in the sample app. See the Configuration page for more information.
📜 Path Motion
Setup and run a path motion.
const string xLabel = "X-Axis";
const string yLabel = "Y-Axis";
const string zLabel = "Z-Axis";
const string aLabel = "A-Axis";
const string bLabel = "B-Axis";
const string cLabel = "C-Axis";
Axis[] axes =
new Axis[] { x_axis, y_axis, z_axis, a_axis, b_axis, c_axis };
jointsMultiAxis.
AxesAdd(axes, axes.Length);
const string modelName = "RSI_XYZABC_Meters";
const double scaling = 1.0, offset = 0.0;
Learn more in the concept page.
📜 Gantry Prime Axis
Setup model with 1:1 geared axis.
const string xLabel = "X-Axis";
const string yLabel = "Y-Axis";
const string primeLabel = "Y-Prime";
Axis[] axes =
new Axis[] { x_axis, y_axis, prime_axis };
jointsMultiAxis.
AxesAdd(axes, axes.Length);
const string modelName = "RSI_XY_Yp";
const double scaling = 1.0, offset = 0.0;
const int motionFrameBufferSize = 50;
robot =
Robot.
RobotCreate(controller, jointsMultiAxis, builder, motionFrameBufferSize);
Learn more in the concept page.
📜 Changing Linear Units Path
How changing linear units affects vel and accel setters.
const string xLabel = "X-Axis";
const string yLabel = "Y-Axis";
const string zLabel = "Z-Axis";
const string aLabel = "A-Axis";
const string bLabel = "B-Axis";
const string cLabel = "C-Axis";
Axis[] axes =
new Axis[] { x_axis, y_axis, z_axis, a_axis, b_axis, c_axis };
jointsMultiAxis.
AxesAdd(axes, axes.Length);
const string modelName = "RSI_XYZABC_Millimeters";
const double scaling = 1.0, offset = 0.0;
Learn more in the concept page.
📜 3D Path Rendering
Get points in 3D space for rendering them.
const ulong frameCount = 500;
ulong totalFrames = frameCount;
ulong startFrame = 0;
while (totalFrames == frameCount)
{
totalFrames = positions.Size();
{
double xCoord = spatial.
X, yCoord = spatial.
Y, zCoord = spatial.
Z;
}
startFrame += totalFrames;
}
Learn more in the concept page.