Log in

View Full Version : New Button


ICE_Bear
15-02-2016, 18:24
How do you program the POV on the Logitech joystick to move one motor using lab view?

Alan Anderson
15-02-2016, 21:40
The POV value represents the direction the POV control is being pressed, in compass degrees. It'll be -1 with nothing pressed. I think the Logitech will give values in 45 degree increments.

So what you want to do is wire the POV value to the select terminal of a case structure. If you want "up" to move the motor forward, add a case labeled "0" and put the code to run the motor forward in it. If you want "down" to move the motor backward, add a case labeled "180" and put the code to run the motor backward in it. Add a case named "-1", make it the default, and put code to stop the motor in it.

Instead of doing a Motor Set inside each case, it would probably be better to just put motor speed constants in the cases, wiring them all out of the case block to a single Motor Set function.