Button 9?

We are using an Xbox 360 controller. We are trying to open a solenoid when the left stick is pressed down, close it when the right stick is pressed. The driver station reads Left Stick as button 8, Right Stick as button 9 (buttons start at 0). However, in LabView the joystick button unbundle only goes to button 8, as shown below. Expanding the bundle just shows me more "Button[8]"s, which all read the same value (Left Stick). My question is, how can I get it to read the Right Stick (button 9) input?

button 9.bmp (130 KB)


button 9.bmp (130 KB)

I am a new programmer but I have think I have a solution to your problem. Replace the button cluster with an index array instead and label it with numeric constants you want such as nine. Team 358 has some great examples on what this would look like. http://www.team358.org/files/programming/ControlSystem2015-2019/labview/index.php

Or right click on the node that converts from array to cluster, select the Cluster Sizeā€¦ item, and in the little dialog, enter 12, or however many buttons your controller has. Notice that it defaults to eight and was causing the limit of the buttons.

Index Array has no such limit since its size is determined at runtime and not compile time.

Greg McKaskle

right-click on the Array To Cluster and choose Cluster Size to increase the number of buttons.

It worked! Awesome, thank you!