FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

4 Motor Tank Drive Problem

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.

0 Kudos
Message 1 of 5
(4,622 Views)

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.

0 Kudos
Message 2 of 5
(3,210 Views)

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.

Omar
0 Kudos
Message 3 of 5
(3,210 Views)

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.

0 Kudos
Message 4 of 5
(3,210 Views)

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.

0 Kudos
Message 5 of 5
(3,210 Views)