LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use front panel buttons to select case

How can I use button on the front panel to select the desired case for a case structure. I have 5 front panel buttons and I would like each one of these buttons to select one of potential cases. I have LabView version 7.
0 Kudos
Message 1 of 6
(5,417 Views)
I am sorry, I do not have LabVIEW 7 anymore, but one way to do it is to take your booleans, build an array, convert that to a binary number, and use that to select your case.  Remember to put a wait in the "0" case.  There are plenty of other ways to do this... but this method is simple.  Just make sure that your booleans are NOT latched!  Another way would be to display the selections in a list box and use the double click property to determine which one to run.  There are 100 different ways to skin this cat, not all involving booleans to select.  I have to run home now, but if you do not understand and no one else has posted code, or a picture of the block diagram, I can whip it up at home and shoot you a jpg.

Paul
0 Kudos
Message 2 of 6
(5,410 Views)

Paul,

   Not sure what you mean but if you have an example that would be great.

0 Kudos
Message 3 of 6
(5,398 Views)
Hi Bronx68,

I think he meant something like the attachment Smiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(5,363 Views)
If you need to make the selection exclusive, you could also use the modified slide control made ot look like radio button. The control is in examples\general\controls\booleans.llb.
0 Kudos
Message 5 of 6
(5,353 Views)
Ok, I have enclosed a jpg of the block diagram, although with the cases, you can not see everything... Hopefully it will get you started... I have attached the example saved as LabVIEW 8.0... Maybe someone can save it as LabVIEW 7.0 for you.
Good Luck, Paul

Paul
Download All
0 Kudos
Message 6 of 6
(5,351 Views)