Go to Post anything that craves Mountain Dew is definitely intelligent enough to be dangerous. - IMDWalrus [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 04-02-2013, 17:50
James H James H is offline
Registered User
FRC #4256
 
Join Date: Feb 2013
Location: United States
Posts: 9
James H is an unknown quantity at this point
2 Joysticks Needed?

This is our second year of FRC, so here's a little background info on what we've done so you guys can pick out if this is our fault or Labview's:

Last year we had 2 joysticks working great with no conflicts
This year we've had 1 joystick working great without conflict

When I set up a second joystick in Begin.vi, we started having problems. The joystick input for the motors got messed up when we only had one of the two joysticks plugged into the laptop. We messed around with our code for a while, but the only solution we found is plugging in the second joystick.

We're using Logitech Attack 3 Joysticks. The TeleOp code is attached

So if this is our fault, anyone have any ideas? If its not, I guess this is just reporting an issue.

Thanks,
Team 4256
Attached Files
File Type: vi Teleop.vi (31.7 KB, 13 views)
File Type: vi Scale Axes.vi (14.4 KB, 12 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 04-02-2013, 20:33
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: 9,113
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
Re: 2 Joysticks Needed?

Quote:
Originally Posted by James H View Post
When I set up a second joystick in Begin.vi, we started having problems. The joystick input for the motors got messed up when we only had one of the two joysticks plugged into the laptop.
Can you give a little more information about the problem? What are you expecting to happen, and what is happening instead?
Reply With Quote
  #3   Spotlight this post!  
Unread 04-02-2013, 20:45
James H James H is offline
Registered User
FRC #4256
 
Join Date: Feb 2013
Location: United States
Posts: 9
James H is an unknown quantity at this point
Re: 2 Joysticks Needed?

Quote:
Originally Posted by Alan Anderson View Post
Can you give a little more information about the problem? What are you expecting to happen, and what is happening instead?
Basically what happened is this:
I tried to run the code on our robot with only 1 joystick plugged into the computer when in Begin.vi we have 2 joysticks set up. When I enabled TeleOp, the input of the joystick was skewed on the x-axis input to about 0.32 when the joystick was centered (where the values should be 0 and 0). When we plugged in the other joystick (so now both joysticks are plugged in) it returns to normal values when at rest. As far as I can tell, it's not an issue with our code and since we are planning to use 2 joysticks shouldn't be a big problem. However, I am wondering if it is an issue we can fix or if anyone else has encountered this.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-02-2013, 22:59
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: 9,113
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
Re: 2 Joysticks Needed?

Is the joystick x axis being nonzero when centered a repeatable phenomenon?

I suspect your joystick was off-center when it was first plugged in. It would have "calibrated" to that point, so it would have been offset from zero. Adding the second joystick could have recalibrated it when the Driver Station rescanned the USB devices.
Reply With Quote
  #5   Spotlight this post!  
Unread 04-02-2013, 23:27
James H James H is offline
Registered User
FRC #4256
 
Join Date: Feb 2013
Location: United States
Posts: 9
James H is an unknown quantity at this point
Re: 2 Joysticks Needed?

Quote:
Originally Posted by Alan Anderson View Post
Is the joystick x axis being nonzero when centered a repeatable phenomenon?

I suspect your joystick was off-center when it was first plugged in. It would have "calibrated" to that point, so it would have been offset from zero. Adding the second joystick could have recalibrated it when the Driver Station rescanned the USB devices.
Nope, tried that. Tried replugging it in, switching joysticks, restarting the driver station, and even calibrating with joy.cpl. It was only fixed once we plugged in the second joystick.
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:55.

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