The RMP Motion Controller APIs
Cartesian Motion

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. More...

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. 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.


📜 G-Code
Setup and run a simple G-Code program.

string gcodprgm = "G91; Sets the programming mode to RELATIVE\n" +
"G64; Turns off exact stop mode(Default)\n" +
"G1 X1.0 Y0.0 Z0.0 F60.0; Move on USERUNIT in positive x direction at 60in/min\n" +
"G3 X1 Y1 I0 J1; Counter clockwise arc with a center point of 0,1,0 and end point of 1,1,0 relative to the current position\n";
x_axis.UserLabelSet("X-Axis");
y_axis.UserLabelSet("Y-Axis");
z_axis.UserLabelSet("Z-Axis");
a_axis.UserLabelSet("A-Axis");
b_axis.UserLabelSet("B-Axis");
c_axis.UserLabelSet("C-Axis");
// Create a Robot object with a multi axis containing all joints and the kinematic type
robot = Robot.RobotCreate(controller, jointsMultiAxis, "RSI_XYZABC_Meters");
robot.GcodeAccelerationSet(1000); // UserUnits per min sqd
try
{
robot.GcodeStringLoad(gcodprgm); // Loads in the string and prepairs it for execution
}
catch (Exception e)
{
if (robot.GcodeErrorLineNumberGet() != -1) // int32_t Positive when a gcode errors exists on a known line.
{
Console.WriteLine("Error on line: " + robot.GcodeErrorLineNumberGet() + "Details: " + e.Message);
}
}
jointsMultiAxis.ClearFaults();
jointsMultiAxis.AmpEnableSet(true);
robot.GcodeRun(false); // Starts the motion. Calling with the false arguement for non blocking behavior
Int64 activeLineNumber = 0;
do
{
Thread.Sleep(200);
if (activeLineNumber != robot.GcodeExecutingLineNumberGet()) // only write if we are on a new line
{
activeLineNumber = robot.GcodeExecutingLineNumberGet();
Console.WriteLine("G-Code Line Number: " + activeLineNumber);
}
} while (robot.IsRunning());

Learn more in topic page.


📜 Path Motion
Setup and run a path motion.

x_axis.UserLabelSet("X-Axis");
y_axis.UserLabelSet("Y-Axis");
z_axis.UserLabelSet("Z-Axis");
a_axis.UserLabelSet("A-Axis");
b_axis.UserLabelSet("B-Axis");
c_axis.UserLabelSet("C-Axis");
// Create a Robot object with a multi axis containing all joints and the kinematic type
robot = Robot.RobotCreate(controller, jointsMultiAxis, "RSI_XYZABC_Meters");
robot.PathAccelerationSet(1000); // UserUnits per sec sqd
robot.PathVelocitySet(50); // UserUnits per sec
robot.PathProgrammingModeSet(PathMode.Absolute);
robot.PathLine(1, 1, 0);
robot.PathArc(RotationDirection.Clockwise, new Pose(new Vector3d(2, 0, 0)), new Vector3d(0, 1, 0));
jointsMultiAxis.ClearFaults();
jointsMultiAxis.AmpEnableSet(true);
robot.PathRun(false); // Starts the motion. Calling with the false arguement for non blocking behavior
bool isRunning = robot.IsRunning();

Learn more in topic page.

RSI::RapidCode::Cartesian::RotationDirection
RotationDirection
Rotational directions about an axis.
Definition: cartesianrobot.h:55
RSI::RapidCode::Cartesian::PathMode
PathMode
Motion types. For G-code use and Cartesian path motion.
Definition: cartesianrobot.h:48