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

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.

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

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.

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?

Start->Settings->Control Panel->Game Controllers

Mark and Joe, thanks a million

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

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.