How to program A PID controller

Hi Guys..
I am bit stucked at a problem here.. I am bit confused on how i should Code a PID controller as generic as possible.

Especially the I part and D part is the problem, any one capable of helping at the this point or already have a generic implementation?
Last edited on
Topic archived. No new replies allowed.