LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

when running an application I built, I keep getting error 7

I am trying to make a labVIEW program which calles many vi's and text files, into an .exe program. I managed to build it using the application builder and can then click on the exe program but once it opens I get an error. The error says, "Error 7 occured at Open File+.vi:Open File. Possible Reasons - LabVIEW: not found or NI-488: Non-Existant Board. I am not using any data aquisition instruments, all that my program uses are sub-vi's and text files. I am pretty sure that I included all the necessary files when building the program in the application builder and the error will still not go away. If I hit continue on the error box, the program will work a little, but the error box comes up again when I
try to get it to do many things that worked when the program was running as a .vi. I am currently using LabVIEW 6.0.2 and my computer has Windows 2000. I would appreciate any help to fix this problem.
0 Kudos
Message 1 of 15
(3,659 Views)
The first possibility listed with error 7 is LabVIEW: File not found. Since you get this error with Open File, I'd say that's the reason. You may have included all of your VIs but did you write your application to take into account that relative paths are different in a built application? For example, if you use Current VI's Path function to load a text file that would be in the same folder as the VI, in the development environment, the path would be something like c:\folder\example.vi. In a built app, the path would be c:\folder\app.exe\example.vi. So, in order to get to the folder you want to open the file, you need to do an extra Strip Path. To make your built app and development program work the same, put in a property node of class Application an
d property Application.Kind. This will return an enum of Development System, Run Time, etc. that you connect to a case statement to do the extra Strip Path.
Message 2 of 15
(3,659 Views)
I understand what you are saying. I can see that this is most likely my problem, however, I am a little unclear on how to fix it. I just started using LabVIEW recently and I have not completely mastered the program yet. I would appreciate any explaination to help clarify the steps I should take to fix my problem.
0 Kudos
Message 3 of 15
(3,659 Views)
Here's an example in LabVIEW that will return the folder that the VI resides in whether it is in development or run-time. After you get the current folder, you should be able to use the Build Path function to create the path to your text files.
0 Kudos
Message 4 of 15
(3,659 Views)
I have labVIEW version 6.0.2 and it cant open the file that you attached because it was made in labVIEW 7.
0 Kudos
Message 5 of 15
(3,659 Views)
Here's the example in 6.0
0 Kudos
Message 6 of 15
(3,659 Views)
Here's the example in 6.0
0 Kudos
Message 7 of 15
(3,659 Views)
It worked. The problem is fixed now. Thank you for your help.
0 Kudos
Message 8 of 15
(3,659 Views)
I managed to fix that problem but now i have run into another one. In my program I have a chart with a drop down menu that displays 7 different sets of data. Almost every different set of data has a different number of columns to display in the chart. There as a vi that the program calls which contains the information for the formatting of each different data set. The formatting worked when the program was run as a vi, but it does not work when running as an exe.
0 Kudos
Message 9 of 15
(3,659 Views)
Are you sure that you mean chart and not a table or multi-column listbox? A waveform chart doesn't have columns. In any event, I'm assuming that you are using property nodes of some type. Some properties are not available in the run-time engine. Right click the property and select help for that property. It will say whether it's available or not. Could you post an example of the VI and subVI that you're having a problem with? That's the best way for someone here to look at it and give an answer.
0 Kudos
Message 10 of 15
(3,659 Views)