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 .

BTW:

Because the functions are called in the order they are added by "addf",
i make ONE hal file with all hal components in use, where  they are  loaded and published to the system by addf.
(the logic wiring is done in further hal files)
This makes it easier to have a eye on the call order, rather than distributing them over several hal files.

hope this helps

cheers

Rainer




_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to