From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make a radio button control change automatically with time?

Hello everybody 🙂
 
I have a radio button selection with 4 options (Line A, B, C, D) which controls a number of valves depending on which line is sampled. Right now I have to do this selection manually but the proccess requires that each line is sampled for 15 seconds.
 
Is there a way to do this automatically, meaning when I press a button (e.x. START) radio selection goes to Line A, after 15 seconds to line B, after 15 seconds to Line C, after 15 seconds to line B, after 15 seconds to Line D, and then from the beginnining to line A, B, etc..., until I press the stop button.
 
Any help is appreciated
 
Thanks for your time Smiley Tongue
0 Kudos
Message 1 of 4
(3,752 Views)

I don't have access to 7.1 at the moment, but if I remember correctly, a radio button is simply a numeric.
If that is the case, then you can do something like this:

You can also get more sophisticated and use things like elapsed time instead of a 15000 ms wait, so your VI will stop faster.


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(3,741 Views)
Hi evdo,

'tst' is right. The "Radio Buttons" control from the "Boolean" palette is basically an Enum. You can add or remove elements as you want and only one element can be TRUE at any time (just as the Enum only can have one selected item at any time). Just copy and paste the radio buttons within the frame to add more choices/elements.

I created a small example that takes tst's example a little further. I implemented the four choices and added an Event Structure for better timing. Give it a try and let me know what you think, thanks.



Have fun!

Message Edited by Philip C. on 07-06-2005 10:05 PM

- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
Download All
0 Kudos
Message 3 of 4
(3,713 Views)
Thank you guys both!
 
I tried the quotient and remainder trick, which by the way was a very good hint, although I had to alter the way the inputs are calculated since my procces includes a lot more things and using the i of the while loop would not work for me.
 
This forum is great as always, Smiley Very Happy
0 Kudos
Message 4 of 4
(3,695 Views)