View Full Version : Help with programing Tank Drive in Lab View
zackcool123
18-01-2009, 19:27
I have found the example of the tank drive program, but i am having a hard time figuring out how to make it for 4 motors insted of two. Any help??
JamesByrne
18-01-2009, 19:34
You probably want to do that with hardware and not software because if you are using a gear box or if you are direct driving motors. You would not want to drive 2 motors on one side in revere directions.
If you wanted to do it with hardware it is just as simple as using a pwm splitter. You would plug in each side to pwm 1 and 2 then you would plug those into 4 speed controllers.
Let us know if you want to do it with just software for some reason.
zackcool123
18-01-2009, 19:37
Right now i am just testing the electronics borad
so software would be a better help
but thanks for the sugestion
TotalChaos
18-01-2009, 19:49
As far as I know the simplest way would be to replace the "Open 2 Motor" function with and "Open 4 Motor function". The function can be found by opening your function palette and going to: WPI Robotics Library > RobotDrive and selecting "Open 4 Motor".
http://img291.imageshack.us/img291/5162/help1ed1.gif
And then obviously you would have to add constants for the other two motors on the Open 4 Motor function and make sure you have the right PWM's to the right slots. (Pressing ctrl+h to bring up context help and hovering over the Open 4 Motor function should help you figure out what goes where)
Hope that helps!
- Austin
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.