Go to Post Don't fight bureaucratic morons... embrace them! Humour and publicity will take care of the rest. - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 15-02-2012, 10:41
Doc543's Avatar
Doc543 Doc543 is offline
Electrical, Pneumatics, Driver
AKA: Eric
FRC #1891 (BullBots)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Meridian Idaho
Posts: 63
Doc543 is an unknown quantity at this point
Re: CANbus Jaguar control

1. Ive used the PID on the Jags, I couldn't figure out how to run the WPI PID.
2. I got about 450 rpm with the KOP US encoders, setting them to 360 degrees per turn

How we initialized our Jags
Code:
      //Left Master, 360 Encoder 
        left_wheel1 = new CANJaguar(2);
        left_wheel1.changeControlMode(CANJaguar.ControlMode.kSpeed);
        left_wheel1.setPID(drive_p, drive_i, drive_d);
        left_wheel1.configEncoderCodesPerRev(encoder_rev);
        left_wheel1.setSpeedReference(CANJaguar.SpeedReference.kEncoder);
        left_wheel1.enableControl();

      //Left Slave
        left_wheel2 = new CANJaguar(3);
        left_wheel2.changeControlMode(CANJaguar.ControlMode.kVoltage);
        left_wheel2.enableControl();
How we ran our jags
Code:
        try{
            left_wheel1.setX(eft_motor);//master
            left_wheel2.setX(left_wheel1.getOutputVoltage());//slave
            
        }
    	catch(Exception ex){
		ex.printStackTrace();
	    }
master, slave style, works like a charm!
__________________

"Its just a prototype."
2011 Chairman's Award Utah Regional
2010 Gracious Perfectionism Utah Regional
2009 Gracious Perfectionism Portland Regional
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 13:05.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi