View Single Post
  #5   Spotlight this post!  
Unread 08-02-2012, 00:04
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is online now
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,658
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: CAN PID problems

I suggest you look closer at your feedback and command values. I'm nearly certain that while you're commanding a positive speed, you're getting a negative speed feedback. Or vice versa. This would explain your run away condition. If a positive Voltage output doesn't give you a positive feedback, then your PID loop will make things worse and worse and worse until it's running as fast as possible in the opposite direction.

Your solution is to either swap your A and B channels on the encoder, or the wires on the M+ and M- terminals. Do either one of those (not both!) and things should start working better. I believe our programming team is using P=0.5, I=0.0005, and D=0 and is getting decent results. Once they had the feedback and command directions matching, that is.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote