07-02-2015 09:34 AM
Hello,
I have been fighting an issue for days now where my LabVIEW application will not work correctly when installed as an executable.
Everything works as expected as a labview project. I tried to build an executable and installed it on a seperate machine. That did not work.
I also tried installing the application on the same PC that I developed the software and it also does not work.
I have a program that runs external VI's. The top level VI begins by running an external VI in a seperate folder using the Open VI by Reference.
The Open VI by Reference fails in Image 1.
I am debugging the VI that is being called. If I comment out parts of it, the VI will successfully work. See the attached image of the sub VI that I have commented out.
The thing is the items I comment out seem relatively simple and doesn't make any sense.
Has anyone had similar installation issues? Is there any advice?
Any help would be appreciated. Thank you very much.
07-02-2015 09:39 AM
There's some great help in the LabVIEW manual telling you exactly what kinds of pitfalls you might encounter while building an installation. I believe your problem is covered.
(Here's the 2014 online version for your convenience.)
07-02-2015 12:12 PM
DO NOT ATTACH PICTURES (unless it's of a really cute kitten). We cannot execute, debug, or modify a picture -- we need LabVIEW code. If you need to attach more than one VI, bundle them into a ZIP file and attach that. Please!
Bob Schor
07-02-2015 12:18 PM
My code is very large, so I don't want to include the entire project. None of these VI's will work on their own.
I cannot give out the entire project.
I will do some reading on this over the weekend.
But is there any reason why an installation, on my PC will not work when the project, on the same PC does?
07-02-2015 12:53 PM
Does you program ever use the "Current VI's Path" function? If so, you should check the file path that is going into the "Open VI by reference" function. The "Current VI's Path" function behaves counter-intuitively when it runs in an exe (this is mentioned in the document that billko posted above). The function returns an extra item when it runs in an exe. For instance, if you are running in normal LabViEW and you get a path of "C:\program files\my program.vi", then you will get "C:\program files\my application\my program.vi" when you are running an exectuable. So, if you are using the "Current VI's Path" function upstream of the "Open VI by reference" function, this might be causing your problem.
07-02-2015 02:29 PM
The VI path is valid. When the VI fails to execute, I get a popup dialog box that matches the exact path of my file.
The VI I try to open by reference WILL execute if I disable certain subvi's inside of it, as pointed out above.
07-02-2015 03:11 PM
@DB_IQ wrote:
The VI path is valid. When the VI fails to execute, I get a popup dialog box that matches the exact path of my file.
The VI I try to open by reference WILL execute if I disable certain subvi's inside of it, as pointed out above.
Did it occur to you to look inside those "certain subVIs" to see what's going on? Obviously we can't because you didn't upload any code.
07-02-2015 03:19 PM
If I comment out parts of it, the VI will successfully work.
If it works successfully without them, then THROW THOSE PARTS AWAY!
Blog for (mostly LabVIEW) programmers: Tips And Tricks
07-02-2015 03:22 PM
When the VI fails to execute, I get a popup dialog box
Well, don't keep us wondering, man, tell us what it says....
Blog for (mostly LabVIEW) programmers: Tips And Tricks
07-02-2015 11:35 PM
Here you go Bob... enjoy...