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.
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
|
|
Installation
|
|
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.
Related
- rtint-gui: desktop application built on this package.