LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get my built application to behave EXACTLY like my running VI?

I have an application that, when built, behaves very differently than the running VI. It does many things differently, like ignoring button presses (handled in an event structire) and not creating initialization files (I am using relative paths). This is extremely frustrating for me. I have already performed a mass compile and have absolutely zero erros and warnings. Does anyone have any insight into the bizarre inner-workings of the application builder?

Thanks in advance.
0 Kudos
Message 1 of 5
(2,729 Views)
The problem with ini files is probably because you're not parsing the file names correctly. You have to do an extra strip path when you have a built app. A VI who's path in the development mode is c:\folder\example.vi has a path when built of c:\folder\name.exe\example.vi. As far as the button presses and event structure, it's hard to say without seeing your code. All while loops should have a small delay. This could be part of your problem if you don't have any. Can you post your code or an example that demonstrates the problem?
0 Kudos
Message 2 of 5
(2,716 Views)
Bear in mind that the EXE created is basically similar to an LLB. Therefore, you need to be careful with the paths, especially if they're relative.

For example, if you build an EXE from a vi in C:\Code\MyVI.vi, it generates an exe located at C:\Code\MyExe.exe. When running the code, however, the VI "MyVi" will have a path of c:\Code\Myexe.exe\Myvi.vi. In this way, the EXE behaves like a folder. Yes it's annoying, but it can't be changed. This means that many relative paths which are valid for a VI won't be valid for an EXE.

There have been VIs posted here which help get around that problem (Always returning the correct folder - minus the EXE). Do a search for EXE and Path, and there should be some examples.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 3 of 5
(2,713 Views)
Heres the one I use for the lazy in us all 😃
0 Kudos
Message 4 of 5
(2,693 Views)
It was, in fact, the additional link in the path that was creating all the problems. Thanks for all the help!
0 Kudos
Message 5 of 5
(2,692 Views)