Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Which motors are PWM 1, 2, 3, 4? (http://www.chiefdelphi.com/forums/showthread.php?t=126276)

chigskonkwo 11-02-2014 20:58

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!

ksafin 11-02-2014 21:05

Re: Which motors are PWM 1, 2, 3, 4?
 
Quote:

Originally Posted by chigskonkwo (Post 1341528)
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.

chigskonkwo 11-02-2014 21:13

Re: Which motors are PWM 1, 2, 3, 4?
 
We chose Mecanum drive on our code, we didn't code each specific motor.

Pault 11-02-2014 21:15

Re: Which motors are PWM 1, 2, 3, 4?
 
Look at your begin.VI code. You have the option to choose which port each motor should be in.

ksafin 11-02-2014 21:16

Re: Which motors are PWM 1, 2, 3, 4?
 
Quote:

Originally Posted by chigskonkwo (Post 1341536)
We chose Mecanum drive on our code, we didn't code each specific motor.

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.

chigskonkwo 11-02-2014 21:17

Re: Which motors are PWM 1, 2, 3, 4?
 
Does it say "Front Right" or "Back Left" or something? (I don't have the programming laptop with me right now).

ksafin 11-02-2014 21:17

Re: Which motors are PWM 1, 2, 3, 4?
 
Quote:

Originally Posted by chigskonkwo (Post 1341540)
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.

chigskonkwo 11-02-2014 21:21

Re: Which motors are PWM 1, 2, 3, 4?
 
Okay, thanks a ton! I'll look at it when I get to tomorrow.

Pault 11-02-2014 21:22

Re: Which motors are PWM 1, 2, 3, 4?
 
Quote:

Originally Posted by chigskonkwo (Post 1341540)
Does it say "Front Right" or "Back Left" or something? (I don't have the programming laptop with me right now).

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.


All times are GMT -5. The time now is 05:40.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi