Files
hugo/content/projects/real-time-interface/index.md
T

2.4 KiB

title, summary, tags, status, date, repo, pypi
title summary tags status date repo pypi
rtint: Python Interface to Real-Time Targets A Python package to control and monitor Simulink models running on a real-time target machine, such as a Speedgoat.
Software
Control
Active 2026-10-01 https://gitlab.esrf.fr/dehaeze/real-time-interface https://pypi.org/project/rtint/

Overview

rtint is a Python package that talks to Simulink models running on a real-time target machine, through a Resyst server. It wraps the server's client API so that the parts of a real-time model (motors, filters, feedback loops, signals and so on) can be used as ordinary Python objects from a script or an interactive session.

It is used at the ESRF to commission and tune mechatronic systems whose control runs on a real-time target. For a graphical front end built on top of it, see [rtint-gui]({{< relref "real-time-interface-gui" >}}).

What it covers

Each part of the real-time model has its own controller object, available as an attribute of the main RtintController:

  • Motors: start, stop, move and read the state.
  • Regulation: switch feedback loops on and off.
  • Filters: read and change filter parameters, for example low-pass, PID and notch filters, and compute their frequency responses.
  • Signals and parameters: read and write model signals and tunable parameters.
  • Acquisition: record signals at the model sampling rate.
  • Signal generators: sine, chirp and other excitation signals, useful for system identification.
  • Triggers, lookup tables, EtherCAT slaves and 2D scans.

Most objects can print a summary table of their state in the terminal.

Example

from rtint.rtint_hardware import RtintController

config = {
    "server": "my-server-hostname",
    "port": 8080,
}

controller = RtintController("my_target", config)
controller._run_model("my_model")

# Access hardware components
controller.motor.start()
controller.regul.on()
controller.filter.low_pass(wn=100, xi=0.707)

Installation

pip install rtint

Python 3.9 to 3.13 is supported. The package depends on resyst-client, numpy, scipy, matplotlib, gevent, treelib and tabulate. A running Resyst server and a real-time model are needed to do anything useful with it.

  • [rtint-gui]({{< relref "real-time-interface-gui" >}}): desktop application built on this package.