Raspberry Pi read only

2021-01-06
2021-01-11
  • yannickasselin

    yannickasselin - 2021-01-06

    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

     
  • eschwellinger

    eschwellinger - 2021-01-08

    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
    • yannickasselin

      yannickasselin - 2021-01-09

      I don't have any problem with the license so far.
      Could it be because I use a dongle for the license?

       
  • eschwellinger

    eschwellinger - 2021-01-09

    Yes, sure this should work...

     

    Last edit: eschwellinger 2021-01-09
  • yannickasselin

    yannickasselin - 2021-01-11

    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

     
  • eschwellinger

    eschwellinger - 2021-01-11

    [SysFile]
    PlcLogicPrefix=1
    FilePath.1=/etc/, 3S.dat
    PlaceholderFilePath=/media/pi/DATA/PLCLogic, $PLCLogic$

     
  • yannickasselin

    yannickasselin - 2021-01-11

    I must be missing something. It does not seem to work. Nothing gets written on the USB stick.

     
  • yannickasselin

    yannickasselin - 2021-01-11

    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$

     
  • yannickasselin

    yannickasselin - 2021-01-11

    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?

     
  • eschwellinger

    eschwellinger - 2021-01-11

    I would try a sleep in the
    /etc/init.d/codesyscontrol
    but I'm not sure if this is a proper solution

     
  • yannickasselin

    yannickasselin - 2021-01-11

    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.

     
  • yannickasselin

    yannickasselin - 2021-01-11

    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.

     

Log in to post a comment.