Thank you for the input!
Just got back to the machine.
Was not sure what value to set maxerror to so i started with 0.001. It did pretty much eliminated all overshoot, but i also feel that the P value has no effect anymore. A P value of 5 or 100 have the same response curve.
I tried milling with P=2 and maxerror=0.001 but still got a rpm drop of about 70 revolutions. Also tried P=5 and got a drop of 130 revolutions!
If i up the feedrate while under load i have the feeling i could easily stall the spindle.
Maybe the vfd is faulty?´
Also anything in the VFD setup that slows response will limit the highest stable P term.
Would reducing or disabling the startup acceleration also count here?
I attached a image of halscope with encoder feedback, speed cmd and pid output. The pid is working and trying to combat the drop, so maybe the spindle gearbox is not dynamic enough to respond quick enough? In the image the difference is not so big but again if i increase the load the difference gets much bigger.