LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Error number 7 when LabView tries to open file"

"Error number 7 when LabView tries to open file"


"I get the following error when LabView tries to open a file -


" Error 7 occoured at Open File+.vi:Open File.
Possible reasons:
Labview: File not Found .
or
NI-488: Non-existent board.


Having searched through the archives here the error usually occurs when LabView cannot find the file. Well this time i know the file is there, i have even used the 'read from spreadsheet file' vi with the dialog box option to show LabView where the file is. When i copy just the open file code into another (blank) vi it runs correctly but in the middle of all my other code it kicks up this error. I have had the code working no problem before so this problem has just aros
e over the past week. Very frustrating.


Any help appreciated"
0 Kudos
Message 1 of 4
(3,051 Views)
,

Without seeing the code, this is difficult to determine. Be sure to probe the filename that you are writing to. Also, if the file is open, I believe that you will get this error, so be sure it isn't being opened by something else (you could have two "read from Spreadsheets" on top of each other) or something like that. Also, try using Highlight execution and probes, or stepping to troubleshoot the issue. In highlight Execution, you will see the data go into the read function, and if the error occurs there, you can slide the error dialog out the way to see the source of the error.

Good luck
0 Kudos
Message 2 of 4
(3,051 Views)
I saw this error many times and decided it that it occured when a file was not
found. Apparently the generic errors handlers can't tell the difference between
a file and a board: LabView "opens" them both as if they were files. In my
experience it was always a result of a file, not a board.

Open File.vi (a primitive used in lots of Read/WriteToFile,
Read/WriteBinToFile, Read/WriteSpreadsheetToFile, etc. sort of VIs) is very
touchy. If a file is open, Open File.vi will not open it again, If a file is
open for reading, Open File.vi will not open it for writing, etc. If the
default file name is blank, Open File.vi *may* prompt for a file name (I can't
remember).

My advice is to try a new file name and see if it works the first time after
the VI is opened. If it do
esn't work subsequent times, the file is still open
for writing and you are trying to open it again.

You have to work with it until you satisfy the little man inside LabView that
is shipped with the software to make sure your productivity is zero.

Good Luck!


Neil

========================================
Please remove the "nt" for legitimate email. Thanks!
========================================
0 Kudos
Message 3 of 4
(3,051 Views)
Actually this error can mean that the file or a specified directory is missing. First thing is to drop a probe on the wire carrying the filename to the code that is opening it. If that still looks good, I'd be glad to look at your code...

Mike
mporter@arielcorp.com

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 4
(3,051 Views)