View Single Post
  #3   Spotlight this post!  
Unread 14-02-2015, 19:03
eddie12390's Avatar
eddie12390 eddie12390 is offline
Registered User
AKA: Eddie
FRC #3260 (SHARP)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 285
eddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of lighteddie12390 is a glorious beacon of light
Re: Talon SRX PID Not Running

Quote:
Originally Posted by James Kuszmaul View Post
Nothing strikes me as obviously wrong with your code.
However, I do have to ask: How exactly did you arrive at that P gain value? Per section 17.13 of the Talon SRX Software Reference Manual, the P gain is in units of throttle / sensor, where throttle is 0 - 1024 and sensor units are encoder ticks (same units as the 1300 you are seeing). This means that your code should cause the talon to apply a throttle of 1300 * 0.00091054 = 1.18 throttle (out of 1024), and it is not implausible that such a low throttle could get rounded to zero. Have you tried a larger P value, tried including an I or D gain, or tried increasing the error?

Edit: Just as a reminder, if you haven't already, be sure to read the Talon Software Reference Manual. It is quite comprehensive and can generally answer any questions you may have.
My mistake, I went with the (incorrect) assumption that throttle would be normalized. The P term was based on doing a linear regression from known errors to certain motor set points but I had done that with a maximum speed of 1.0 at 1000? ticks. I feel like that is most likely the issue, I'll have to test it on Monday. Thank you for your help.
__________________
Any post that I make expresses only my opinions. I do not represent the opinions of my team or of any entity affiliated with my team.

As a Mentor:
2016 - Engineering Inspiration at Greater Pittsburgh Regional

As a Driver:
2014 - Winner of Greater Pittsburgh Regional