Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
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