Quote:
Originally Posted by aeastet
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.