Ask or search…


RapidCode (C++) for use in real-time applications.

🔹 What is RapidCodeRT?

RapidCodeRT is a C++ library that provides the same classes and methods for interfacing with the RMP as RapidCode but is compiled for the INtime real-time operating system (RTOS) provided by Tenasys. Thus, the RapidCodeRT API can only be used in user applications built for INtime.

RapidCodeRT vs. RapidCode

The main difference between RapidCode and RapidCodeRT is the operating system (OS) each library is compiled for. RapidCode is compiled for Windows while RapidCodeRT is compiled for INtime. Both libraries will interact with the same RMP instance.
Windows is not an RTOS and there is no upper limit on how long an application running on Windows will take to perform an action. If there are other demanding applications running (e.g. an internet browser or a Microsoft background process), a task in the application could possibly take hundreds of milliseconds to be called.
On INtime, tasks have an upper bound on how long they will take to complete, regardless of the other programs that are running. Programs that need to interface with the RMP at specific intervals, perhaps to read an I/O value and command a new motion every millisecond, should use RapidCodeRT.
RapidCodeRT developers should be familiar with creating real-time applications. and must use the INtime SDK.
The API documentation for RapidCodeRT is the same as the documentation for RapidCode.

RMP+ Configuration

RMP+ Configuration
For applications using RapidCodeRT, there are three components:
  • The RMP acts as the EtherCAT master and motion controller, commanding motion on the EtherCAT drives and reading their statuses. The RMP runs on the first RTOS core.
  • The User Program runs on the Windows OS and provides ways for the user to interact with the program. This is usually referred to as a Graphical User Interface (GUI) or a Human-Machine Interface (HMI). Items in the GUI (such as clickable buttons) issue commands to the RMP using the RapidCodeAPI.
  • The User Firmware runs on the second RTOS core, does real-time processing of data, and performs time-sensitive actions using the RapidCodeRT API. It is often used to respond to I/O or run real-time subroutines requested by the User Program.
    • If the data processing is light and only a few real-time actions are needed, it may be better to use RapidSequencerRT.
User Firmware applications using RapidCodeRT must run on a separate RTOS core from the RMP. For example, if the RMP is running on NodeA, the application must be running on NodeB.

🔹 When to use RapidCodeRT?

RapidCodeRT should be used when a delay in the execution of an action or data processing could have significant consequences, such as in safety-critical systems or machines with high-speed physical processes. Being compiled for the INtime RTOS, RapidCodeRT will ensure that these tasks will be completed in a timely manner.

🔹 RapidCodeRT Use Cases

Some potential uses for RapidCodeRT include (but are not limited to):
Tracking High Speed Aerial Objects
Monitoring the position of objects moving at high velocities using a radar requires quick and precise adjustments, even more so if the radar dish is not on a stationary platform. An application built with RapidCodeRT on an RTOS can record the current position and velocity of the object, calculate the next predicted position, and adjust the orientation of the radar dish (accounting for the movement of the platform the radar dish is mounted on) so that the object will not leave the radar's field of view. The calculations and adjustments will be executed with precise timing and with deterministic behavior. If the application was built for a non-RTOS, the object may have already exited the field of view when the calculations are completed.
Responsive Robot Control
When controlling a robot, low latency between the operator's input and the robot's execution of the action is required. In the case of controlling surgical robotic arms, this low latency is critical as the slightest error could be catastrophic for the patient. Using RapidCodeRT, the surgeon can issue commands (such as with a joystick) to the real-time application and have it perform the kinematics and stream the next set of positions for every millisecond to the robot's servo joints. When the application is running on an RTOS, these calculations will be completed in a timely manner, enabling smooth and responsive control of the robot.
Last modified 2mo ago