View Single Post
  #10   Spotlight this post!  
Unread 12-01-2007, 15:00
Unsung FIRST Hero
Greg Marra Greg Marra is offline
[automate(a) for a in tasks_to_do]
FRC #5507 (Robotic Eagles)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2005
Location: San Francisco, CA
Posts: 2,030
Greg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond repute
Re: Potentiometer PID

Quote:
Originally Posted by DustinB_3 View Post
Thanks for the whitepaper
I think I understand fairly well, would this work:

*snip*

Arm_Out = Get_ADC_Result(2); //GetAnalogInput(Port) Checks the Port and Return 0-1024
Error = (Arm_Out - Target); // Computes Error Based on How Far you are from the goal
Drive = ((Gain * Error)+127); // Based on the gain it outputs a number and then add 127 so the Victor Understands
pwm01 = Drive;
Correct me if I am wrong, but that is NOT a PID loop. All that is going on there is a proportional control based on distance of the arm from the target. That code does not account for the integral of error or the rate of change of error, making it a P loop, not a PID loop.

So that will control the arm, but it is not PID control.