How to access RT Data from Scheduler app

Hey there,

I would like to extend the automation bundle example to read and write real time data. I have one snap imitating an EtherCat module. Therefore, the module creates 8 variables each to imitate leds and switches. The modified automation bundle example should do two task: 1) control 4 motors and 2) react to the switches and turn on the LEDs (switch1 -> led1, switch2 -> led2, ...). My problem is, that I cannot get the communication between the scheduler app and the fake EtherCat module. When I try to interact with realtime data of the fake EtherCat module from a snap as a dameon there is no problem, it just does not work from the scheduler application.

I have tried to add the dependencies in the CMakeList.txt files to access rt data. Maybe there is something missing. I could also imagen that there is something wrong in the snapcraft.yaml file. Are there any examples to create actions/tasks (executed by the scheduler) which access rt data? It would also be great, if there are any examples how to create custom taskes with custom actions from a C/C++ code base.

Does anyone know, where the problem could be? I can share my codebase or give more details, but I do not have any clue where to start.

Sincerly
Kai-Uwe

Best reply by CodeShepherd

After the analysis of your code we found that it is at the moment not possible to be owner of real time data in an own process in a app. Actually the owner has to be implemented as a bundle in our system but the user can be integrated and separate (but then using the system-files interface like mentioned in the datalayer.ecat.io example).

We are going to implement the necessary feature in our march release (RM20.03 version: 1.8). Thanks for bringing this up.

View original
7 replies