No file found

csu-chris
2024-10-15
2024-10-30
  • csu-chris - 2024-10-15

    I'm having trouble getting started with the SysFile library. I tried copying and running the code found here:

    https://forge.codesys.com/forge/talk/Engineering/thread/f17c3d0e64/

    Every time I try to run the file handle pointer returns: 16#FFFFFFFFFFFFFFFF <dereference of="" invalid="" pointer=""></dereference>

    I can see the file when I look in the Device -> Files window

    Any idea what I'm doing wrong?

     
  • mabac - 2024-10-30

    CODESYS introduced many cyber security related changes over the last few years, one of them is to restrict file access.

    • By default, file access is restricted to the PlcLogic folder and subfolders of the CODESYS control runtime of version 3.5.19.0 and newer. For Control Win this would be the folder C:\ProgramData\CODESYS\CODESYSControlWinV3x64\xxxxxxxx\PlcLogic\
    • To enable access to other folders, you can configure additional paths by adding them to the file CODESYSControl.cfg. For example:
      [SysFile]
      FilePath=C:/temp/test
      FilePath.1=C:/Users/Public
    • You should now be able to access your file in C:\temp\test\ or in C:\Users\Public
     

Log in to post a comment.