How do you program joystick buttons in LabVIEW?

Hi guys,
How do you program joystick buttons in LabVIEW, or program anything with the joystick for that matter? I kinda figured out how the drive VI and joystick get axis VI work but I’m lost on how to use the joystick get VI to do anything else. I’m totally new to LabVIEW so any help would be appreciated.

here’s a simple program i wrote to output the data from my USB COMBATSTICH 568

it just displays the outputs, but it should help you get started…

the data is oupput as clusters, that you can unbundle, and use the data from…


cool joystick prog (31.3 KB)

cool joystick prog (31.3 KB)

Are we talking about getting it off the DS, or off a joystick plugged into the computer?

If the second, then ZInventor’s VI should work, if you’re looking for help for this year’s control system, then see the attached. Joystick Get outputs 2 bundles, one with 12 booleans (for the buttons), the other with 6 doubles (for the axises (I’ve never seen more than 3 though…))



I don’t have joystick Get function in my palette , what should I do please ?

To get it, just do like on this image:

This is a forum for the FIRST Robotics competition, which has it’s own LabVIEW library. The FIRST Library will not do what you want. I recommend asking at the NI Community forums for a general answer.

Thank you :slight_smile: ! I already have looked in the Net about this problem and I found that I must install WPI Robotics Library , but I coudn’t find a link or a site to download , Please can you give me a link ?? thank you very much brother :slight_smile:

Unless you’re going to be controlling a National Instruments cRIO-FRC with associated I/O hardware and a networked Driver Station, the WPI library won’t do anything helpful for you. For reading joysticks, what you probably want is in the Connectivity -> Input Device function palette.

Look for Connectivity->Input Devices

There are joystick & keyboard functions there. I have been using them to explore the SpaceMouse and the Logitech GamePad interfaces.

But, do you have the FRC version of Labview?

Wire an “unbundle by name” to the “buttons” output on the joystick “Get” command. The buttons generated will be treated as booleans and can be used in tandem with case structures, subVIs, etc to complete an operation with a button press.

I’m currently stuck on programming the joysticks on my frc team’s Labview 2019 code. Can someone please HLP!

What is the problem you currently having?

I just can’t seem to get the buttons to respond to the joystick control

Can you post an image of your code?

A: don’t read the Joystick in multiple times, just pipe the result of the existing Get Values to where you need it.

B: Can’t see the bottom of the screen, but the use in the middle on the right is reading the index 2 button, and doing nothing with it.

C: Don’t reset the compressor refnum. Just read the DevRef and read the state (stop).

Hope this helps, I’ll PM you my phone number if you want to text/call for more help.

Thanks, but can you send me an image if possible?


Thank you!