Log in

View Full Version : Program a dead zone?


ironmare
31-01-2015, 13:30
Please help. We are using an xbox 360 usb joystick with mecanum wheels. After deploying our program (not touching the thumbstick) the wheels are spinning slowly on their own. We flick the left thumbstick and can get some wheels to stop every so often. We need help in seeing some LabView code to create a dead zone with a 0.1 so that it disregards the off center joystick input. Thank you!

Mark McLeod
31-01-2015, 14:11
Here is one example.
A drawback to this one is that it will start motor power at the deadband value. Not necessarily an issue with drive motors that don't begin moving before .3, but more of an issue with mechanism motors that have much lower resistance to movement.
It can be rescaled with a little more trouble.

P.S.
Here is an example of rescaling.

Alan Anderson
31-01-2015, 15:35
This is the block diagram of the Deadband.vi we use. It subtracts the deadband size from the input value. If the result is less than zero it keeps it at zero. Other code can use the "In Deadband?" output to do things like maintain heading or activate a brake.

adciv
31-01-2015, 15:53
Try calibrating your motor controllers.

pastelpony
01-02-2015, 00:56
We had the same issue. In the end, we found that calibrating the actual Xbox 360 controller led to no sudden jerks or movement of our mecanums. You might also want to calibrate your motor controllers.

Sohaib
01-02-2015, 20:53
If you disconnect your controller, and reconnect it, it should be centered. I don't know about the Xbox controller, but with the F310s this seems to fix the issue.

Going to advocate calibrating your motor controllers.

If you're using the Talon SR/SRX or Victor SP, speed controllers, they have a built in "deadband" of 4%. The Victor 888 has one of 5.4% and the Jaguar of 5.5%.

ironmare
02-02-2015, 13:50
Thank you all for your help, re-coding the programming with the dead zone coding using your suggestions above worked!

Skyehawk
06-02-2015, 14:41
This is the block diagram of the Deadband.vi we use. It subtracts the deadband size from the input value. If the result is less than zero it keeps it at zero. Other code can use the "In Deadband?" output to do things like maintain heading or activate a brake.

quick question: How do you export labview code so you can just drop it in?

Mark McLeod
06-02-2015, 14:49
Highlight what you want to copy.
Choose
Edit -> Create VI Snippet From Selection
A Save dialog appears to save it as a png.