02-17-2010 07:19 AM
So yesterday we encountered a problem with our tank drive program. Last year we used only 2 motors for driving, this year we are using 4 motors instead. In the default code i replaced the arcade drive with tank drive and added the close vi in finish and all of the other vis to make tank drive work. Everything worked fine on our past year robot with 2 motors but when i replaced the open 2 motor vi in the begin vi with an open 4 motor vi we had some issues. The robot drives with the open 4 motor but only 2 of the motors work, one from each side. We have a victor for each motor but only 2 of the victors are receiving signal. The robot is driving but only 2 of the motors are active we would like to get all of the motors working. If anyone has any ideas on how to fix this issue please post. Thanks
P.S One of our past year programmers thinks that the problem itself might be with the tank drive vi, he thinks that tank drive only calls for 2 motors in the vi and doesnt call for 4 motors. If someone can confirm this it would be a world of help also.
02-17-2010 07:48 AM
I don't have access to the FRC code right now, but I'm pretty sure that both the Arcade and Tank drive are set up to use only two motors. You can verify this yourself by opening those VIs (double-click on them in the block diagram) and looking at the code inside them. You might want to use Open 2 Motors twice, set up two Tank drives, and send them identical input.
02-17-2010 09:19 AM
The Tank Drive does support 4 motors.
Inside the VI there is support for Left Front, Right Front, Left Rear and Right Rear motors.
Are 4 motors being pass into the Motors.vi from the Open VI to select the True cases for the Front Left and Front Right?
If not then it will only control 2 motors.
The size of the Motors[] Array must = 4.
After this then it must be a wiring problem.
02-17-2010 09:52 AM
Open 2 motors only supports 2 motors (or 4 if you use a PWM splitter cable). However, there is a open 4 motors VI, which supports 4 motors as Omar said. It works fine in my experience.
02-17-2010 01:31 PM
I might do it the way nathand said because for some strange reason only 2 of the motors work and the others dont, and we are using victors. It might also be the victors that are causing the problem.