I am testing Codesys running on a Raspberry Pi in Read Only mode (using the read only feature built into Raspberry Pi OS).
So far so good. I am using the persistence manager to save some variables values on a usb stick and it works fine.
I was just wondering if anyone else have used Codesys on a Raspberry Pi in read only mode?
Have you ran into any issues?
Are there any other things to consider?
Is there a way to download the compiled file to a different location so that I don't need to put the Pi back in read/write mode every time I want to make a modification in the PLC?
Does anyone know if there is a way to exclude some files/folders from the overlayFS?
I am used to the file based write filter in windows 7 embedded where you can exclude files and folders from the overlay (but it is all screwed up in windows 10 with the new unified write filter).
Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
yes I do so, there are some problems with the softlicense I've added a improvement tracking entry for it.
I think there is no posibility add some file/folders to exclude - but better to ask this in raspberrypi.org forum: https://www.raspberrypi.org/forums/
Pretty sure you'll get an answer there.
Sure if needed you could redirect the whole PLClogic path to save Application to on an USB device.
(not only the persitence manager files)
Best Regards
Edwin
Last edit: eschwellinger 2021-01-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Edwin,
You wrote "there are some problems with the softlicense".
Can you give some more information about it?
Does it mean right now (with all latest Versions of Raspberry OS, CODESYS, and Raspi packages) it is not worth trying to run the RPI with OverlayFS because it will fail anyway when using a soft license?
Last edit: raspi-user 2021-02-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But I still have a problem. I think Codesys starts before the USB stick gets mounted. So Codesys creates another folder named DATA in media/pi. I think I have seen a way to delay the start of the runtime but I cannot find it now.
Is there a setting to delay the start of the runtime?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems to work when adding " /bin/sleep 10 " in /etc/init.d/codesyscontrol but I agree, it is probably not the best way to do it. I will try using a separate partition on the sd card instead of USB stick.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With a second partition I still need to add a delay. I will try to find out how to make sure the partition or the usb stick is mounted before starting the runtime.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm also using the RPI CM4 in a touch screen which has eMMC and a spare SD card slot. I was going to partition the eMMC as I'm concerned the vibrations will cause issues with SD card.
So you did not get it working with the partition and without a delay? I will continue and keep you updated when I find a solution
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am testing Codesys running on a Raspberry Pi in Read Only mode (using the read only feature built into Raspberry Pi OS).
So far so good. I am using the persistence manager to save some variables values on a usb stick and it works fine.
I was just wondering if anyone else have used Codesys on a Raspberry Pi in read only mode?
Have you ran into any issues?
Are there any other things to consider?
Is there a way to download the compiled file to a different location so that I don't need to put the Pi back in read/write mode every time I want to make a modification in the PLC?
Does anyone know if there is a way to exclude some files/folders from the overlayFS?
I am used to the file based write filter in windows 7 embedded where you can exclude files and folders from the overlay (but it is all screwed up in windows 10 with the new unified write filter).
Thank you
Hi,
yes I do so, there are some problems with the softlicense I've added a improvement tracking entry for it.
I think there is no posibility add some file/folders to exclude - but better to ask this in raspberrypi.org forum: https://www.raspberrypi.org/forums/
Pretty sure you'll get an answer there.
Sure if needed you could redirect the whole PLClogic path to save Application to on an USB device.
(not only the persitence manager files)
Best Regards
Edwin
Last edit: eschwellinger 2021-01-08
I don't have any problem with the license so far.
Could it be because I use a dongle for the license?
Hi Edwin,
You wrote "there are some problems with the softlicense".
Can you give some more information about it?
Does it mean right now (with all latest Versions of Raspberry OS, CODESYS, and Raspi packages) it is not worth trying to run the RPI with OverlayFS because it will fail anyway when using a soft license?
Last edit: raspi-user 2021-02-02
Yes, sure this should work only with runtime key not
with softlicense at the moment.
Update: with latest Raspberry PI OS (Januar release) for me it works without problems even now with Softlicense.
Last edit: eschwellinger 2021-02-02
How could I redirect the whole PLCLogic path?
I tried this but it does not work:
PlaceholderFilePath.1=/media/pi/DATA/PLCLogic, $PLCLogic$
PlaceholderFilePath.1.Volatile=1
PlaceholderFilePath.1.View=1
[SysFile]
PlcLogicPrefix=1
FilePath.1=/etc/, 3S.dat
PlaceholderFilePath=/media/pi/DATA/PLCLogic, $PLCLogic$
I must be missing something. It does not seem to work. Nothing gets written on the USB stick.
When I do this, everything works fine. I can see the persistent variables written on USB stick:
[SysFile]
FilePath.1=/etc/, 3S.dat
PlcLogicPrefix=1
PlaceholderFilePath.1=/media/pi/DATA/ac_persistence, $ac_persistence$
PlaceholderFilePath.1.Volatile=1
PlaceholderFilePath.1.View=1
But when I do this, nothing is written on the USB stick:
[SysFile]
PlcLogicPrefix=1
FilePath.1=/etc/, 3S.dat
PlaceholderFilePath=/media/pi/DATA/PlcLogic, $PLCLogic$
I found that the placeholder is $PlcLogic$ not $PLCLogic$ There is an error in Codesys Help:
https://help.codesys.com/webapp/ac_pm_overview;product=core_Application_Composer;version=3.5.16.0
So this is working now:
[SysFile]
FilePath.1=/etc/, 3S.dat
PlcLogicPrefix=1
PlaceholderFilePath.1=/media/pi/DATA/PlcLogic, $PlcLogic$
PlaceholderFilePath.1.Volatile=1
PlaceholderFilePath.1.View=1
But I still have a problem. I think Codesys starts before the USB stick gets mounted. So Codesys creates another folder named DATA in media/pi. I think I have seen a way to delay the start of the runtime but I cannot find it now.
Is there a setting to delay the start of the runtime?
I would try a sleep in the
/etc/init.d/codesyscontrol
but I'm not sure if this is a proper solution
It seems to work when adding " /bin/sleep 10 " in /etc/init.d/codesyscontrol but I agree, it is probably not the best way to do it. I will try using a separate partition on the sd card instead of USB stick.
With a second partition I still need to add a delay. I will try to find out how to make sure the partition or the usb stick is mounted before starting the runtime.
Hi yannickasselin,
Did you get this working on another partition and is it a reliable option?
Thanks
Yes it was working but I did not spend much time testing it.
I now use some Raspberry Pi CM4 with the overlay enabled and I save my persistent variables on a usb stick instead of a second partition.
I followed a quick guide to make sure my usb stick is always mounted on the same directory and so far did not need to delay the codesys runtime.
Everything works fine but I am still experimenting with it.
Dont't hesistate to post your findings on this topic.
Hi yannickasselin,
I'm also using the RPI CM4 in a touch screen which has eMMC and a spare SD card slot. I was going to partition the eMMC as I'm concerned the vibrations will cause issues with SD card.
So you did not get it working with the partition and without a delay? I will continue and keep you updated when I find a solution