F310 Controller Axis Mapping

Hello
Team 2185 was considering on using a F310 controller for the next season
So i would like to know what button corresponds to which button (eg. Button 1 = Button X) and what is the axis maps

You could always make a small VI to show which button is registered, when you push a button on the controller. It isn’t hard. Just unbundle the joystick buttons, and wire them to a bunch of LED indicators on the front panel. Just make sure your Joystick read and LED display are in one big while loop.

Just be aware that the mapping you get this year, may not be valid next year. That happened to our team before. This is another reason to go through the exercise of building a joystick diagnostic VI, for your team’s utility belt.

–Len

I think the other thread you posted in answered this already.

Yeah, but i wanted to know how to setup all the buttons and axises

Could u expand on that

Happy birthday.

Joystick.vi (21 KB)


Joystick.vi (21 KB)

There is a new release of the WPI libraries every year, and some times things change in subtle ways. We had one particular joystick with a rotation axis. The first year we used it, that axis mapped to axis 3, and the next year, it mapped to axis 6. We didn’t know this changed, and couldn’t figure out why things weren’t working, until we made a diagnostic program.

Dominick donated code, but you should really go through the exercise of making the same (or similar) program on your own. This will give you more familiarity with LabView, and more importantly experience with getting broken programs working. It won’t kill you, and will only make your skill set stronger. Practice makes perfect is very true with any programming environment, language, framework or system.

– Len

The joystick functions just pass the axis data. They don’t do any mapping of their own. Does your joystick have a switch to change between DirectInput and XInput modes that might have been moved between seasons? Does it require a special driver?

In LabVIEW, making the “diagnostic program” to show you how the controller is mapped is simple. Just find the existing Joystick Get function in the Teleop vi, right-click its axes output terminal, and choose “create -> indicator” from the menu. Do the same for the buttons output terminal. Then you can run the Robot Main vi and watch the Teleop front panel to see all the axes and buttons as you manipulate the controller. You will of course have to connect the Driver Station in order for it to pass the joystick data to the robot program, and you will have to enable the robot in order for Teleop to run.

We took a soldering iron to that switch after having multiple problems with it this year (only once at competition, but that was enough), It doesn’t move anymore :smiley: .

Went back to check notes, and our problem had to do with a driver station data mismatch during the 2011 build season. Most likely involved using the 2011 driver station with the 2010 libraries, or vice-versa. A new-to-LabView student on our team installed LabView, and missed some things.

Essentially, our joystick data didn’t match on each end of sending and receiving, but still partially overlapped. The data cluster gets flattened to a string by the driver station, and then reconstituted at the other end. The location within the string was close enough that the two primary axes matched, but tertiary axes were shifted. Updating all of the libraries and utilities when mid-season updates were released, fixed everything.

We also had differences caused by changing the joystick driver that Windows used for various input devices. The default driver worked, but button or axis mapping changed when we installed the Logitech driver. None of this is a big deal, unless you have to do an emergency driver station swap when a hard drive dies, and the replacement laptop doesn’t have the same set of joystick drivers. Ask me how I know this.

Regardless, a joystick diagnostic program is a handy tool. Especially when a driver says “I want to use this button to do X, Instead of this one that I can’t find without looking at the joystick.”