Hello,
I am using PFC200 8217, I was using ecockpit software, I had a program that work and create csv files without problem, ( it create csv files in the path /media/sd/CSV_FILES then it create every month a path /2024-11 exp and inside it I have my datalogs) after doing the migration from ecockpit FMW 22 to FMW26 and moving to codesys, the program doesn’t work, it create a csv file but doesn’t create the path 2024-11, which mean it doesn’t create the csv file too because the path doesn’t exist, I am using the library given by wago WagoAppDir, how can I solve this problem ? Thank you
In most function blocks from WAGO you can find oStatus output. Please check text status inside while it is trying to write to the file
I’ve tried to recreate your problem, but it is working well for me. If the ‘2024-11’ folder does not exist, it is created and the file is written correctly. If the ‘CSV_FILES’ folder does not exist, both folders are created and the file is written correctly.
I’m defining my file name like this:
sName := ‘/media/mySD/CSV_FILES/2024-11/MyDataFile.csv’;
Note that you need to use the correct volume name of the SD card. In my case, I named it ‘mySD’. You can format your SD card and give it a volume name (label) using the controller’s WBM:
According to the release notes for FW27, there was a bug fix in FW26 related to creating a directory on the SD card. Maybe this is related to your issue.
Also, starting with FW26, CODESYS can only access the following folders: “/home/codesys”, “media/sd”, & “/tmp” for security reasons. But I assume you can access subfolders below these.
Thank you so much, I update the FW to 28 and now the problem is solved