The RMP Motion Controller APIs

Description

The RapidSequencer API provides classes and functions for creating RapidSequencer instances. These instances can compile and run RapidScript applications. Visit our Topic Page for more information.

🏃 Running a Sample App

Learn to run a RapidScript program using the C# RapidSequencer API.

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.

Below is an example of creating a RapidSequencer instance and running a RapidScript file using the RapidSequencer C# API. Replace the following with the correct values for the system:
  1. _platform: An enum specifying which platform to create the sequencer on (Windows or INtime).
  2. _nodeName: The string name of the INtime node to run the sequencer on (if platform is INtime).
  3. _rmpNodeName: The string name of the INtime node RMP is running on.
  4. workingDir: The path to the directory where the RapidSequencer executable is (as a string).
  5. port: The port number the RapidSequencer will listen for requests on.
  6. "RapidSequencer": The "friendly" name to assign to the RapidSequencer process (as a string).
  7. fileNameString: The name of the file to run (as a string). For sample apps, set this to the name of the sample app, such as "MoveSCurve.sq".
  8. entryPoint: The function in the sequencer file to run (as a string). Common practice (and the default value) is to run the "main" function.

RSI.RapidSequencer.RapidSequencer sequencer = RSI.RapidSequencer.RapidSequencerFactory.Create(_platform, _nodeName, _rmpNodeName, workingDir, port, "RapidSequencer");
string rmpPath = TestContext.CurrentContext.TestDirectory;
sequencer.EngineStart(_rmpNodeName, rmpPath);
string entryPoint = "main";
sequencer.Compile(samplesDirectory + fileNameString, entryPoint);
string taskId = sequencer.Run();
string output = sequencer.TaskOutputGet(taskId);


🌐 Subsections

Topics

 Global Data
 Learn to interact with global data in a RapidScript program.
 
 Multiple Sequencers
 Learn to use multiple sequencers at the same time.
 
 Running a RapidScript File
 Learn to run a RapidScript program using the C# RapidSequencer API.