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!
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.
No I mean in Labview, I should have specified that, my bad. We have it wired electrically fine.
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.
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.
This unfortunately is not legal, each motor controller must be hooked up to one port.
R57 Every relay module, servo, PWM motor controller shall be connected to a corresponding port on the roboRIO or via a legal MXP connection.
Since when can you not use a pwm spliter or pwm y cable?
For controlling motors? For a while I believe.
Try to be more precise in what you’re telling us, please. You say there are two motors controlled by PWM 2, but you also say your problem is with “the one in PWM 2”. We can’t help you very well when your descriptions aren’t consistent.
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?
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.
Pictures are always good. Code snippets are better, so we can follow wires when things get confusing.
Of course I’m not on the GDC, but I don’t believe you are interpreting that correctly. The rule is there to prohibit teams from controlling servos, motor controllers, and relays with things other than the roboRIO. So a team can’t have a Talon PWM cable plugged into an Arduino. It must go directly to the roboRIO.
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.
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?
Jefferson, thanks for the correction.
Al, thanks for the verification.
A few things are wrong here.
If all four of these motors are for driving, then you need some consistency.
- Change Open 2 Motor to Open 4 Motor in Begin and use 4 PWM outputs
- Or keep Open 2 Motor and use PWM Y splitters on both sides of your drive train
The immediate things wrong with what you are doing:
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.
YES it worked!!! Thank you so much!