LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Latching boolean buttons (similar to control array in VB)

Dear All
 
The attachments should give you a good idea of what I want to do - basically make "Big radio buttons" (as we are using a touch screen). The buttons should latch, but only one button can be latched at any time
 
Unfortunately there's this restriction on using local variables and latched booleans
 
I was surprised that I didn't find an example in the forums
 
Anyone got any ideas?
 
Many thanks
 
Julian
Download All
0 Kudos
Message 1 of 7
(3,814 Views)
Maybe you can tell us what kind of latch action you want? Latch action buttons are true until read once by the code. How long does it take for the code to read the button?
 
Please explain a bit better how the UI should work and we will find a better solution.
 
Your code is also full of odd constructs. The sequence frame on the left is not guranteed to execute before the while loop because there is no data dependency. "Index array" can be resized, so you don't need 6 individual nodes. A boolean "=TRUE" comparison is equivalent to a wire, just delete it. 😉
 
And PLEASE!!!, leave the diagram background in white. Currently, you are camouflaging all booean wires, making everything more difficult to see!
 
We cannot run your VI, because a subVI is missing.
 
 

Message Edited by altenbach on 03-20-2007 09:24 AM

0 Kudos
Message 2 of 7
(3,806 Views)
Frankly, I don't understand your code in the FOR loop. What is it supposed to do, exacly???
 
I also think that LabVIEW 7.1 already had the radiobutton control (not 100% sure, though). It acts like a cluster of booleans where only zero or one can be true at any given time. You would simply place all your buttons in it.
 
NO code needed! 🙂
 

Message Edited by altenbach on 03-20-2007 09:40 AM

0 Kudos
Message 3 of 7
(3,800 Views)
Good candidate for Rube Goldberg Code.Smiley Very Happy
 
Use the radio button control as Altenbach suggested.  If you want the pretty buttons, see the attached vi.  I have added the NI radio button control at the bottom of the front panel, but it isn't wired to anything.  Just wanted to show it was there.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 7
(3,791 Views)

Sorry, sorry sorry! All criticisms completely justified! It was late, I lost the text I carefully typed the first time because of a forum error, and I was rushing 'cause I didn't want to miss my date...You should have seen her too, but I digress... 😉

I attached the VI because I thought the front panel might be useful; I knew the wiring was rubbish and I should have deleted it all.

TBob, thanks for the example - I can see what I need to do now and will post the finished item when I've done it - then you'll be able to see what I wanted to do, even though I couldn't explain it.

A couple of explanations:
- The button colours are gaudy because they correspond to label colours, not because I think they look cool...
- Radio buttons would be ideal but they're too small for a touch screen
- I prefer the light grey background because I find it easier on the eye for all-day use. In fact I'd prefer a black background...maybe I spent too much time working with wire-frame CAD in the 90s!

Thanks All

Julian

 

0 Kudos
Message 5 of 7
(3,764 Views)
You should have paid better attention to what christian and tbob said. The radio button control can be edited and you can use your big big buttons with it.
Message 6 of 7
(3,752 Views)

Oh. It was that simple... I've really not had a good week, have I?!  I will ensure my brain is in gear before writing my next post.

Thanks to all concerned!

Julian *feeling a bit silly*

0 Kudos
Message 7 of 7
(3,730 Views)