Controlling an animatronics bust

laadams85:
No, you calculate the error and feed it into a PID routine. Libraries may do the calculation for you, but the versatility of the PID is that it is irrespective of the inputs/outputs. It is really just a zero finding scheme on the error function.

hmm... according to my notes from reseearch, this is the PID formula:

error = P * Kp + I * Ki + D * Kd);

P, I, and D

are calculated like this:

P = Current position - Set position
D = P - Last_P

So, perhaps we are defining error differently? As my notes have error as the entire PID formula.

Is error in your terms equal to currpos - setpos?

Thanks