The RMP Motion Controller APIs

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


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

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


 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.
static RapidSequencer Create(Platform platform, string sequencerNodeName, string rmpNodeName, string executablePath, int grpcPort=DEFAULT_GRPC_PORT, string friendlyName="RapidServer", ulong timeoutMs=DEFAULT_TIMEOUT_MS, int discoveryPort=DEFAULT_DISCOVER_PORT)
Creates a RapidSequencer process on the given platform at the specified port if one does not already ...
Definition: RapidSequencer.cs:629
The RapidSequencerFactory provides static methods for creating RapidSequencer processes or discoverin...
Definition: RapidSequencer.cs:561
An object for interacting with a RapidSequencer process.
Definition: RapidSequencer.cs:64
void EngineStart(string rmpNode="NodeA", string rmpPath="")
Starts the runtime of the RapidSequencer process.
Definition: RapidSequencer.cs:251