View Single Post
  #1   Spotlight this post!  
Unread 13-01-2012, 18:53
Patrickwhite's Avatar
Patrickwhite Patrickwhite is offline
May the North be with you
FRC #0610 (The Coyotes)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Toronto
Posts: 88
Patrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of lightPatrickwhite is a glorious beacon of light
Jaguars - Current Mode Fails

Our Logomotion robot's drivetrain is controlled by four Jaguars - two master Jaguars and two slave Jaguars on each side. They are Black Jaguars connected by CAN, with speed PID control. We had synchronized the masters and slaves with voltage mode in the past, but we read somewhere that using current mode shares the work load more efficiently. So while using that robot to test some new code, we tried using current mode and found problems with both the getter and setter current methods.

Code:
...
jagLeftMaster.changeControlMode(CANJaguar.ControlMode.kPercentVBus);
jagRightMaster.changeControlMode(CANJaguar.ControlMode.kPercentVBus);
jagLeftMaster.changeControlMode(CANJaguar.ControlMode.kCurrent);
jagRightMaster.changeControlMode(CANJaguar.ControlMode.kCurrent);
...
jagLeftMaster.getOutputCurrent(); //both of these only return the absolute value of the current
jagRightMaster.getOutputCurrent();
...
jagLeftSlave.setX(jagLeftMaster.getOutputCurrent());
jagRightSlave.setX(jagRightMaster.getOutputCurrent()); //these don't appear to do anything at all
The getOutputCurrent method only returns the absolute value. The number itself looks accurate but is only ever positive.
The setX() method while in Current mode isn't appearing to do anything. The LED on the Jaguar is solid amber - it is communicating via CAN but is not receiving instructions.

Has anybody had these problems before and/or know what the problem is?

Thanks in advance.
__________________
while(!going.isTough());
tough.exit();

What will we do tonight, Warfa?
The same thing we do every night, Patrick. Sit and wait for Electrical.
Reply With Quote