Jaguar Power Uneven

Experimenting with wiring and coding in order to be prepared for build season, we are now having a problem where the power given to the CAN Jags in our drive train is not even. The first Jag in the series has 100% power (full speed), the next Jag has about 50%, and the next two are not even running. It resembles the voltage drop in a series circuit. As of now, we aren’t sure if it’s related to code or wiring. Could you guys help enlighten us as to what is going on?

Thanks in advance!

-Phynix

Can you give us a rough wiring diagram? And maybe post your code?

Also, what are the LEDs on the Jaguars doing when you’re giving them a full forward command?

I’m having difficulty seeing this as something other than a programming problem unless you have extremely weird or bad wiring or mechanics.

Under what conditions is this occurring? How are you getting these figures? Is it the power supply to the Jaguars or is it the output of the motors being controlled by these Jags?

Barring hardware/firmware defects in the Jag itself, I’m having a hard time imagining a scenario where wiring alone would cause such a situation, given that CAN is purely digital.

Thanks for the quick responses!

Those figures aren’t exact; the first motor was going incredibly fast, while the next motor was going slower (it seemed about half speed), and the other two were not going at all.
I will not have access to the robot until tomorrow morning (can’t tell you jag blink codes until then), but we were running a very simple C++ program:


#include "WPILib.h"

class Robot : public SimpleRobot{
public:
	RobotDrive* drive;
	CANJaguar* jags[4];
	
	Robot(){
		for(int i=0;i<4;i++){
			jags*=new CANJaguar(i+1);
		}
		drive=new RobotDrive(jags[0],jags[1],jags[2],jags[3]);
		drive->SetSafetyEnabled(false);
	}
	void Autonomous(){
		bool run=true;
		while(run){
			jags[0]->Set(1.f);
			jags[1]->Set(1.f);
			jags[2]->Set(1.f);
			jags[3]->Set(1.f);
		}
	}
	void OperatorControl()	{
		bool run=true;
		while(run){
			jags[0]->Set(1.f);
			jags[1]->Set(1.f);
			jags[2]->Set(1.f);
			jags[3]->Set(1.f);
		}
	}
};