Quote:
|
Originally Posted by EHaskins
I can write a simple PID, but I am having trouble when I try to write one to handle more then one output. I would like to be able to have the two/four drive outputs have one group of gains, and also have separate gains for a turret, thrower wheels...  .
Is this possible, and if anyone has done this can they show me how they did this.
EDIT: My goal is to have 4-6 output channels. 1-2 would have the same gains.
|
You could implement the PID as a function that gets passed the loop parameters and the error information required when you call it...that way you can have one PID in code but manage many loops with it.
Or am I not understanding the question?