|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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 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. |
|
#2
|
||||
|
||||
|
Re: Jaguars - Current Mode Fails
Have you set the PID constants for current mode? The default is all 0s & it will just sit there.
|
|
#3
|
||||
|
||||
|
Re: Jaguars - Current Mode Fails
The slaves do not and never have relied on PID loops - they draw straight from the masters.
|
|
#4
|
||||||
|
||||||
|
Re: Jaguars - Current Mode Fails
Current mode uses PID.
|
|
#5
|
||||
|
||||
|
Re: Jaguars - Current Mode Fails
Exclusively? For our purposes, it is not only impractical but also not healthy for the motors, as ideally the slaves should be running at the same speed as the masters.
If they use PID exclusively, is it not true that Current mode is more effective at distributing the work load? |
|
#6
|
||||
|
||||
|
Re: Jaguars - Current Mode Fails
They use a PID loops to get the current draw as close to the target as possible. Remember, the output is some speed from -1 to 1. The Jaguar needs the PID loop to figure out what output will get the proper current draw.
|
|
#7
|
||||
|
||||
|
Re: Jaguars - Current Mode Fails
Does anyone have any experience trying to get a "slave" CIM to sync current output with a "master" CIM - specifically in the application of a 4-motor (2 per side) drivetrain?
I'm curious what ballpark PID values were used, and what your tuning methodology was. We're planning on using the speed control PID on the master Jags. If there is a PID loop running on the slave Jags just to match the currents, if it doesn't react fast enough, it'll confuse the master Jag's speed PID loop. Sort of like trying to hit a constantly moving target. Has anyone already implemented something similar to this? Last edited by Mr. Lim : 01-14-2012 at 07:44 AM. |
|
#8
|
||||
|
||||
|
Re: Jaguars - Current Mode Fails
Quote:
|
|
#9
|
||||
|
||||
|
Re: Jaguars - Current Mode Fails
That sounds like what we were doing before - we had the slave Jaguars running in PercentVBus mode, and the master Jaguars running in PID speed control mode. We had separate PID loops on the left and right master Jaguars. To synchronize the slaves, we used:
Code:
... jagLeftSlave.setX(jagLeftMaster.getOutputVoltage() / jagLeftMaster.getBusVoltage()); jagRightSlave.setX(jagRightMaster.getOutputVoltage() / jagRightMaster.getBusVoltage()); ... |
|
#10
|
||||
|
||||
|
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|