|
Re: PID Issue
I didn't look closely enough at your code before, but now I see that you might have a fundamental problem. Think about what happens when the wheel speed matches the rate you're commanding. What's the output of the PID function going to be?
Zero.
That's not what you want to tell the motors. I think the simplest fix would be to "integrate" the output of the PID in order to make things work right. Instead of feeding it to the Tank Drive directly, use the PID output to add to or subtract from the motor speed command. That way, when the feedback and setpoint are the same, the motor will continue at its current speed.
Another way to do it is possible, but it isn't as simple to implement when using the "Academic PID" that LabVIEW provides.
|