Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   New Button (http://www.chiefdelphi.com/forums/showthread.php?t=143920)

ICE_Bear 15-02-2016 18:24

New Button
 
How do you program the POV on the Logitech joystick to move one motor using lab view?

Alan Anderson 15-02-2016 21:40

Re: New Button
 
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.


All times are GMT -5. The time now is 07:45.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi