Are u trying to run this in simulation mode at ur PC ?
No, I'm not.
If NO, then I think you your path which u have specfied (e.g.: "C:\...\..\MyFile.csv") and relative (e.g.: "\MyFile.csv", "MyFile.csv"") is wrong.
Is the path "MyFile.csv" wrong too? Isn't it supposed to be in the current directory?
"SysFileOpen" should create the file if it doesn't exist.
This function returns a file number > 0, but even after writing and closing the file, I'm not able to find it. I tried with the "filedir" command too, with no results.
If my SD-Card contains a directory called "\Data\" (sub-directory of root), is it enough to indicate "\Data\MyFile.csv" as path?
I did this way but in the card there is no trace of the file, although the functions return no errors.
As per my exp when the file SysFileOpen will not create a new file but it will return a value(u are right)
This will only open the file.
Path what u have specfied '\Data\MyFile.csv' is correct(u should use single quotes '')
Now i belive u are expecting that the system should read and creat a file then NO
it will just read the file and you have to specfy another file in the same directory say '\Data\MyFile1.csv' and use write function kindly refer the attched sample plc code for read/write functions.
I hope this should work
an tel me what happens ok