Thread: PID setSetPoint
View Single Post
  #3   Spotlight this post!  
Unread 04-02-2016, 11:25
Sparx030 Sparx030 is offline
Registered User
FRC #1251
 
Join Date: Jan 2016
Location: Florida
Posts: 14
Sparx030 is an unknown quantity at this point
Re: PID setSetPoint

Quote:
Originally Posted by aeastet View Post
That depends on how you set up your PID loop. For our PID loop we are using RPM as the input and we get motor power out. It would also depend on what you are using your PID loop for.

Inputs
You should have a set point you are trying to achieve.
The process variable (current measured value)
The PID values
Limits (This could be anything +/- 1, 0-1VDC, 0-5000RPM, 3500-5000RPM etc...)

Output would be a number somewhere in the range of your limits.
I am using my PID to maintain a certain RPM with input from an encoder (which would read counts per revolution) using 4x decoding at 120 cycles per revolution, so I have
Code:
pidShooter = new PIDController(Kp, Ki, Kd, encoder, motor);
now say I'm trying to maintain 1000 RPM, what do I put into PID.setSetPoint() to achieve that? If I am still missing something let me know.
Reply With Quote