12-22-2009 02:41 PM
Once the file is created subsequent writes show Error code 8 out of the "Write File" VI LV6. (Cannot upgrade the code at this time). I'm using open/create/Replace File VI along with the Write File VI. Creating the file run OK, once I go back and rerun for a write the "Write File" reports Error code 8. How do I fix this issue.... using LV6.
12-22-2009 03:33 PM
Error 8, in the context of reading/writing is a permission error.
If you are reading, check that you are allowed read access for the folder/file you want to read.
If you are writing, check that you are allowed to write into that folder.
12-22-2009 03:35 PM
I noticed that in the image you attached, you are trying to write something to the C: drive.
Are you an administrator on that machine? That may be what is giving you a hard time.
12-22-2009 03:49 PM - edited 12-22-2009 03:53 PM
The file created by the open/create/Replace VI attributes are NOT set to READ ONLY. See the pic below. If the LV creates the file it should be able to subsequently write to the same file. Once again this is LV version 6. It didn't work this way before... I took a look at a few things in the code and noticed this anomaly.
BTW, there are root or branch level folder showing the Read Only attribute is inherited from parent folder... but my whole C drive is this way... but LV should be able to write to the file regardless....
12-22-2009 04:00 PM
The above code works just fine on my virtual machine running LV 6i no matter how many times you run it.. Is your screenshot based on the first write, or a subsequent write? It shows 0 bytes.
richjoh wrote:
BTW, there are root or branch level folder showing the Read Only attribute is inherited from parent folder... but my whole C drive is this way... but LV should be able to write to the file regardless....
Why? LabVIEW does not override the file system's permissions, but this would not be due to the "Read Only" attribute for a folder. This is basically meaningless on Windows. For a folder what matters is the Access Control List. Assuming, of course, that you're dealing with an NTFS file system.
12-22-2009 04:11 PM
Take a look at the pics below. I create the file, close it, open it, write to it, spur error code 8... bizaar... Some hidden permission but I don't know where.... I'm an Administrator on the PC.
12-22-2009 04:11 PM
If your root folder is showing that you do not have write access, there is a good chance the children folders would also not allow write access (except for your 'documents and settings >> user' folder)
12-23-2009 12:29 AM
Hello,
Change the "open or create" option to "Create or Replace".
Or delete the file before running the application (if you still want to stick to the "Open or create" option)
I believe that LabVIEW tries to open the file in your case since it already exists and by making the option to "create or replace" it will overwrite the existing file
12-23-2009 04:56 PM
Problem went away after uninstall LV 6 then reinstalling LV6.... . I believe the problem had to do with installing in c:\Labview6 folder versus (the Legacy) C:\labview folder where the company wants it. The initial UNinstall may have not have been a complete removal on a prior install.
Thanks for the help.
12-23-2009 11:10 PM