|
APIs, concepts, guides, and more
|
RMP API performance, ease of use, & requirement comparison.
| API Name | Language | Supported Platform | Real-Time Capable |
|---|---|---|---|
| RapidCode | C++ | Windows | ❌ |
| RapidCode | C++ | Linux | ✅ |
| RapidCodeRT | C++ | INtime RTOS | ✅ |
| RapidCode.NET | C#, VB.NET | Windows, Linux | ❌ |
| RapidCodePython | Python | Windows, Linux | ❌ |
| Real-Time Tasks | C++ (task functions) | Linux (PREEMPT_RT), INtime | ✅ |
| RapidCodeRemote | gRPC (C#, Python, C++, Go, etc.) | Client: Any | ❌ |
C++ generally delivers the best raw speed, making it ideal for performance-critical motion control. RapidCode.NET (C# or VB.NET) and RapidCode Python are thinner wrappers over the C++ library, offering simpler development at the cost of a small performance penalty.
Using RapidCode directly on the PC running RMP provides the best performance, since it operates directly on the RMP firmware's shared memory. Even in C#, which is wrapped over the C++ API, reading values typically takes around 300 nanoseconds, only marginally slower than C++ calls.
Real-Time Tasks (RTTasks) use RapidCode C++ inside conveniently managed real-time threads. The RTTaskManager handles thread creation, scheduling, and synchronization, allowing you to write deterministic logic without deep real-time programming expertise.
RapidCodeRemote operates over gRPC, so every call goes through rapidserver, adding serialization and network transport overhead. Depending on your application, this may or may not be significant.
If you need to operate the RMP from a separate machine, RapidCodeRemote is the right tool; RapidSetupX uses it for this reason. Otherwise, most customers use the RapidCode libraries (C++, C#, Python) directly on the RMP host for better performance.
On an RTOS (e.g., Linux real-time threads, INtime), synchronization mechanisms introduce overhead but enable deterministic execution. Hence, while real-time threads may run slower, they ensure consistent timing.
Most deterministic to least:
Easiest to most complex: