From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How to move 2 motors at the same time in opposite directions

Hi,

I want to program two seperate motors to move at the same time, but in opposite directions. It's application is a shooter and the two motors are in line 180 degrees. I have one PWM port programmed to move, and the two different jaguars are on a y-splitter to one PWM port. I haven't tested it yet,  but I'm pretty sure that they'll move in the same exact direction. I don't feel too comfortable with switching the reb/black wires on the jaguar, as that can damage it, right? Please help urgently!!

Thanks

0 Kudos
Message 1 of 3
(3,689 Views)

You need to reverse the wires on the motor side of the jaguar, not the input side of the jaguar. If you reverse the wires on the input side, you will let the magic smoke out.

0 Kudos
Message 2 of 3
(2,934 Views)

I would recommend using two pwm ports and doing the direction change in software.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 3 of 3
(2,934 Views)