After un upgrade of "CODESYS Control for Raspberry Pi MC SL" from v4.7 to v4.9 SysFileOpen function stopped working

2023-08-22
2023-08-22
  • rossanoparis

    rossanoparis - 2023-08-22

    Hello at all.

    After un upgrade of "CODESYS Control for Raspberry Pi MC SL" from v4.7 to v4.9 SysFileOpen function stopped working.
    I'm not able to read or write files from the PLC application.
    Before this upgrade all worked fine.

    I've read this thread [ https://forge.codesys.com/forge/talk/Engineering/thread/3da9ded84e/ ]
    Despite I followed that indications I couldn't get my code working again.
    Perhaps I'm missing something or I didn't understand how to use placeholders at all.
    Is there a different syntax to use for "SysFileOpen" in order to use placeholders?

    Thanks in advance for your help.

    • Information
      Compiler: CODESYS V3.5 SP19 Patch 2
      Runtime: codesyscontrol 4.9.0
      HW: KUNBUS RevPi Connect S

    Below the paths I want to access
    (The entire CODESYSControl_User.cfg file is attached)

    [SysFile]
    PlaceholderFilePath.1=/home/pi/hpca/bin, $hpcabin$
    PlaceholderFilePath.2=/home/pi/hpca/cfg, $hpcacfg$
    PlaceholderFilePath.3=/home/pi/hpca/logs, $hpcalogs$
    PlaceholderFilePath.4=/home/pi/hpca/resources, $hpcares$

     
  • rossanoparis

    rossanoparis - 2023-08-22

    For those who will step on this thread.

    Everything is fine, I had only to increase by 1 my place holders number.
    For sure the system is occupying the number 1 without being declared ...
    Below the modification I made to get my code working.

    [SysFile]
    PlaceholderFilePath.2=/home/pi/hpca/bin, $hpcabin$
    PlaceholderFilePath.3=/home/pi/hpca/cfg, $hpcacfg$
    PlaceholderFilePath.4=/home/pi/hpca/logs, $hpcalogs$
    PlaceholderFilePath.5=/home/pi/hpca/resources, $hpcares$

     

Log in to post a comment.