Showing results for 
Search instead for 
Did you mean: 

can we control while loops and even cases inisde a subVI from outside

Is it possible to control while loops inside hte subVi from outside. I have attached to VI's. The 'while loop" is hte actual main VI. Inide is hte subVI "" which stops the while loop asn turns on the LED when the booelan is true. can this be controlled from the main VI??

Download All
0 Kudos
Message 1 of 4
Shall u post ur  screenshots of the VI's .
-Kumar B
Message 2 of 4
The first slide is the subVI and the second slide is the top level VI which calls the subVI. The sub Vi will stop the while loop and turn on the LED when i set the boolean to true. I have the boolena and LED as controls. on the top VI when i turn the voolena to true it does not stop the while loop inside the subVI. 😞
0 Kudos
Message 3 of 4

Hi Sreekar,

I have modified your example to work as you would like.  You need to ensure that the Boolean in the Main VI used to stop the while loop in the sub VI is continuously read.  Therefore, you need to place that Boolean inside of a while loop.

Please take a look at this solution, and let me know if you have any questions.  Best of luck on your application, and have a great day!!

Ching P.
DAQ and Academic Hardware R&D
National Instruments
Download All
0 Kudos
Message 4 of 4