I have a use-case for my RevPi that requires realtime performance and would love some pointers into the right direction(s).
The system consists of a measurement equipment transmitting data via CAN (either a PCAN-USB oder a CAN module for the RevPi) and multiple things that need to happen with that data:
- RT: process data and set AIO/DIO according to programmed logic
- Non-RT: stream data to a separate process to display and store it
The current implementation which only does the Non-RT part (processing the measurement data and storing it) can handle that throughput.
I have looked through the following ressources:
viewtopic.php?p=9224&hilit=realtime#p9224
https://revpimodio.org/revpipyplc/
https://revolutionpi.com/de/docs/codesys
I have my fair share of experience both on RevPi, Python and Linux, but the RT-stuff is sparcely documented and quite complex to me.
My Codebase is in Python and directly interacts with the CAN interface.
My relevant questions for you are:
- Can the RevPi take my datastream, process it in RT and then pass it on to a non-critical process?
- Are there requirements, caveats or best-practices for writing "RT"-Python?
- Do you have pointers for ressources or how to scaffold / design this system?
Best
Moritz