LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running VIs dyanmically.

I'm writing a test executive to run a number of different test
routines. The test routines would consist of a file listing the tests
and indicates the sub-VIs that performs each of the specific tests. It
seems simple enough, but I don't know how to pass the name of the VI to
the VI server class functions. To me it appears that the name of the VI
has to be hard coded into the VI or a dialog box appears if none
specified.

What am I missing?

- David
0 Kudos
Message 1 of 3
(2,785 Views)
I did something similar by reading the text file and changed the VI names to an array of paths. Make the vi path input to the Open VI Reference a control instead of hard coding a path. If you put the Open VI Reference inside of a loop and auto index the array of paths to the test VIs, you should get what you want.
0 Kudos
Message 2 of 3
(2,785 Views)
I am now sucessfully calling VIs dynamically, thanks Dennis. But I've
been struggling with showing the called VIs when I want to (and when I
don't), and unloading them after they are done. I've played around with
both the VI execution and window options in the VI itself, and using the
property node in the main.vi. I can't seem to get consistant results.
The windows open, but stay on the screen after finishing. If they do
dissapear, they still appear on the taskbar, so aren't being unloaded.

Also, if build the main.vi into an executable, it works in the window
created by the build application. But when I run the executable
independantly of Labview, the app doesn't seem to connet to the calling
VIs.

Any tips would be helpful.


Dennis Knutson wrote:

> I d
id something similar by reading the text file and changed the VI
> names to an array of paths. Make the vi path input to the Open VI
> Reference a control instead of hard coding a path. If you put the Open
> VI Reference inside of a loop and auto index the array of paths to the
> test VIs, you should get what you want.
0 Kudos
Message 3 of 3
(2,785 Views)