Hi WT,
Very good. The second plot is not saturating. I think it would be better to slow down a bit and use higher gain for better accuracy. Reduce Velocity to 9000 counts/sec. That would be:
9000/2540 = 3.54 inches/sec = 213ipm (same as your calculations).
Your acceleration is still way too high also. Reduce to 50,000. So in summary:
Velocity = 9000
Acceleration = 50000
Jerk=1000000
We should now focus on tuning for accuracy. Right now the following errors are almost 1/4 inch (500 counts) at max speed. You may not care much about that for a drilling application but I'm sure we can do much better. Put the P gain up to 5 or higher if you can. Then add some I gain. Start with 0.0001. Then increase until things go unstable. Then reduce by a factor of 2.
You will find that I gain will increase the accuracy a lot as it forces the average error to be zero. With P Gain alone the system can get "stuck" with a small error that is not enough to cause the motor to move. But I gain keeps summing/accumulating the small error over and over applying more and more output until eventually the motor will move.
If you plot position error it will be easier to see how well we are doing.
Regards