Hi, I'm not very good at programming codesys.
I'm trying to use the SysFileGetSize function to test whether a file exists or not.
Now I'm trying to simulate on my computer and i put in the folder: C:\ProgramData\CODESYS\Simulation\PlcLogic
a file named myfile.txt.
In simulation I see the correct size of the file.
I don't know what to put in pResult.
I'm looking for a way to read the error no object.
My goal is have a message when the file does not exist.
Currently when I delete the file I only get the size at zero.
I'm looking for a way to read the error no object, thanks !
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I'm not very good at programming codesys.
I'm trying to use the SysFileGetSize function to test whether a file exists or not.
Now I'm trying to simulate on my computer and i put in the folder: C:\ProgramData\CODESYS\Simulation\PlcLogic
a file named myfile.txt.
In simulation I see the correct size of the file.
I don't know what to put in pResult.
I'm looking for a way to read the error no object.
My goal is have a message when the file does not exist.
Currently when I delete the file I only get the size at zero.
I'm looking for a way to read the error no object, thanks !
found the solution:
adr(what) on pResult