Motors on the same side of drivetrain moving in opposite directions

A few days ago, I got the drive train moving, which is awesome, but now I have motors on the same side of the drive train moving in opposite directions. This means they are fighting each other and that is a bad thing. Can I find a way to make them go in the same direction?

If you are controlling them with 4 PWM ports, you can do this in code with the invert inputs on the Drive Open 4 Motors VI. This is a picture of context help which you can turn on by clicking the yellow question mark in the upper right or by pressing ctrl + H.

image

If you are controlling the drive system with 2 PWM ports and Y PWM cables, then between the motor controller and one of the drive motors, connect the black wire to red and red to black. It’s OK to do this in this scenario as long as it is between the motor controller and the motor.

If you’re using CAN motor controllers for the drive system, there are invert inputs on their Open VIs as well.

Our practice bot is using 6 motors and I used the motor method seen in the “6 Motor Drivetrain with CAN Talon SRX” thread.

What Jonathan suggested.
Add an Invert for one side’s primary motor after the Motor Open in Begin.

You may also consider an inspection of the wiring.

Assuming that you are using 775s/CIMs/MiniCIMs on the drivetrain, it is possible to reverse the polarity between the motor drive - talonSRX - and the motor. Make sure that all of the hardware devices have the same polarity. This might preclude you from having to “fix it in software”!

I put in the invert functions, but the motors are still fighting each other.

Can you fill us in on information like are you controlling over PWM or CAN and are you using Y PWM cables? What motor controller type are you using? Perhaps post screenshots of your code.

Did you see the motor controller LEDs change depending on the invert?