Go to Post *gasp* Robotics? bad for your health? I refuse to accept that as an answer. - Kiwi_queen [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 16-06-2010, 23:29
rsisk's Avatar
rsisk rsisk is offline
The GURU Channel
AKA: Richard Sisk
FRC #2493 (Robokong)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Riverside, CA
Posts: 2,749
rsisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond repute
Send a message via MSN to rsisk
Reset joysticks at startup

Is there a way to set the joysticks to 0,0 in Labview when the program starts?

For some reason, it looks like the joysticks have an x value of -.5 and a y value of .5 when the program starts. Moving the joystick all the way in a particular direction return a 1 or -1 as expected then it goes back to -.5,.5 when I release the joystick.

Any help is appreciated.

Thanks
__________________
Quote:
The views expressed are mine and should not be construed to represent the views of anyone else.
Reply With Quote
  #2   Spotlight this post!  
Unread 17-06-2010, 10:26
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Reset joysticks at startup

USB joysticks are assumed centered when they are first plugged into the PC (e.g., Classmate). Windows takes whatever they read at startup and makes that 0,0. So if the joystick were lying on it's side, depressing the stick one way, when it was first plugged into the Classmate, then you'll see an incorrect offset like that.

The joystick really needs to be fixed at the source, and quite possibly replaced. I'd test with multiple joysticks first to make sure it's a problem with a broken joystick. If it is broken you can try purposely holding the joystick off center in the opposite direction when you first plug it in just to see if that's the source of the problem.

LabVIEW on the cRIO side can only remap the joystick, for instance, add .5/subtract .5 then stretch the ranges to fit, but that'd give a driver very unbalanced stick response and it would lose half your typical joystick range on one side. The data you really need just isn't being sent from the Classmate.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 17-06-2010 at 11:11.
Reply With Quote
  #3   Spotlight this post!  
Unread 17-06-2010, 10:50
rsisk's Avatar
rsisk rsisk is offline
The GURU Channel
AKA: Richard Sisk
FRC #2493 (Robokong)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Riverside, CA
Posts: 2,749
rsisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond repute
Send a message via MSN to rsisk
Re: Reset joysticks at startup

Hmm, that's not good to hear, that means this is the second joystick that has gone bad since January.

The joystick worked a month ago, now it doesn't and has been sitting in my garage in between. Could dust in the joystick cause a problem like this?

When you say it needs to be fixed at the source, do you mean it could be a physical problem with the joystick? Can it be disassembled to look for problems?

Thanks for your help Mark
__________________
Quote:
The views expressed are mine and should not be construed to represent the views of anyone else.
Reply With Quote
  #4   Spotlight this post!  
Unread 17-06-2010, 11:16
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Reset joysticks at startup

I haven't disassembled one of the kit joysticks myself, so I don't know what mechanical problems dust and moisture could cause. I suppose long-term storing a joystick all bent over, like it might be if it's thrown into a crate with other junk, might cause a mechanical problem.
If you already had another joystick go bad, then you've got spares to disassemble and investigate.

If the centered point is exactly -.5,.5 that's terribly suspicious. I wouldn't think a mechanical problem would be so exact. I'd lean towards an electrical issue being the cause.

I'd look at the joystick output on the Windows Game Controllers utility to be sure of what is being received from the joystick.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 17-06-2010 at 11:43.
Reply With Quote
  #5   Spotlight this post!  
Unread 17-06-2010, 11:30
rsisk's Avatar
rsisk rsisk is offline
The GURU Channel
AKA: Richard Sisk
FRC #2493 (Robokong)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Riverside, CA
Posts: 2,749
rsisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond repute
Send a message via MSN to rsisk
Re: Reset joysticks at startup

I used -.5,.5 for brevity, its more like -.530674,.530674, but the X & Y coordinates are almost always the same number.

I already ordered a replacement from Best Buy for $25, so it looks like I'll get to go CSI on the victim.

Step 1. Windows Game Controllers utility

Question 1: I googled Windows Game Controller utility and came up with nothing. Can you point me in the right direction to find it?
__________________
Quote:
The views expressed are mine and should not be construed to represent the views of anyone else.

Last edited by rsisk : 17-06-2010 at 11:34.
Reply With Quote
  #6   Spotlight this post!  
Unread 17-06-2010, 11:39
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Reset joysticks at startup

Start->Settings->Control Panel->Game Controllers
Reply With Quote
  #7   Spotlight this post!  
Unread 17-06-2010, 22:30
rsisk's Avatar
rsisk rsisk is offline
The GURU Channel
AKA: Richard Sisk
FRC #2493 (Robokong)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Riverside, CA
Posts: 2,749
rsisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond repute
Send a message via MSN to rsisk
Re: Reset joysticks at startup

Mark and Joe, thanks a million

Problem solved (and I have a new joystick to boot )

The Game Controller utility in the Control Panel allows me to center and calibrate the joysticks. Both of the failing joysticks were off center. After running the utility and centering the joysticks, they both work like a champ.

I was kind of looking forward to dissecting a joystick, guess that will have to wait.
__________________
Quote:
The views expressed are mine and should not be construed to represent the views of anyone else.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compressor Startup Spiders Pneumatics 7 11-02-2008 15:15
Compressor Startup Spiders Technical Discussion 7 11-02-2008 15:15
Camera won't initialize when reset from RC - reset from OI and Power-up works, krunal Programming 7 15-01-2007 00:13
Startup/Shutdown sounds Jeff Rodriguez Chit-Chat 4 06-06-2004 22:42
AVB joysticks..and other analogue joysticks tml240 Kit & Additional Hardware 6 07-02-2004 12:45


All times are GMT -5. The time now is 22:01.

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