LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Starting and Stopping VI's in Tab Control/Subpanels

Hello everyone, I am still very new to Labview and have a question about combining multiple VI's. 

 

Essentially I have three different VIs I created that use the producer-consumer design. The producers constantly poll the a serial device and ship the received measurement down to the consumer where it displays readings and does other things like calculating values and writing data to .CSV files. I am writing these VI's for a automotive gage, with three different stations. Each station has its own VI. 

 

Since each VI needs to constantly poll the serial device I can not have all three VI's running in subpanels on a tab control. I believe the easiest solution would be to start and stop the VI's as a new tab is selected. Something like. When Tab1 is selected the Station1.vi is running, and when Tab2 is clicked, Station1.vi is stopped (thus freeing the serial port) and Station2.vi starts up. 

 

Am I on the right path? Is there a better alternative? Would it be better to just leave the VIs running in their subpanels and disable polling of the serial device instead of stopping and starting the VI?

 

Thanks! 

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

 


@Archer36 wrote:

Am I on the right path?

 

NOPE

 

Is there a better alternative?

 

Take a look into "shared variables"  the exampls that ship with LabVIEW might change the path you go downSmiley Wink

 

Would it be better to just leave the VIs running in their subpanels and disable polling of the serial device instead of stopping and starting the VI?  (hint)- nope 1 vi to poll the serial data and serve to the masses- 

 

Thanks! 


 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 2
(2,146 Views)