I have a question regarding DC motors with integrated rotary encoders, and the practicality of being able to control both speed and position simultaneously. Through looking at other projects and articles, it would seem the conventional way of achieving position or speed control is through PID, but it appears to me at least, that you can only achieve one of the two at any given time, as the other variable is used as the error to drive the PID algorithm. As I myself am pretty new to PID, I am wondering if there is a way, to control both speed and position of the motor through PID at the same time, i.e. give the motor a target position to reach, and a speed with which to achieve this. Any opinions or advice would be most most usefull, and I thank you in advance for any response.