LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using radio button to control while loop in subvi

I have a radio button in a while loop in a subvi and I would like to control it using the main vi.

 

I have looked at:

http://www.ni.com/example/28769/en/

https://decibel.ni.com/content/docs/DOC-36073

 

My radio button has two states, On and Off, which are indicated by a round led for each. I am having difficult comparing the value of the radio buttons property node to the state that I want. For example I want the while loop to end if Radio Button value is On. I tried using variant to data, but I either did it wrong, or that is not what I am supposed to do.

0 Kudos
Message 1 of 8
(3,394 Views)

do you mean this vi 

0 Kudos
Message 2 of 8
(3,370 Views)

Sort of except this is what it would look like to control it from the subvi. I want to be able to control it from the main vi.

0 Kudos
Message 3 of 8
(3,348 Views)

so you need this 

Download All
0 Kudos
Message 4 of 8
(3,322 Views)

So it will not work without making it an event?

0 Kudos
Message 5 of 8
(3,307 Views)
No I dont think so
0 Kudos
Message 6 of 8
(3,292 Views)

No you don't have to use an Event Structure to perform this task in the Subvi.

 

See the attached example.

 

If you get the "Radio Buttons" reference from the Subvi, you can directly control it from your Main vi.

 

steve

 

 

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Download All
Message 7 of 8
(3,275 Views)
oh your are right stevem
your code is really work nice
0 Kudos
Message 8 of 8
(3,261 Views)