03-16-2011 08:42 AM
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.
Solved! Go to Solution.
03-16-2011 08:56 AM
Hi Zilla,
here you go. This is a possible way to do it 😉
03-16-2011 08:57 AM
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
03-16-2011 08:59 AM - edited 03-16-2011 09:01 AM
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 ;).
03-16-2011 09:08 AM - edited 03-16-2011 09:13 AM
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
03-16-2011 09:10 AM - edited 03-16-2011 09:10 AM
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
03-17-2011 06:42 AM
Thanks everybody for quick replys! Nice to see a Event Structure solution as well as one with shift registers.
Cheers!