I'm trying to write a programm, which reads and writes a config file to the raspberry pi filesystem.
When I start the Pi, I want to read out the config and when I press a button ("save"), I want the programm to read out some variables and write them into the config file (.csv).
I'm using the File Access library from 3S, but I can't get it to work.
The problem is, that the function blocks "FILE.write" and "FILE.close don't work correctly in my setup.
The eError outputs always return "handle invalid". I tried multiple settings for the csv-file (test.csv). I copied a valid version (filled with string data) of this file to the raspberry pi, I gave it the chmod 777 and 666 permissions, I let the programm create a new file and so on. But every time, I get "invalid handle". The FILE.open always returns a hfile (handle) with "0", and the write- and/or close-FB can't finish.
If I copy a valid file to the raspberry, it has "0" size after opening and writing with my code.
Can you explain me how I get to manage this problem? I would be very thankful for some advice.
Dear programmers,
I'm trying to write a programm, which reads and writes a config file to the raspberry pi filesystem.
When I start the Pi, I want to read out the config and when I press a button ("save"), I want the programm to read out some variables and write them into the config file (.csv).
I'm using the File Access library from 3S, but I can't get it to work.
The problem is, that the function blocks "FILE.write" and "FILE.close don't work correctly in my setup.
The eError outputs always return "handle invalid". I tried multiple settings for the csv-file (test.csv). I copied a valid version (filled with string data) of this file to the raspberry pi, I gave it the chmod 777 and 666 permissions, I let the programm create a new file and so on. But every time, I get "invalid handle". The FILE.open always returns a hfile (handle) with "0", and the write- and/or close-FB can't finish.
If I copy a valid file to the raspberry, it has "0" size after opening and writing with my code.
Can you explain me how I get to manage this problem? I would be very thankful for some advice.
I added the code which I used:
Hi,
I want to do the same in XML , do you make it working ?