FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Joystick variable input button/dial on the base

On one of our previous robots we would use a button/dial on the base of a joystick to "trim" the signal going to a PWM attached to a motor.

This would stop the motor from trying to move.

We have attached the new hardware to this robot and we still get the motor trying to move.

I can not find any reference to this button/dial on the new joysticks.

The "Joystick, Get Raw" vi shows a data wire with twelve buttons.  The typedef display shows 12 buttons.

I ran a test program and the 11 "buttons" show the on/off state when pressed.

The button/dial does not show any change to button 12.  And, I don't believe that that is a binary button.

Can someone tell me how to use that button/dial?

Thanks

0 Kudos
Message 1 of 6
(7,517 Views)

There are no trimming wheels/buttons on these joysticks. They are nice and advanced this year and calibrate themselves when they turn on. (or I think maybe the cRIO or the driver station actually calibrates them, but I think that they do it themselves). If you still need to trim them for whatever reason, I suggest doing that in programming. And hey, if you are programming in LabVIEW, you can wire up a control on the Front Panel to change that trim that you programmed. Then you can quickly make adjustments while you're programming or setting it for the first time, instead of having to go back to your code and change a constant.

Just remember to keep your joysticks centered when you're turning things on. Because they automatically calibrate the center, if you're leaning on them or pushing them forward/whatever while it's all starting up, when you return them back to the center, the joysticks/the cRIO with think that you moved them off center and your robot will move. Multiple teams have said this.

As for trimming the joysticks within your program, there's two ways to do it depending on what you are doing. If you're using the Get Axis VI, then just add/subtract to the axis that you're getting from that. If you're using the Get VI, you will have to unbundle the Axis output terminal, change the axis that you want to change, (add or subtract), then bundle it back together. I would not recommend using the Get Raw VI, as this is more complicated and you have to scale the values yourself.

Hope that helps!

0 Kudos
Message 2 of 6
(2,721 Views)

The dial is axis 3 on the joysticks.

0 Kudos
Message 3 of 6
(2,721 Views)

Thank you. I see from the two responses that I can use axis 3 as an input for writing my own "trim" code.

0 Kudos
Message 4 of 6
(2,721 Views)

Very helpful, thanks

0 Kudos
Message 5 of 6
(2,721 Views)

Very helpful, thanks

0 Kudos
Message 6 of 6
(2,721 Views)