10-25-2011 02:41 AM
Hi there,
I'm using Labview 7.1 and Windows 7.
I built a VI and it ran perfectly yesterday. Today when I tried to run it, the following message appeared:
Fehler 1 ist bei Open File+.vi:Open File aufgetreten
Mögliche Gründe:
LabVIEW: Ein Ausgabeparameter ist ungültig.
---
NI-488: Befehl erfordert, daß der GPIB-Regler der aktive Regler ist.
Translation (google translator):
Error 1 is to open file vi:. Openfile occurred
Possible reasons for this:
LabVIEW: An input parameter is invalid.
---
NI 488: command requires that the GPIB controller is the active controller.
In the attachment I am sending the file. The file is very simple. I'm just importing some data from excel.
Regards
Solved! Go to Solution.
10-25-2011 02:47 AM - edited 10-25-2011 02:47 AM
Are you sure the path to the file is correct?
Also, you're reading the content of the same file 5 times within a very short time. Read the file outside the for loop. You can use auto-indexing to get the rows.
10-25-2011 02:55 AM
See also here.
10-25-2011 03:04 AM
Also note that LabVIEW 7.1 is not supported on Windows 7 (details).
The Error message for "error 1" is a bit more detailed in newer LabVIEW versions. In LabVIEW 2010, it says:
"LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @."
10-25-2011 03:52 AM
Hi there,
First of all, thanks for all the answers. I think there might be a problem of path, because sometimes it works and sometimes not.
By the way, whenever I type a path and save the file. After closing and opening the file again, the path disapears, any suggestion?
I have the VI in a loop, because I want to make operations with a specific cell from Excel in each iteration. First loop, use the first cell, second loop the second one and so on. Maybe there is another way to do that, but that is how I figured it ou. If you have any suggestions to make it simpler I appreciate.
Regards
10-25-2011 03:57 AM
@Cottbus wrote:
First of all, thanks for all the answers. I think there might be a problem of path, because sometimes it works and sometimes not.
By the way, whenever I type a path and save the file. After closing and opening the file again, the path disapears, any suggestion?
Enter your desired path into the control, then "right-click...make current value default". Now save the VI.
10-25-2011 04:05 AM
Hi altenbach,
Thanks for the answer. Now it works perfectly 🙂
I'm still a begginer and unfortunately I have to work with a german version.
Sorry if I bother, but maybe this topic can be helpfull for someone in the future.
Regards
10-25-2011 04:08 AM - edited 10-25-2011 04:10 AM
Cottbus wrote:I have the VI in a loop, because I want to make operations with a specific cell from Excel in each iteration. First loop, use the first cell, second loop the second one and so on. Maybe there is another way to do that, but that is how I figured it ou. If you have any suggestions to make it simpler I appreciate.
First of all, you don't have an "excel" file, which is a proprietary format. You have a delimited plain text table with semicolons separating columns and linefeeds separating rows.
You have only one loop. You are probably talking about first iteration, second iteration etc.
Your loop spins so fast that you will only see the last row after the VI has completed. Use a small wait.
All you need is the following code (looks slightly different, because it is LabVIEW 2010). This will display all rows in sequence for however many rows you have. If you only want to display the first 5 rows, you can wire a 5 constant to the N of the FOR loop.
10-26-2011 02:57 AM
Hi altenbach,
Thanks for the tips. Indeed your suggestion works the same way and it is simpler.
I think this topic can be closed.
Thanks to everyone for the support