View Single Post
  #9   Spotlight this post!  
Unread 18-10-2010, 15:35
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: Jaguar Non-FRC Firmware

Quote:
Originally Posted by dyanoshak View Post
Are you configuring the PID constants? By default they are all 0, so no matter what speed, position, or current you tell the Jaguar to hold, it will not move with P, I, and D set to 0. Are you wiring up the appropriate sensors for position and speed modes? Are you configuring those sensors properly (number of encoder ticks, turns of the pot, etc.)?
Yes as I said there was NO change to the software I was using. The software worked for voltage and position control. PID was 10, 0.02, 0.02. Encoders were read and Jags reported position and speed.

Quote:
Originally Posted by dyanoshak View Post
Do you have a Black Jaguar? I would recommend trying to control the Jaguar with BDC-COMM first. You will have to make your own serial adapter, but the instructions and part numbers are available in the MDL-BDC24 Getting Started Guide.

This way you can get the various modes working and then troubleshoot your own method of connecting to the Jaguar. BDC-COMM offers an easy way to see what parameters need to be set to get the modes to run correctly.

Without more detail on what you're doing, I can't help troubleshoot the problem.



We only have the latest firmware versions on the web.

-David
If I had a serial port I would. But cant until I have access to one.

Like I said the jaguar can protocol is being used just its being sent to the 2CAN as raw can frames. Here is a sample piece of code that should work.


Code:
CANJaguar canJaguar = new CANJaguar(2, CANJaguar.ControlMode.kSpeed);
        canJaguar.setSpeedReference( CANJaguar.SpeedReference.kEncoder);
        
        canJaguar.configEncoderCodesPerRev((short)20);
        canJaguar.setPID(10, 0.02, 0.02);

        canJaguar.enableControl(0);

        while(true)
        {
            canJaguar.set(100);
            
            try
            {
                Thread.sleep(10);
            }
            catch(InterruptedException excep)
            {}
        }