|
Re: Board optimization [message #1815826 is a reply to message #1815775] |
Fri, 11 October 2019 14:22 |
|
I had a look into the implementation of the sysfs IO interface. There I saw that it has an implementation of a scanning thread, which is updating the inputs with a scan-time of 10ms. See for reference line 235 in src/modules/sysfsprocint.cpp.
Currently this is unfortunately hardcoded. so the first thing what I would do for testing is to get this time down to 1ms. The second thing what you can do now is to use the IND output of your IX FB. This will trigger everytime the input changes. I hope with that you should be much faster.
If this is then still not sufficient I think the next step would be to look into other ways of accessing IOs on raspberryPis. then also the new IO design should be implemented. In that we can have more control on the scan cycles.
I hope this helps.
Cheers,
Alois
|
|
|
|
Re: Board optimization [message #1815892 is a reply to message #1815887] |
Mon, 14 October 2019 14:48 |
|
First of all, deactivate as many linux processes as possible. Then you can also consider changing the real-time priority of 4diac FORTE as a whole. The chrt command can be used for that. However it requires root rights.
At which time levels are you currently? It would definitely be worth to look where the most time is currently spent. Perf could be used for that. Based on that I would then look into improving that parts of 4diac FORTE
|
|
|
Re: Board optimization [message #1815991 is a reply to message #1815892] |
Wed, 16 October 2019 15:35 |
Mike Wazowski Messages: 23 Registered: October 2019 |
Junior Member |
|
|
Ok, I'll try it. Later I will write how it works and attach screenshots of experiment.
Now I have a maximum 8ms on the BeagleBone board and 2-5 ms at RaspberryPi 3B+. But when the square signal at the GPIO input is set, I have the following problems:
1) "External event queue is full, external event dropped" can happen if I set the signal frequency to 1 kHz;
2) it can rarely miss the active signal at the GPIO input and not transmit it at the GPIO output.
What could be the reason for this? And how can this be fixed?
FORTE will show best perfomanse if I set sleepThread equal 0 ms - sleepThread(0).
And could you help me with FreeRTOS?
https://www.eclipse.org/forums/index.php/t/1100779/
[Updated on: Wed, 16 October 2019 15:37] Report message to a moderator
|
|
|
Re: Board optimization [message #1816088 is a reply to message #1815991] |
Sun, 20 October 2019 18:40 |
|
The "External event queue is full, external event dropped" indicates that you are generating events much faster then 4diac FORTE can process them. To be more accurate the code within one function block is blocking so long that the external events can not be correctly queued. I would assume that this happens in the QX block now. This speaks for looking at other options to access the IO interface. Although maybe here the chrt could help.
|
|
|
Powered by
FUDForum. Page generated in 0.02334 seconds