Hello,
Sorry for the slow response on my behalf, I've been on the road so I haven't been on the 'net that much.

As I've written en previous posts in this thread the incPID routine itself does not know or care if it controls position, speed, temperature, waterlevel, light, torque or whatever. It simply returns a value based on the "error" you send it and the tuning parameters you set.

You can only run one PID-loop with it though (without rewriting the include) so controling BOTH speed AND position with the incPID won't work. What you CAN do though is to set up your system to control position and then in your program you continously change the targetposition. Set up a 100Hz (or whatever) interrupt and add to or subtract from the target position, the more you add or subtract the faster it will go. I've done that myself and it works fairly well.

Tuning is an art and there's more than a few ways to do it, Google Ziegler Nichols to read up on one of them. I've simply done it by "feel" but you can for example send the errror value to the USART and then plot the value on the PC using EXCEL or whatever to "see" the response of the system.

I suppose doing an autotune routine would be possible but it's not something I'm going to try. If you're going to write an autotune routine I suggest you read up and get good at manually tuning first so you know and understand how to respond to different situations. (Undershoot, overshoot, oscillation etc).

Hope it helps!
/Henrik.