Ethercat random jitter fix

More
7 months 3 weeks ago #344063 by Atsu
Replied by Atsu on topic Ethercat random jitter fix

I could share my experience with this issue. Attached is a link to a video showing how the jitter sounds on StepperOnline A6 servos. This is exaggerated by disabling the synchronization. Once synchronization is enabled (syncToRefClock="true" or refClockSyncCycles="-1"), it still happens but much more rarely, just like grandixximo explained at the start of this post. Last week, I upgraded to the latest version of linuxcnc-ethercat, and am currently testing how the changes committed at the end of 2025 affect my machine configuration.

​​​https://imgur.com/a/FXSuvOS
 
Thank you for the independent testing, if you want a better version

github.com/linuxcnc-ethercat/linuxcnc-et...84ef36b53f0b734eaedf

this I have tested and works well, unfortunately Scott has not been around to merge it, so it is not in the main linuxcnc-ethercat repo yet, but it is a better version

Great, thanks! I'll switch to that version and continue testing.

Please Log in or Create an account to join the conversation.

More
7 months 3 weeks ago - 7 months 3 weeks ago #344082 by grandixximo

It sounds like you get gravel in the servo motors from time to time.
Or you get click sounds from the motors. It repeats itself with a few or many minutes apart.
The first thing to do is to enable syncToRefClock and enable DC mode for the servos,
this will keep the servo loop in sync with the DC.

What grandixximo is doing here is fixing an effect that despite DC and servo loop are synchronized,
the two loops have been started with an undetermined/unfortunate phase between them.
The gravel sound is there all the time and it doesn't go away until linuxcnc is restarted.

Surprisingly, yesterday Sasha Ittner popped up in the PR log and mentioned he had been working
on a complete redesign of the DC system, eliminating all these problems (don't know details)
grandixximo seems to have reviewed that work and decided to adopt Sasha's work.
grandixximo will have to say himself. And if you don't know, Sasha Ittner is the author of linuxcnc-ethercat
from many (>10) years ago. 
 

After reviewing on real hardware today, I found my original PR works better than what Sascha Ittner did in his repo, I reverted back to the original state before I started reviewing Sasha's work.
If anyone wants to help me test, I'd love feedback on the code in my repo, because for me this is what works.
github.com/grandixximo/linuxcnc-ethercat
But I need more data from other testers.
To prove the system works, you should get grinding noise, if you set sync0shift of your drive to be half your max servo latency, open halscope and scope your servo-thread and open a couple of glxgears to induce latency in the servo thread, this should induce the grinding noise, and the noise will not be anywhere else.
Last edit: 7 months 3 weeks ago by grandixximo.

Please Log in or Create an account to join the conversation.

More
7 months 3 weeks ago #344127 by Atsu
Replied by Atsu on topic Ethercat random jitter fix
I’ll switch to your PR and test it on my hardware the next time I’m working with my mill.

Please Log in or Create an account to join the conversation.

More
7 months 3 weeks ago - 7 months 3 weeks ago #344139 by TAKUYA
Replied by TAKUYA on topic Ethercat random jitter fix
Gotcha. i will try to get this ( github.com/linuxcnc-ethercat/linuxcnc-et...84ef36b53f0b734eaedf ) installed first, with syncToRefClock=true and ClockSyncCycles set to 5 to see if my jitter issues go away. they are very random as of right now.

Or should i use this patch with the settings above?
github.com/grandixximo/linuxcnc-ethercat
 
Last edit: 7 months 3 weeks ago by TAKUYA.

Please Log in or Create an account to join the conversation.

More
7 months 3 weeks ago #344141 by TAKUYA
Replied by TAKUYA on topic Ethercat random jitter fix
Installed the latter. So far so good, didnt do any major tests but multiple power cycles. Also, with the ClockSyncCycles set to 5 and syncToRefClock=true, my servos are now instantly OP. no waiting for them to be ready which caused some amplifier errors when i was too quick with the power button recently.

no idea if thats because of the new linuxcnc-ethercat version or because of those parameters.

one thing to note though, the dc-phased pin never went high for me.
The following user(s) said Thank You: grandixximo, tommylight

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago - 7 months 2 weeks ago #344163 by grandixximo
They are same

github.com/grandixximo/linuxcnc-ethercat

this just has one small optimization

dc-phased is latency dependent, can you plot in halscope, app-phase, pll-error, and servo thread?
Last edit: 7 months 2 weeks ago by grandixximo.

Please Log in or Create an account to join the conversation.

Time to create page: 0.197 seconds
Powered by Kunena Forum