LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change vi in subpanel

I am trying to follow the LV samples of subpanel.

 

I need to close the vi in the subpanel when used up and open another new vi in the same subpanel.

 

May you give any suggestion, especially how to close the vi in the subpanel.

 

Thanks.

0 Kudos
Message 1 of 2
(2,659 Views)

I assume that the VI which you want to close is running contineously (may be in a while loop)...so when you call the another subvi in the same panel you would like to kill (terminate) the previous vi and run the selected vi...

 

If this is right then you can...

 

Add a common piece of code that will terminate the running vi ,  remove it from the subpanel and load/run the new vi...

 

To do this you can dynamically create user event in the main vi, which will trigger a event in the first vi, terminate it and then launch the second vi. The same principle could be used for any number of vi to be launched in the main vi )main vi actaullay has the sub panel)

 

 

Guru

CLA

Regards
Guru (CLA)
Message 2 of 2
(2,643 Views)