Hello I'm trying to use DirOpen to access a directory where then I can read/list the files inside.
But I can't list any files because DirOpen.xError is always true.
In eError the message is this:
" ERROR_UNKNOWN Local library error ID (0: no error; 5101: time out)**** "
I have in the file explorer the path 'C:\CodesysTest\Aluminium' and to make sure I also created in the plc a folder to 'prj/Recipes/Aluminium'. I tried using the different paths, but in both it happens the same thing.Inside the folder Aluminium there is two csv files, that I want to list.
Hello just to give more feedback the error I get is
"ERROR_UNKNOWN :represents raw value of 5110" in File.DirOpen. The xDone never gets true, and I never get the listing of files (csv files in this case).
In the hDir i get the value of 0 for a DWord!?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the answer Tim.
I am using the codesys version 3.5 SP16, is this also affected or only after version 19?
But now at leastI know that is an acess problem to the file and not something else.
Unfortunately the link you posted on 2023 are now dead, but I will investigate!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well I created a user as Admin, gave access rigths to the file but still can't read the files in the plc it gives the same error. I guess is something to do with plc itself.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello I'm trying to use DirOpen to access a directory where then I can read/list the files inside.
But I can't list any files because DirOpen.xError is always true.
In eError the message is this:
" ERROR_UNKNOWN Local library error ID (0: no error; 5101: time out)**** "
I have in the file explorer the path 'C:\CodesysTest\Aluminium' and to make sure I also created in the plc a folder to 'prj/Recipes/Aluminium'. I tried using the different paths, but in both it happens the same thing.Inside the folder Aluminium there is two csv files, that I want to list.
I added in the library manager CAA Files and CAA Types.
I am using the example of https://content.helpme-codesys.com/en/libs/CAA%20File/Current/Examples.html#directory
but not matter what I do, I can't get the list the names of the files.
What am I missing?
Hello just to give more feedback the error I get is
"ERROR_UNKNOWN :represents raw value of 5110" in File.DirOpen. The xDone never gets true, and I never get the listing of files (csv files in this case).
In the hDir i get the value of 0 for a DWord!?
With new runtimes, the access outside the runtime folder is protected.
See:
https://forge.codesys.com/forge/talk/Engineering/thread/3da9ded84e/
Thanks for the answer Tim.
I am using the codesys version 3.5 SP16, is this also affected or only after version 19?
But now at leastI know that is an acess problem to the file and not something else.
Unfortunately the link you posted on 2023 are now dead, but I will investigate!
Well I created a user as Admin, gave access rigths to the file but still can't read the files in the plc it gives the same error. I guess is something to do with plc itself.