LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control loading files

A developed LabVIEW application requires a certain amount of time to load. During this time the computer appears to be doing nothing which is maddening to the user. (We live in an impatient culture.) A splash screen was developed using a progress bar that advances as the program files are loaded. It works well while running under LabVIEW. However, the stand alone executable version (using App Builder 6.1) is not as impressive. When starting the stand alone version, it again appears to be doing and then the splash screen briefly appears and then the program displays itself. This renders the splash screen as being pointless. It appears that the program loads all the files and then starts the splash screen. Is there a way to reverse this proc
ess? I found the article titled "How Do I Dynamically Load and Run VIs?" Frankly, it's not clear to me what it means and I'm not sure it's applicable to this issue. Please advise.
0 Kudos
Message 1 of 4
(3,057 Views)
If you dynamically call a VI, it is loaded into memory and run only when it is needed. You do this with VI Server functions. In LabVIEW 6.1, go to Find Examples>Programtically Calling VIs>Dynamically Loading and Calling VIs to find how to do this. In your case, you could have a small splash screen VI that loads quickly and inside of it, dynamically calls a main VI. When the main VI is finished loading, the splash screen window is then closed. You can find an example of this at http://zone.ni.com/devzone/explprog.nsf/webmain/E9C0939054249DCA86256A370074AFB8?opendocument&node=DZ52054_US
Message 2 of 4
(3,057 Views)
This particular application has 38 vi's. Five of them are already setup to dynamically load using vi server. Going through all the other vi's to set them up to dynamically load is not worth the time and potential trouble (the program actually work nicely.) As an experiment, I set up four of the larger vi's to dynamically load and it did not make a significant difference. Is there some other way to load the files while the splash screen is displayed? For example, is there an option or some trick in using application builder?
0 Kudos
Message 3 of 4
(3,057 Views)
I'm using a modified form or Dennis Knutson's answer for an application. The application takes about 12 seconds to load (you're right, the users thought it wasn't working).

I created a separate application which is used to launch the main application by means of a "system exe.vi" command. The "start up" Splash application displays "application loading" and a horizontal fill slide counts down the time.

"Splash.vi" attached below.

The trick was to put a 1 second delay in the Splash application before launching the main application. This allows the start up program to load its front panel before beginning the load of the main program. Otherwise the front panel is blank during part of main load.

Modify the *.exe string and front pane
l label to meet your needs. Also change the time delay before the Splash closes to match your typical main program launch.

Build applications for the Splash program and your main program. Distribute them together, but only include the Splash program in the program directory.

When the user launches the Splash program, they will see the "program loading" and slider count-down as the main program is loaded.

You shouldn't need to make any changes to your existing main application - just make sure both applications are stored in the same folder.

Hope this helps.
0 Kudos
Message 4 of 4
(3,057 Views)