OCCRA
Go to Post The solution to that "problem" is obvious: practice driving. - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-07-2012, 08:58 PM
2185Bilal's Avatar
2185Bilal 2185Bilal is offline
Driver, Ld. Programmer, Electrical
AKA: Bilal Majeed
FRC #2185 (Ramazoidz)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Toronto, Canada
Posts: 110
2185Bilal will become famous soon enough
Send a message via Skype™ to 2185Bilal
Post 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
__________________
RAMAZOIDZ

2009 Toronto West Regional - Regional Winners
2009 Waterloo Regional - Regional Winners
Reply With Quote
  #2   Spotlight this post!  
Unread 05-07-2012, 11:19 PM
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 146
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: F310 Controller Axis Mapping

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
Reply With Quote
  #3   Spotlight this post!  
Unread 05-08-2012, 06:33 AM
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 7,835
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Send a message via AIM to Alan Anderson
Re: F310 Controller Axis Mapping

I think the other thread you posted in answered this already.
Reply With Quote
  #4   Spotlight this post!  
Unread 05-08-2012, 03:56 PM
2185Bilal's Avatar
2185Bilal 2185Bilal is offline
Driver, Ld. Programmer, Electrical
AKA: Bilal Majeed
FRC #2185 (Ramazoidz)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Toronto, Canada
Posts: 110
2185Bilal will become famous soon enough
Send a message via Skype™ to 2185Bilal
Re: F310 Controller Axis Mapping

Quote:
Originally Posted by Alan Anderson View Post
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
__________________
RAMAZOIDZ

2009 Toronto West Regional - Regional Winners
2009 Waterloo Regional - Regional Winners
Reply With Quote
  #5   Spotlight this post!  
Unread 05-08-2012, 06:11 PM
2185Bilal's Avatar
2185Bilal 2185Bilal is offline
Driver, Ld. Programmer, Electrical
AKA: Bilal Majeed
FRC #2185 (Ramazoidz)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Toronto, Canada
Posts: 110
2185Bilal will become famous soon enough
Send a message via Skype™ to 2185Bilal
Post Re: F310 Controller Axis Mapping

Quote:
Originally Posted by Levansic View Post
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.
Could u expand on that
__________________
RAMAZOIDZ

2009 Toronto West Regional - Regional Winners
2009 Waterloo Regional - Regional Winners
Reply With Quote
  #6   Spotlight this post!  
Unread 05-09-2012, 08:51 PM
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 434
DominickC is an unknown quantity at this point
Re: F310 Controller Axis Mapping

Happy birthday.
Attached Files
File Type: vi Joystick.vi (21.0 KB, 21 views)
Reply With Quote
  #7   Spotlight this post!  
Unread 05-11-2012, 08:36 AM
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 146
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: F310 Controller Axis Mapping

Quote:
Originally Posted by 2185Bilal View Post
Could u expand on that
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
Reply With Quote
  #8   Spotlight this post!  
Unread 05-11-2012, 12:03 PM
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 7,835
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Send a message via AIM to Alan Anderson
Re: F310 Controller Axis Mapping

Quote:
Originally Posted by Levansic View Post
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.
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.
Reply With Quote
  #9   Spotlight this post!  
Unread 05-11-2012, 08:48 PM
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
>e, 7h3 5up3rn47ur4l
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: College Student
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,091
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: F310 Controller Axis Mapping

Quote:
Originally Posted by Alan Anderson View Post
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?
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 .
__________________
rambots.net
Promo video (played in our pit in St. Louis)
Reply With Quote
  #10   Spotlight this post!  
Unread 05-12-2012, 12:22 AM
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 146
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: F310 Controller Axis Mapping

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."

Last edited by Levansic : 05-12-2012 at 01:35 AM.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:51 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi