LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI for a set of button which work as interlinked push buttons

Hi,

 

Wanted to built a vi behind two buttons (and more) which should work as exclusive or. In other word, when button A pressed the corresponding LED should be ON and when the button B pressed the corresponding LED should be ON and meanwhile the button A and LED A should be off (the same for press button A after B). Attached a sample vi (working not properly Smiley Indifferent). used case structure but beilieve the event structure should work as well !?

All helps appreciated.

 

David

 

0 Kudos
Message 1 of 15
(2,747 Views)

Hi david,

Try this. There may be better ways to do this, which I hope experts on this forum will tell you.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 2 of 15
(2,735 Views)

Hi David,

 

Before you proceed with Event structure, here are some points about your vi

 

1. Do not use property node where local variable is enough( also unterstand the difference between "value" and "value signaling" property)

2. Do not use local variable where control/ indicator terminal  is enough to wire

3. No need of using "First call?" function in your code. you could also inialize the controls/indicators out side the while loop.

 

to implement XOR operation use "Exclusive Or " function from boolean palatte, if you want to increase the controls then go with 

"compound arithmatic" function and change the mode to XOR.

 

pls see the attached image for more details..

0 Kudos
Message 3 of 15
(2,722 Views)

Try looking at the Radio Button. 

It allows one button at a time to be active. Pressing one button clears the other buttons.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
0 Kudos
Message 4 of 15
(2,699 Views)

Here is a sample of vi.

0 Kudos
Message 5 of 15
(2,625 Views)

Hi David,

 

Find attached an example of how to implement what you are after. I have also shown how to bundle the information into a cluster as you asked in your e-mail. 

 

In my example i have bundled the controls into a cluster. If you do not want the appearance of a cluster then you can use a cluster from the Classic palette and use the paintbrush to paint it transparent. You then will not see the cluster container.

 

If you have any questions just ask.

 

Rgs,

 

Lucither

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
Message 6 of 15
(2,601 Views)

Hi David,

 

Well that was a ball ache trying to convert to 8.2, kept on crashing as had a bug when converting if there is an event structure.

 

Anyway, managed to do it

 

Rgs,

 

Lucither

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
Message 7 of 15
(2,590 Views)

Hi David,

 

Just a quick one. I forgot to Disable the led's on the previous version. Causes the event structure to be entered if a LED pressed. Use this version instead.

 

Rgs,

 

Lucither

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
Message 8 of 15
(2,581 Views)

Just see your new reply now.

 

A Kudo for that pain!

0 Kudos
Message 9 of 15
(2,577 Views)

The fixed version with LED is for LV 8.6 (I have 8.5):smileysad:

0 Kudos
Message 10 of 15
(2,571 Views)