annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

Creating a working executable

Risolto!
Vai alla soluzione

When in development mode my project works perfect.  When I try to develop the executable, the vi's that I have loading programmatically won't start working at all.
  If you look at the attachment, I load separate vi's into memory and they start running once the are loaded.  As they run, the main calling vi populates the information from global variables that have new information in them.  Once the called vi is completed, I remove the vi from memory. 
In the executable, the program just hangs when that called vi is supposed to automatically start working.  I am probably having an issue understanding how to set up the build.  Help is appreciated.  Thank you.

0 Kudos
Messaggio 1 di 8
4.412Visualizzazioni

Maybe the path to that VI is incorrect, why not use a path relative to the EXE?

What error information do you get?

0 Kudos
Messaggio 2 di 8
4.391Visualizzazioni

The executable is in the same path as the vi so that isn't the problem.  I also get no error message.  The vi progresses up until that point.  It just waits at that moment that the other vi should be launching. 

0 Kudos
Messaggio 3 di 8
4.382Visualizzazioni

zip all of your files and attach the project.

 

one of two things is likely your cause:

 

1) you're not explicitly including these VIs in the "always include" section. as you're calling them dynamically, the build specs don't know the need to bring them in so they simply don't exist

 

2) the relative path is changing slightly due to the build and you'll need to account for that

0 Kudos
Messaggio 4 di 8
4.357Visualizzazioni
Soluzione
Accettato da autore argomento Big_Guy

If you'd use static VI references, you wouldn't have this problem.

 

But if you can use static VI references, you wouldn't need dynamic loading at all. Then again, if you use dynamic VIs on normal VIs (not reentrant clones), it can almost certainly be avoided altogether.

 

What's wrong with placing the VIs on the diagram? Why load\start them dynamically?

0 Kudos
Messaggio 5 di 8
4.335Visualizzazioni

@Big_Guy wrote:

The executable is in the same path as the vi so that isn't the problem.


No it's not. (or it depends on which VI you are referring to)

 

When developing in the IDE, the VI is at path A.  In an executable, the Excutable may be at path A, but then the VI is at path A\VI.vi.  Paths relative to this will be wrongunless you take care of the differences in VI path (Not the same as EXE path) which occurs during building an executable.

0 Kudos
Messaggio 6 di 8
4.332Visualizzazioni

From your image, the first issue I see is you are using an absolute path.  If the VI is living outside of the executable, then use Application Directory to get the folder of the executable and then use Build Path to create the path to the VI you want to run.  If your dynamic VI is included in the executable, then use Current VI's Path and then use Strip Path and Build Path to create the path to the VI you want to run.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Messaggio 7 di 8
4.330Visualizzazioni

I went ahead and added the vi to the diagram and restructured some of it.  I had great results from there and the executable was created.  Thank you for your help.

0 Kudos
Messaggio 8 di 8
4.294Visualizzazioni