Log in

View Full Version : Labview 2015 joystick help!


team2161
11-01-2015, 00:46
Hello my name is Justin lead programmer for the Walt Whitman RoboCats in Huntington Station, NY. I recently started programming with the new labview software for the RoboRIO. I am so used to unbundling by name for the joystick buttons and axis, i have no idea how to program using an index array. How would i set up a tank drive configuration using the index array and set up a relay to a button on an xbox controller.
Thanks.

Joe Ross
11-01-2015, 00:55
Have you seen this? http://wpilib.screenstepslive.com/s/4485/m/13811/l/292165-labview-porting-guide-2014-to-2015

Greg McKaskle
11-01-2015, 08:19
Additionally, the robot template code contains a simple teleop that indexes the first two axes from a single joystick/game controller and send it to the arcade driving. In most respects, it is the same. The index array is a growable node. You can wire in a number to each row, telling it what element to return, or if left unwired, it will increment based on the previous row.

Greg McKaskle

Jack Gillespie
17-01-2015, 18:52
there are three arrays axis,buttons,POV. What does POV stand for?

Mark McLeod
17-01-2015, 19:55
POV=Point of View
It's often called the hat on a game controller.
It's the one that looks like a cross.

http://www.team358.org/files/programming/ControlSystem2015-2019/images/sm_XBoxControlMapping.jpg (http://www.team358.org/files/programming/ControlSystem2015-2019/images/XBoxControlMapping.jpg)

FrankenmuthK
18-01-2015, 23:35
POV=Point of View
It's often called the hat on a game controller.
It's the one that looks like a cross.

http://www.team358.org/files/programming/ControlSystem2015-2019/images/sm_XBoxControlMapping.jpg (http://www.team358.org/files/programming/ControlSystem2015-2019/images/XBoxControlMapping.jpg)


Do you happen to have a screen shot of what the drive code should look like for the 360?

Greg McKaskle
19-01-2015, 06:56
The drive code for TeleOp takes whichever joystick axes you intend to use, potentially scales or conditions them, and sends them to RobotDrive.

Assuming you have a skid-steer robot such as the KoP, the first decision is whether you want a tank, where left and right axes drive the left and right wheels directly much like a tank, a bobcat, or a bulldozer. Or whether you want two generally orthogonal axes that are mixed to determine the left and right motor speeds. This feels much more like video game joystick driving with left/right inputs steering and forward/back inputs going front and back.

Once you have decided that, choose which axes from the 360 controller that you want to use. It may be useful to use the USB tab of the DS to identify the numbers. Then on the TeleOp diagram, index out those elements from the Axes array. Wire those into the RobotDrive that you choose to use.

Greg McKaskle

Mark McLeod
19-01-2015, 08:41
Here's an example using Axis 1 & 5 to tank drive with an xBox contoller.
http://team358.org/files/programming/ControlSystem2015-2019/labview/xBoxTankDrive.png

marccenter
20-01-2015, 13:18
Mark,

Do you have a similiar picture for the F310 Logitech gamepad controller?

Alan Anderson
20-01-2015, 14:00
Do you have a similiar picture for the F310 Logitech gamepad controller?

The code is the same. The only difference is the number of the axis you want to read. The Driver Station will show you which axis (and button and POV) number responds when you manipulate the gamepad.

Choose the USB tab at the left, and select the gamepad in the list. The axes and buttons will show up to the right of the selected controller.

Mark McLeod
20-01-2015, 14:30
Mark,

Do you have a similiar picture for the F310 Logitech gamepad controller?
A set of game controller mappings are at:
http://www.team358.org/files/programming/ControlSystem2015-2019/#joysticks

The F310 has a couple of optional settings.

tr6scott
21-01-2015, 15:32
A problem I ran into last night, is the xbox controller, has 10 buttons from 0-9, but in the code the button array only has 9 elements from 0-8 . . .

So how do we program control on button9...

Sorry to highjack thread, but this seem a fitting place to ask the question.

Started New Thread, please follow here. http://www.chiefdelphi.com/forums/showpost.php?p=1431672&postcount=1

Charles Ononye
21-01-2015, 21:01
Here you go:

http://i.imgur.com/sV2LMxl.png

In case anyone was wondering, you can use an array to cluster converter to connect to unbundle by name to get your buttons.

Pugsly
05-03-2016, 13:13
Regarding the "Set Output" of the joystick I am trying to light up an indicator using the Launchpad that was included in last years kit and I can't for the life of me figure out how to wire this up in Labview.

So say for instance I want to light a LED on the launchpad Red or Blue depending on what alliance we are on. Anyone have any ideas on how do do that?