LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display the corresponding key number?

Solved!
Go to solution

I need to make a display that can show which button I am pressing. Meaning there are 10 buttons and the display then has to show if it is button 1,2,3,4,5,6,7,8,9 or 10 I have pressed down

 

Any suggestions?

0 Kudos
Message 1 of 6
(2,728 Views)

Your best bet is to make an array of these buttons. Place an event structure on this array, such that everytime its value changes (by click of one of the buttons) you can read in the new value, and index the array to find which button has changed. Display that number.

 

Does this help?

Prashanth N
National Instruments
0 Kudos
Message 2 of 6
(2,724 Views)
0 Kudos
Message 3 of 6
(2,720 Views)
Solution
Accepted by topic author King123

That's great,

All you need to do now is:

1. Add an event on the event structure to point to "value change" of this array.

2. Compare old and new values to find which element has changed.

3. Increment index since it starts with 0.

 

I wrote a VI for you 🙂

 

 

Prashanth N
National Instruments
0 Kudos
Message 4 of 6
(2,710 Views)

That is so great. It is my first time using the program so have spend a lot of time on the same problem. I will try to analyze your solution 🙂

 

Thank you for your help

0 Kudos
Message 5 of 6
(2,707 Views)

At your service!

Prashanth N
National Instruments
0 Kudos
Message 6 of 6
(2,705 Views)