LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding joystick controls

We are a rookie team and trying to add two motors and use either our second joystick or trigger button to control them to our teleop vi. Joystick 0 runs our chassis motors. We keep getting conflicting directions from videos, Pdf tutorials and even tech support. Guiding us to the best resource would be greatly appreciated.

0 Kudos
Message 1 of 5
(3,592 Views)

Do you have any code you can post so we can see what you're doing?

 

Can you find "Query input devices" on the "Connectivity --> Input device control" palette and post the results of the "Joystick Info" array?

 

Have you looked at the "Basic input demo.vi" example?  Help menu, choose "Find Examples", then browse to "Building user interfaces", then "Acquiring user input", then "keyboard and mouse".

0 Kudos
Message 2 of 5
(3,576 Views)

I agree with Kyle, we really need to see your code (send the VI, not a picture of it -- I can't test the picture against my USB Joystick to see how it performs ...).

 

Depending on the Joystick (say, a $40 Logitech simple gaming joystick), you should be able to get 3 or 4 axis (analog) signals and 6-10 button (boolean) inputs from a single Joystick.  The examples that come with LabVIEW do work ...

 

Bob Schor

0 Kudos
Message 3 of 5
(3,562 Views)

where can I find the basic demo vi?

0 Kudos
Message 4 of 5
(3,551 Views)

I'm guessing you're a FRC team.  You'll have better help for the API you use on the forums at ni.com/frc

 

The examples they're listing are more geared towards general development.

 

Open your driver station and find the joystick in there.  It'll track the buttons you push.  From there, you can use the mapping to pull the values out of the Index Array contained in teleop to get the function you desire

 

0 Kudos
Message 5 of 5
(3,534 Views)