Hello vex teams of the world,
Recently we have completed our flywheel and have trouble with the velocity PID control for it. Here is the code that we currently use: Can anyone assist us in this problem?
You seem to be confusing your P, I, and D with your kP, kI, and kD. Presumably you defined kP, kI, and kD globally elsewhere. But then topFinal only depends on those and not upon error at all. Also, the same type of issue, if you set kI to 0, do you have any way of recovering kI?
Finally, I would note that the integral part can go crazy at times, so you may end up preferring PD over PID.
What he means is that you are setting your "topFinal" output to the sums of the constants kP kI and kD, not the actual values for P, I, and D. You also may want to set the I value to 0 when you reach the target instead of changing the kI constant.
Let’s not turn this into another discussion about Cortex and V5, but I support @Joey The Great in sticking with Cortex for now. Sure, V5 may have more advantages, but we all know Cortex better than V5. And I’m taking the emphasized words “for now...” to draw my conclusion. Eventually, yeah, we should all change over later in the season. But now, you can be competitive with Cortex.
well, its also the fact that my team is not extremely well-off enough to invest that much money in a system like that