The HART (Hardware Access in Real-Time) Toolbox can be used to generate
xcos-blocks for hardware that have a C/C++ interface. The blocks can be used
under Linux, MaxOS or Windows for soft real time tasks. Using the
The xcos block hart_soft_realtime can be used for accurate real time control
tasks
down to 1 ms.
For infromation under:
http://hart.sourceforge.net/index.html
You can also find a more complete toolbox which supports RTAI code generation
on this site.