Motor Control Issue

We have a total control issue with our robot.
We are running 4 CIM Motors to run a 6 Wheel Tank Drive train
1 CIM Motor for our intake
2 mini CIM Motors for our climber, running on one controller

All these motors are running on SPARK Maxes

When all the motors are connected, pressing the button that triggers the intake (as well as shooting) it ends up running the motor on the drive train.

Things we’ve troubleshooted:

Replaced the Power Distribution Panel
Tried some programming solutions
- stopping drive train motors while intake is running
- reversing the polarity of the drive train while intake is running
- checked if statements with print statements to make sure they are going through
-

Are the Spark MAXes controlled over CAN or PWM?
If CAN, do the IDs that you are controlling in code match the motors you think they are?
If PWM, are the controllers connected to the correct ports on the roboRIO?

they are connected via PWM and are connected to the correct ports.

Most likely a code issue. Can you post a link to your code?

code2024_6860.txt (5.2 KB)

I don’t see any reason hitting the controller’s bumpers would do anything to the drive train.
I suggest putting the robot on blocks and verifying that when you drive or hit the bumpers on the controller that the LEDs on the proper controllers change in the expected ways, and that the expected motors follow that, because it does seem that that something is wired differently from what you intended. The easy way to tell whether drive train motors are doing what you want is to disconnect one from each side of the drive train, test, then swap so the others are disconnected and test again.

Also, I noticed this in the original post:

This violates R505; only BAG, AM 9015, AM PG, KOP Automotive Motors, NeveRest, Snow Blower, and REV HD Hex can be paired up on a single controller.

1 Like