APIs, concepts, guides, and more
🚀 Get started

Learn RapidCode Python with these sample applications.

RapidCode Python Samples

These Python examples, located in the examples/ folder under your RMP install directory (e.g., C:/RSI/X.X.X/examples/ or /rsi/examples/), show how to control the RMP EtherCAT motion controller with the RapidCode API. Use these projects to explore API features, validate configurations, and jump‑start your own apps.

⚠️ Important Note

These sample applications are provided to help you integrate the RMP motion controller into your own projects. They are not production-ready and may lack critical logic or safety mechanisms required for your specific application.

If you are working with real hardware, we strongly recommend wiring an external hardware emergency stop (e-stop) button. This safeguard is essential to protect both people and equipment, reducing the risk of injury or damage when using these sample applications.

✅ Prerequisites

  • RapidCode / RMP SDK installed (Windows: C:\RSI\X.X.X, Linux: /rsi)
  • INtime Runtime (Windows) when targeting hardware (C:\Program Files (x86)\INtime\bin)
  • Supported Python + NumPy versions:
Python (Windows) Python (Linux)
3.10 3.9 / 3.10 / 3.11
NumPy (Windows) NumPy (Linux)
1.22 1.23 / 1.24 / 1.25 / 1.26

Need support for another Python version? Contact tech@roboticsys.com.

⚙️ Configuration

Edit _constants.py before running the samples:

RMP_PATH = "" # RapidCode path (auto-detected if empty)
RMP_NODE_NAME = "" # [Windows] INtime node name
RMP_NIC_PRIMARY = "" # [Linux] EtherCAT NIC
RMP_CPU_AFFINITY = 0 # [Linux] CPU core

🚀 Get started with Python

  1. Install a compatible Python version from python.org.
  2. Optionally uninstall other Python versions so py or python3 launches the supported interpreter.
  3. Verify the version:

    py --version
    # Sample: Python 3.10.10
  4. Install a compatible NumPy (adjust the version for your platform):

    py -m pip install numpy==1.22
  5. Navigate to the installed samples:
Windows path Linux path
C:\RSI\10.X.X\examples\python /rsi/examples/python
  1. Open _constants.py and tailor the configuration values (see below).
  2. Launch a terminal in that directory (PowerShell, cmd, or bash).
  3. Run a sample:

    py controller-create.py

    On Linux you can run python3 controller-create.py.

⚠️ Include critical directories in your own projects

import os
import sys
import platform
if platform.system() == "Windows":
# import the ntx.dll from INtime
os.add_dll_directory("C:\\Program Files (x86)\\INtime\\bin")
# add RapidCode install directory to Python path
sys.path.append("C:\\RSI\\10.X.X\\")
else:
# linux RapidCode install directory
sys.path.append("/rsi/")

🔧 Troubleshooting

  • RapidCode not found: Set RMP_PATH in _constants.py or update sys.path.
  • Network fails: Check EtherCAT wiring or switch to phantom axes by leaving RMP_NIC_PRIMARY empty.
  • INtime DLL error: Confirm the INtime runtime is installed and os.add_dll_directory points to its bin folder.