Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If you're talking to the controller over a CAN bus, which is not realtime safe. There's no way to implement a realtime controller in software.

A common way to do a realtime controller is to have the realtime thread and a non-realtime thread which does the external communications, and passes data into the realtime thread in a lock free manner. You can do this but it's not going to be worth the effort if you're on the other side of a CAN bus. Realtime requirements are about guaranteeing maximum response times, if there's ever a link which cannot provide those guarantees you cannot continue to be realtime beyond that connection.