|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Two Motors one PWM help?
Hi, I'm the programming team lead for team 5005, Is there any way to program it to have two motors on a single PWM? I've tried everything I can think of and at most it either spins in circles or only half works. These are just the 4 basic movement motors that came with the kit. Thanks in advance!
|
|
#2
|
|||
|
|||
|
Re: Two Motors one PWM help?
Generally, if you want the same signal sent to two motor controllers, your choices are to send the same PWM value via two PWM cables, or to send one PWM signal to two motor controllers using a Y cable. If you search, I'm sure you'll find directions on how to build the cable.
If you want to fix it in SW, switch from the two motor robotDrive to the four motor version and identify the extra PWM channels being used. Greg Mckaskle |
|
#3
|
|||
|
|||
|
Re: Two Motors one PWM help?
No I mean in Labview, I should have specified that, my bad. We have it wired electrically fine.
|
|
#4
|
|||
|
|||
|
Re: Two Motors one PWM help?
You aren't giving me much to go on here.
I assume that you have four motors, four motor controllers, and four PWM cables going in to the roboRIO -- two left and two right. Your Begin VI should be opening the 4 Motor version of Robot Drive. If it opens the 2 Motor version, replace it. Notice that it takes four PWM motor channel numbers and four inversions. Trace the wires and think about whether the wires look correct. Since there are only four, I'd recommend pulling the PWM wires and testing each individually to ensure that you really know what is going on. Label things and take notes if necessary. Greg McKaskle |
|
#5
|
|||
|
|||
|
Re: Two Motors one PWM help?
Ok, so the way it's set up, we have two motors hooked up to PWM 2, and the other two motors are hooked up to one each, PWM 0, and PWM 1. We can get the ones in PWM 0 and 1 to work, but it's the one in PWM 2 that we are having trouble with. It seems to be wired electrically fine I just can't get it work in labview. If it helps I can post some screenshots of what we have, just tell me if you need them.
|
|
#6
|
|||||
|
|||||
|
Re: Two Motors one PWM help?
Quote:
Quote:
|
|
#7
|
|||
|
|||
|
Re: Two Motors one PWM help?
Quote:
I've never seen anything outlawing PWM splitters. In fact, they were included in the kit for years. Maybe as recently as 2013? Now back to OP: are all of these motors drive motors? If so, why not have both sides on PWM splitters or both sides on two PWM outputs. Seems like things are necessarily complicated. |
|
#8
|
|||||
|
|||||
|
Re: Two Motors one PWM help?
Quote:
R57 Every relay module, servo, and PWM motor controller shall be connected to a corresponding port (relays to Relay ports, servos and PWM controllers to PWM ports) on the roboRIO or via a legal MXP connection (per R58). They shall not be controlled by signals from any other source. This actually provides that no other source can be used to provide control for the listed devices except the RoboRio. This is safety issue in that we know the RoboRio can be disabled/enabled via the FMS. Other devices likely would not provide this level of control and might cause robot movement when the robot is disabled. That is the underlying reason, active MXP boards must be pre-approved by FIRST Engineering. To the OP, how are your two motors designed to operate? Are they connected together on a mechanism? Can you tell us what indications on the motor controllers are present? |
|
#9
|
|||||
|
|||||
|
Re: Two Motors one PWM help?
Quote:
Al, thanks for the verification. |
|
#10
|
|||
|
|||
|
Re: Two Motors one PWM help?
Quote:
[IMG] [/IMG][IMG] [/IMG][IMG] [/IMG] |
|
#11
|
|||||
|
|||||
|
Re: Two Motors one PWM help?
A few things are wrong here.
If all four of these motors are for driving, then you need some consistency. Either:
PWM 0 and PWM 1 are signals for opposite sides of the drive train. So those are where your two splitters should come from. One splitter for each side. The Arcade Drive is mixing the joystick x/y to produce the correct PWM0 & 1 outputs. The Dual Motors isn't compatible that that. Motor Set Output has an incorrect wire. The one with the red dot needs to be removed. It looks like you are trying to treat it like Arcade Drive. It isn't. There are duplicates for Robot Drive Motors, Joystick 1/Axes/Buttons, etc. setting every one of these in two places. Only one will win. Last edited by Mark McLeod : 27-01-2015 at 14:55. |
|
#12
|
|||
|
|||
|
Re: Two Motors one PWM help?
Quote:
|
|
#13
|
|||||
|
|||||
|
Re: Two Motors one PWM help?
Quote:
How about starting over? Tell us what you're doing as if we have no idea what your robot looks like -- because we really don't. What kind of motor are you trying to control, and what kind of motor speed controller are you using? What is the motor physically connected to -- is it for turning a drive wheel, moving an arm, lifting an elevator, etc.? How are you defining the motor in Begin? How are you setting its value in Teleop? Quote:
|
|
#14
|
||||
|
||||
|
Since when can you not use a pwm spliter or pwm y cable?
|
|
#15
|
|||||
|
|||||
|
Re: Two Motors one PWM help?
For controlling motors? For a while I believe.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|