06-02-2014 12:12 AM
Hi, what I would like to do is read input from a usb gamepad and change a Color box and change text infront of the box. However, the controller outputs a t/f for each button.
(Button 1,2,3,4 will change color, and 5,6,7,8 will determine what text will display over the color box( 4 diff text displays))
My problem is how do I say "Def. If neither 1,2,3,4 are presses-black, If button 1 is pressed-blue, If button 2 is pressed-green...etc..."
I have tried a case structure, but they can only say T/F once, which would be fine but the color box can only accept one input... I have attached a picture of what I have that wont work, I need an alternative...
Thank you,
Brent S.
06-02-2014 02:44 AM
You can build array of the buttons and then give it to "search 1 d array" and then use a single case structure.
06-02-2014 02:49 AM
Like this
06-02-2014 07:51 AM
Since your data is already a cluster you can use the Cluster to Array, then use the seach 1D array for a True eliminating the need for the build array.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord