Den 2021-10-19 kl. 19:21, skrev Rainer Stelzer:
Hi Dan,
I had similar issues when:
- a PID controller is involved,
- a PID input value jumps (as it is the case for the positioning PID
controller when new location is set at the home position)
and
- the order of the hal function calls areĀ not correct.
Example:
I recently noticed that when using M19 spindle orientation.
Works perfectly after startup.
Tested dozens of positions to tune the PID.
But after the spindle made some hundred revolutions and the spindle
stops to orient for toolchange,
the PID controller generates a big jump.
The reason was, that the orient component calculated a new set
position by taking the actual position beforeĀ the call to the
hardware interface was done.
So the PID saw a giant difference on the feedback and the command
input and acted accordingly with a giant output.
It was only for one servo-thread period, but depending on your PID
setup, this can cause a significant spike.
This is really a tricky issue, esp. when you are focused on PID tuning
and this kind of side effects come into play .
If spindle angle is set to zero at encoder zero pulse and position
control is used there will be one or in case of delay maybe up to a few
servo periods glitch.
There is another issue. Then spindle orientation is set there is a jump
in reference value, "trajectory" planning and feed forward may be a good
idea. My machine has some backlash in the gear box further complicating
the control loop.
Nicklas Karlsson
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers