Dennis Knutson wrote:
> The easiest radio button solution (imho) is a custom control that's included
> with LabVIEW. Go to Examples\General\controls\booleans.llb and open any one
> of the controls in there (i.e. 4 Radio Buttons.ctl). These controls are modified
> slide controls and are very simple to use. There is no extra code required
> for button management. If you need more than 5 buttons, you'll need to edit
> the control but if I remember right, there was detailed instructions for
> doing this in the info-labview archives.
>
> "cka"
wrote:
> >>Henrik Skupin wrote:>>Hi group,>>I've a little problem
> by creating a Group of radiobuttons on>a panel.>Just one button should be
> selected the others not. What is the Way>to>get this running? I just tried
> to use an attribute node but i can't find>an>entry for this problem.>>Is
> anybody there who can help me??>>Thnx>Henrik>>>Radio buttons are not as big
> a deal as they seem to be at first glance, you>just need to map your logic
> as you go. I have not downloaded the NI solution>since it appears to be
> a huge solution to a small problem. I've implemented>radio buttons in dozens
> of different ways (up to a 16X16 switching matrix>where columns are radio
> but rows non-exclusive), and never had to rely on>a 20M file from NI to do
> it.>>It is easiest to group your buttons either as an array (no independant
> labeling>on the buttons) or a cluster (each button can carry it's own label).
> One>approach would be to use a shift register to check status each time
> through>the loop (current aggregate = previous aggregate?) and if anything
> has changed>find the 'new' true, set all to false, and then reset the 'new'
> true back>to true. There are numerous ways to do it, not all relying on
> shift registers>(not all relying on front panel grouping). The one constant
> is that you>will have to rely on using locals (either current LV local or
> older LV2 style>globals, a subvi with a shift register).>>Things to keep
> in mind are race conditions (this one can bite you if you're>not real careful;
> your buttons will reset themselves to the previous condition>rather than
> updating to the desired new condition) and whether or not it>is acceptable
> to have NO BUTON selected. If NO BUTTON is not acceptable,>then you need
> to also remember in your logic what the previous condition>was, and return
> to that if the user inadvertantly clicks on the currently>selected button
> (setting it to false while not setting anything else true).>>Bottom line:
> speed a little time with the logic and it will become clear>(if/then/else
> sort of considerations).>>hth
Hi Dennis,
thnx for this easy way to implement such buttons..i will remember these directories
!! 😉
Ciao
Henrik