LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt user to select radio button

Solved!
Go to solution

Hello, LabView Fans

The vi attached is kind of working like I want it to but it just seems to be more complicated than necessary. I’m using a radio button setup with no selection and want to force the user to make a selection. If the selection is not made; then prompt the user to make a selection. I’d like to have the vi continue until a selection is made and the OK button pressed, but keep getting into a run on situation.

 

Thanks for any critique / solutions to this small problem.

0 Kudos
Message 1 of 7
(4,427 Views)
Solution
Accepted by topic author zilla

Hi Zilla,

 

here you go.  This is a possible way to do it 😉

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
Message 2 of 7
(4,418 Views)

Hi zilla,

you show the dialog, but you stop the loop also if no value is selected. There is no need of the second while loop around the Msg PopUp function.

 

Ii would use an event structure to get two value change events. One to get the selection of the RadioButton and the other to get the stop event. If the stop event is selected, then i would check if the radiobutton has a selection. If it has, then stop the loop, if not show the dialog and wait for another event. It would look like in the attached image.

 

Hope it helps.

Mike

0 Kudos
Message 3 of 7
(4,415 Views)

Hi Mike,

 

just to give you some feedback.  There is no need to use those two shift registers, is there?  Or am I just to dumb ;).  You're making it more complicated then needed ;).  

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 4 of 7
(4,410 Views)

Hi Zilla,

Hope this attached vi willl work you. I am using Radio Buttons with three selection and the third selection is hidden.

 

Regards

GK

 

 

Message 5 of 7
(4,403 Views)

Hi Bjorn,

the way i did it, i need the two shift registers. The first holds the selected value, because the stop event is called after the selection, so i have to buffer the value. The boolean is needed to avoid a check of the selected value every time. If the radio button "value change event" is called, then i set the boolean variable to true. If stop is selected and the buffered value is true, then everything is fine, otherwise the message will be displayed.

 

Mike

0 Kudos
Message 6 of 7
(4,400 Views)

Thanks everybody for quick replys! Nice to see a Event Structure solution as well as one with shift registers.

 

Cheers!

0 Kudos
Message 7 of 7
(4,354 Views)