Go to Post You earn what you work for. - Akash Rastogi [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-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 28-01-2013, 20:33
BPtigers BPtigers is offline
Registered User
FRC #4663 (i8sumpi)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Minnesota
Posts: 25
BPtigers is an unknown quantity at this point
Classmate USB Question?

On the frc classmate which USB plug in is 1 2 3, because on Saturday our drive train was working great, and today the joysticks were controlling the opposite sides of the robot? I don't know if the PWMs got flipped or what or if the order in which the joysticks are plugged in matters? Thanks.
__________________
Ben
Reply With Quote
  #2   Spotlight this post!  
Unread 28-01-2013, 20:47
Cecil's Avatar
Cecil Cecil is offline
Registered User
AKA: Alex Hummel
FRC #2010 (Lightning Bots)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Champion
Posts: 343
Cecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to behold
Re: Classmate USB Question?

If you look in the Setup tab of the driver station, you can see which joystick is connected to which USB port. By clicking a button on one of the joysticks, the name of that particular one will flash blue. If it is in the wrong order, simply click and drag to reorder them how they need to be.
__________________
I'm right 90% of the time, so why worry about the other 3%?
Reply With Quote
  #3   Spotlight this post!  
Unread 28-01-2013, 20:58
BPtigers BPtigers is offline
Registered User
FRC #4663 (i8sumpi)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Minnesota
Posts: 25
BPtigers is an unknown quantity at this point
Re: Classmate USB Question?

So the order in which I plug the joysticks in matters? or is there a solid usb 1 and the computer will identify that if I plug the second joystick in first to usb 2?
__________________
Ben
Reply With Quote
  #4   Spotlight this post!  
Unread 28-01-2013, 21:12
Cecil's Avatar
Cecil Cecil is offline
Registered User
AKA: Alex Hummel
FRC #2010 (Lightning Bots)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Champion
Posts: 343
Cecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to beholdCecil is a splendid one to behold
Re: Classmate USB Question?

It does matter, but if you leave them plugged in when the computer is shut down, rebooted, etc., they could change again. The easiest way I have found is to enable the robot, push one joystick forward, and determine if it is in the correct port. If not, I switch them from the setup tab, and all is good.
__________________
I'm right 90% of the time, so why worry about the other 3%?
Reply With Quote
  #5   Spotlight this post!  
Unread 28-01-2013, 21:59
Tommy F.'s Avatar
Tommy F. Tommy F. is offline
Yeah! Collages!
AKA: 7h0m45
FRC #1985 (Robohawks)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: St. Louis, MO
Posts: 188
Tommy F. is just really niceTommy F. is just really niceTommy F. is just really niceTommy F. is just really nice
Re: Classmate USB Question?

Generally, we use a USB hub, and the joysticks don't get unplugged from it, so our controllers are consistently wired to the same port all the time, unless we swap them around or use a different cRIO (even if it's the same code)

Anyway, it's pretty easy to make sure your joysticks are read in the port that you want them to. Just go to the setup tab of your Driver Station...


Then just click and drag to reorder your joysticks around.


If you need to find our which joystick to put in a port, when you press a button the joystick text will turn blue (as shown above).

So if you're constantly removing your joysticks, I would suggest making sure they're setup right before enabling each time, just to be safe.
__________________

FTC 289, 290 & 291 :: FRC 1985

2013 St. Louis Regional Semi-Finalist (with 3411 and 4330), Industrial Design Award
2013 Queen City Regional Winner (with 379 and 447)

Reply With Quote
  #6   Spotlight this post!  
Unread 29-01-2013, 07:11
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Classmate USB Question?

Unfortunately, USB drivers and APIs don't really support the 1, 2, 3 notion. We tried really hard to make it work that way, but any given USB hub and computer would be different anyway. Notice they aren't labeled on the computer?

The typical usage is that you plug in a mouse, keyboard, printer, etc. But typically one or a small number of each type. They don't care where it is plugged, the app asks for the printer and it works.

When you plug in many of the same device, it should be possible to use the device serial number to identify your joysticks and remember that you use that one for left and that one for right. But the problem is that all the joysticks of the same make and model have the same serial number. Bummer.

So finally, what we did was do a lookup table. If you plug in the joysticks and then start the app, I think you'll find that it enumerates the joysticks the same each time. You can check or change the identity on the Setup tab. I don't think you'll need to change it very often.

Greg McKaskle
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 22:54.

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


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