Getting FORTE boot files to work on Raspberry Pi [message #1772508] |
Mon, 11 September 2017 16:11 |
Marc Jakobi Messages: 67 Registered: April 2017 |
Member |
|
|
Hello, it's me again...
I am having another problem with getting my IEC 61499 application running on the Raspberry Pi.
I have created a boot file via Export--> Create FORTE boot files. I have tried with the FORTE_PC's MGR_ID set to "localhost:61499" and "192.168.10.193:61499".
I renamed the fboot file to "forte.fboot" and copied it to the directory containing forte on the RPi.
I also added the line
to rc.local so that it would start automatically when the RPi boots. Additionally, I have created an SIFB that uses the Linux Watchdog API to make sure the device reboots if something goes wrong.
It seems like the fboot file is not found or loaded correctly. When I open 4diac on my PC and monitor the system, it just shows a load on NaNs at the FB inputs and outputs (I have the device's MGR_ID reconfigured to the RPi's address).
Changing the permissions for the fboot file (chmod u+x forte.fboot) doesn't seem to fix it.
If I download the application from 4diac, it downloads correctly and then monitoring works (indicating that FORTE starts up correctly, but there was no application loaded).
I read in an old documentation on source forge that FORTE_SUPPORT_BOOTFILE has to be enabled on FORTE. I can's seem to find that setting in CMake though. The only bootfile setting I can fine is "FORTE_BOOTFILELINEBUFSIZE", which is set to 300.
I assume this is an old, now obsolete setting and boot files are supported by default?
Thanks for any help!
Edit: If I kill FORTE and restart it manually, it works.
Could it be that the fboot file has to be in the same location as the rc.local script?
[Updated on: Mon, 11 September 2017 17:01] Report message to a moderator
|
|
|
|
Re: Getting FORTE boot files to work on Raspberry Pi [message #1772512 is a reply to message #1772509] |
Mon, 11 September 2017 18:38 |
|
You where faster then me. This was exactly what I was suggesting. Because forte looks in the directory it was started from. So if you type in your rc script /home/pi/forte it will be started from the directory the rcscript is invoked. This is a typical unix behavior and has also some advantages. Because you could now have several bootfiles and depending on the script start any of them.
to your other question: Yes bootfiles are no per default on. you still can disable them. But the option is hidden in the advanced options section. So if you open cmake gui and tick the advanced checkbox you will not that ther are a bunch more options to configure FORTE. however these are mainly needed for tweaking FORTE for very special usecases and the default value should be for most users be sufficient. Therefore it is in the advanced section.
Just as side information we are also working to get rid of the FORTE_BOOTFILELINEBUFSIZE option for version 1.9. This should make forte more stabel to different kinds of bootfile sizes.
|
|
|
Re: Getting FORTE boot files to work on Raspberry Pi [message #1772809 is a reply to message #1772512] |
Fri, 15 September 2017 14:50 |
Marc Jakobi Messages: 67 Registered: April 2017 |
Member |
|
|
Okay, now something strange is happening.
I have CSIFBs in my application that I use for requesting data and debug information remotely from Matlab.
When I start forte manually, it loads the boot file correctly and I can retrieve the data in Matlab.
But when I start it from rc.local, it appears to load the boot file (The tcpip object in Matlab opens the connection successfully), but the response from forte never arrives).
If forte is not running, or forte is running and the fboot file is not loaded, the tcpip object can't connect. This means that the boot file is loaded in both cases, but something goes wrong when it's loaded at startup.
Could this have something to do with permissions?
But if I add sudo to the startup script, it gets even stranger. It seemingly starts two root instances of forte (whereby killing one PID also kills the other instance) and the data transfer problem still persists.
[Updated on: Fri, 15 September 2017 14:52] Report message to a moderator
|
|
|
|
|
Re: Getting FORTE boot files to work on Raspberry Pi [message #1772893 is a reply to message #1772889] |
Mon, 18 September 2017 13:14 |
|
thats interesting. I'm not very good at init scripts but I remember that you could specify a priority for the order of scripts to be started. So based on your observation it would be good to place it after network configuration.
Another option is to use systemd. Jens Reiman provided in the development branch a system.d configuration file fore forte. I think this could also work for the rapsi.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03376 seconds