View Single Post
  #3   Spotlight this post!  
Unread 10-05-2012, 19:30
dudefise dudefise is offline
Registered User
FRC #2637 (Panthers)
Team Role: College Student
 
Join Date: Feb 2011
Rookie Year: 2011
Location: CA
Posts: 92
dudefise is an unknown quantity at this point
Re: CANJaguar Control C++

Quote:
Originally Posted by Andrew Schreiber View Post
This is because you are using a PID controller on them. You are telling it to try to get to a certain value. Try not using the PID controller (try removing the cjag.EnableControl(); line and see if you get the same behavior)
He's right, it's due to the PID control. We also used CAN and C++ on our robot this year, and started with P as 1.0, I as 0.01 and D as 0. It will still loop, but will get to speed much quicker, although it may have significant overshoot until you tune it.

As far as I know, there is no way to control the Jaguars with encoders without a PID loop being involved.

I'm not a programmer so I'm not sure about this, but you might also need to construct the CANJaguar as CANJaguar::kSpeed instead of kPercentVbus.

Hope this helps!
__________________
2010 VRC 2453B - Team Captain
2011 FRC 2637 - Electrical - Las Vegas Regional Semifinalists with 1726 and 166
2012 FRC 2637 - Electronics Captain - Las Vegas Regional Semifinalists with 1661 and 2984
2013 FRC 2637 - Build Captain - Inland Empire Quarterfinalists with 3925 and 207
2014 FRC 2637 - College Mentor - Central Valley Quarterfinalists with 2085 and 5136 / LA Regional Semifinalists with 696 and 5102
2015 FRC 2637 - Lazy Schmuck - Couch Sitting Quarterfinalist
2016 FRC 2637 - College Mentor - SD Regional Finalist with 1572 and 2443, Excellence in Engineering, Wildcard
Reply With Quote