03-14-2018 08:22 PM
Hi,
I'm trying to build a system with 100 Boolean true class button. I know it can work by building an array. But it quite hard to program when there are multiple example 100 button.
From my understanding array structure goes this way:
0 0 0
0 0 1 Button A
0 1 0 Button B
0 1 1 Button D
1 0 0 Button C
1 0 1
1 1 0
1 1 1
so, when I press Button D I need to press both Button A and button B in order for D button to be pressed.
Is there any way to program it so that I can press every single button with single function and fully utilize the empty slot of the array structure?
Solved! Go to Solution.
03-14-2018 09:25 PM
I'm afraid you are going to have to explain a bit more about what you are trying to do.
First of all, what is a "100 Boolean true class) button?
03-14-2018 11:44 PM
what is an "empty slot"?
03-15-2018 12:15 AM
Hi,
Ok, example I want to build a tv remote control with 50 button (using Boolean true and false)
I know we can use "build array" function with case structure to build this system, but right know my problem is I need to add more than 100 array input in order to include all the 50 button.
Example:
0 0 0 0 empty slot
0 0 0 1 input 1
0 0 1 0 input 2
0 0 1 1 empty slot
0 1 0 0 input 3
0 1 0 1 empty slot
....
1 0 0 0 0 input 4
....
1 0 0 0 0 0 input 5
....
The empty slot is not use is bcos I don't want to press 2 button at the same time to perform particular function
Hope you can understand my problem. 😄
Thank you.
03-15-2018 12:36 AM
Hope its better to provide info on the kind of application/the scope of your work, LabVIEW'ers can give you an different way to approach the problem, than using too many buttons.
03-15-2018 12:43 AM
You can use a 2D array of buttons (or put all booleans into a cluster container, then use cluster to array for further processing). Assuming only one button can be pressed at any given time, use "search array" to find the index of the value that is true.
It would really help if you could attach a draft of your code. Why do you need a case structure often not even needed)? What is the mechanical action of the buttons?
03-15-2018 02:03 AM
Thank you for the solution and guidance.
I just add another "search array" and my problem solve 😄