Which motors are PWM 1, 2, 3, 4?

When programming the code, it says that specific motors are for PWM 1, 2, 3, and 4. When we tested our electronics on a test board, we knew which motors were for PWM 1, 2, 3, and 4, but now we already have our motors mounted on the robot, and don’t know which Jaguars to plug into PWM ports 1, 2, 3, and 4 on the digital sidecar. HELP!

You have several options…

  1. Look at your jaguars. What motor are they connected to? OK. You’ve identified the motor. Check your code. What PWM port should this be? Trace your PWM cable from the Jaguar to the sidecar and plug into the correct port.

  2. Change your code so that turning on the specific PWM turns on the correct motor.

No need to panic.

We chose Mecanum drive on our code, we didn’t code each specific motor.

Look at your begin.VI code. You have the option to choose which port each motor should be in.

Luckily it’s still pretty simple.

In the code, your programmer had to pass (I’m not our teams programmer, but its something along these lines) either Victor/Jaguar objects, or integers representing PWM ports. For the Mecanum drive class, these will correspond to left motor 1, left motor 2, right motor 1, right motor 2, or something along these lines.

If you find the order that you list the inputs, you can ascertain which PWM should control what motor.

If you want to brute force it, you can always randomly swap PWM’s until all the wheels are working correctly. With 4 wheels, there aren’t very many combinations of PWM’s you can have. Move around PWM’s until pushing forward on the joy moves them all forward, back moves back, turns are correct, and strafing is proper.

Does it say “Front Right” or “Back Left” or something? (I don’t have the programming laptop with me right now).

Yes, the constructor for the mecanum drive class specifies the order of inputs and which motor they correspond to.

Okay, thanks a ton! I’ll look at it when I get to tomorrow.

Yes. The RobotDrive4Motor.VI has 4 inputs on the left side of the subVI. Right click on each of them, and go to create —> constant. This will present you with an enum (aka a drop down menu) for each of the 4 motors, giving you the option to choose PWM 1-10.