|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Programming a Victor motor (Logitech Joysticks)
Hello, I have a victor motor and what I want to do is have the trigger on my right joystick spin the motor one direction and the trigger on my left the other. I'm using two joysticks (tank drive). How would I do this using LabVIEW. Thanks in advance!
Allons-y! Last edited by Ganondalf : 09-01-2013 at 19:37. |
|
#2
|
|||||
|
|||||
|
Re: Programming a Victor motor (Logitech Joysticks)
This doesn't have everything wired, but it might give you the idea.
You have to open the motor in Begin.vi, name it, and use both the motor and joystick names in Teleop.vi. |
|
#3
|
|||
|
|||
|
Re: Programming a Victor motor (Logitech Joysticks)
That'll do it! Thanks!
|
|
#4
|
|||
|
|||
|
Re: Programming a Victor motor (Logitech Joysticks)
Make sure that in Begin.vi, you open a reference to both joysticks and store them by name. By default there is only one being opened. Also make sure to open the motor controller and store it with a name.
In TeleOp, retrieve the refnums using the names and run code similar to below. The code uses the select node to choose a value depending on the state of the button, and when it is time to combine the button values, I simply added them, deciding that if both are pressed, don't spin the motor at all. I decided to spin the motors at half speed, so I use 0.5 and -0.5. Greg McKaskle |
|
#5
|
|||
|
|||
|
Re: Programming a Victor motor (Logitech Joysticks)
Thank you so much!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|