LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sub vi will not run when in a built application

I have an application that simply present data from CSV files,  This app has a tab interface to view different report formats.
 
I built the app an it works great.
 
I then decided to add a splash screen by making a new top level VI that runs and fades out it's front panel.
 
As the front panel is fading out I have tried running the original top level vi in two ways (niether of which work)
1.  Pass the path of the vi to an open ref function, then use the run vi property node,  then close the current vi (this part works the splash screen closes)
 
2.  Place the original top level vi on the block diagram after the fade code (to the right in a frame)  then close the current vi,  current vi closes here too.
 
For some reason the original vi will not run as a sub vi....
 
Any suggestions would be appreciated
 
Thanks in advance
Tim C
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 1 of 9
(3,617 Views)
Hi Tim,
how do you load your vi? Did you bear in mind that the path in the executable is different? Can you upload your code?

Mike
0 Kudos
Message 2 of 9
(3,612 Views)
here you go.....
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
Download All
0 Kudos
Message 3 of 9
(3,604 Views)
I suspect that it has something to do with trying to load a VI in a buit app, as the VIs are not really VIs at teh point, meaning it doesn't existing in the path provided as it is all rolled into the executable.....
 
Best Regards
Tim C.
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 4 of 9
(3,603 Views)
That is some awful spelling , sorry
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 5 of 9
(3,602 Views)

You are using a "Current Vi's Path" function.  When part of a build, it does not return what you expect.  You can experiment by displaying the path before & after you build.  The difference is that after you build, it will point to the exe that you created, because that's where it now is..

Read the info below in the attached image:

RayR



Message Edited by JoeLabView on 06-15-2008 10:12 AM
Download All
0 Kudos
Message 6 of 9
(3,592 Views)
Hi Tim,
if you use onle the "strip path" function, then you definitively has no path to a vi from which you can close the FP.

Mike
0 Kudos
Message 7 of 9
(3,589 Views)

Look at the difference between the two results.  Both VI & exe are in the same folder..



Message Edited by JoeLabView on 06-15-2008 10:32 AM
0 Kudos
Message 8 of 9
(3,585 Views)
I first encountered the problem with running file path from an executable a couple of years ago.  I wrote a VI to fix the problem.  This returns the correct path whether you're in the development environment or in the executable.  It's in LabVIEW 6.1, but should work in later revs.  Attached LV6_1 Strip EXE Path 5, also a picture of a slightly different method.
 
I've heard there are other methods available from open source G.
 
About popcorn:  A company I used to work for made a 220v 30 amp commercial microwave.  Popcorn in one minute, and setting the controls for one minute four seconds burned it.
Download All
0 Kudos
Message 9 of 9
(3,488 Views)