Ethercat random jitter fix

More
10 months 1 day ago - 10 months 1 day ago #340786 by endian
Replied by endian on topic Ethercat random jitter fix
I have been using negative ref cycles setup ... everything works well, but I have been using native drivers with custom configuration ... latency is very low in my case

it is here ?  github.com/grandixximo/linuxcnc-ethercat
Last edit: 10 months 1 day ago by endian.

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

More
10 months 1 day ago #340808 by grandixximo
Yes, it is there, unfortunately to test the original code you have to have subpar CPU latency, have some glxgears running, and halscope to simulate/induce bad latency, then you probably have to restart a whole bunch of times, in my case I methodically restarted 100's of times, moved and checked the ferror while moving for the grinding, the better your latency is the less probability you will land on the bad window randomly, by inducing some strong latency on my system running graphical processes which I know give me spikes, I was able to get grinding in the ferror about 20% of the times, without purposely inducing latency I would see it 5% of the times, and I'd really have to look for it with halscope, because opening halscope and plotting the ferror would actually make the latency worse, and the consequently I spotted it more often, without halscope running I could potentially see it only once every 100 restarts if ever, which makes the issue incredibly rare with good latency, the original code was good at syncing, but phasing was random so if you ever were to end up in the grinding window, a restart would have fixed it almost always, phasing was random as far as I tested before my fix.
The following user(s) said Thank You: rodw, NWE

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

More
10 months 19 hours ago #340820 by rodw
Replied by rodw on topic Ethercat random jitter fix
This is really awesome work. I would stick to the igc driver which is real time when generic isn't
But from what I am hearing, optimising for system and network latency will probably avoid the issue.
I have a video about that and one user reports he got latency down to about 6 usec following my tutorial.
I suspect by running a latency optimised system has meant I have never experienced this.
The following user(s) said Thank You: endian, NWE

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

More
10 months 14 hours ago #340831 by grandixximo
Yes, if you have good latency it does not really matter how close you are to the sync0shift window, as long as you never jump ahead and back, I also had to force the issue to come up and induce latency in my system by opening graphical intensive applications. But I believe my fix is a real game changer for running ethercat on something that is not super latency optimized, and not see the grinding issue, I hope the community will receive it well, I'm here for any bug fixes or whatnot...
The following user(s) said Thank You: rodw, endian

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

More
7 months 3 weeks ago #344002 by TAKUYA
Replied by TAKUYA on topic Ethercat random jitter fix
Great work so far.
I am just not sure i fully understand it all yet.
Does that mean that with the installed PR from end of 2025, SyncToRefClock=True fixes it all? Or is the currently open PR still needed?

Thanks!

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

More
7 months 3 weeks ago #344020 by andrax
Replied by andrax on topic Ethercat random jitter fix
Hi,

I also need to ask about this.
How does the jitter problem manifest itself?
Can I see it in the dmesg output?
I have tried to read up on the topic on GitHub, but I still don't understand the actual problem.
It's also a translation problem. 
Another question: is this patch already implemented in the current linuxcnc release, or does it have to be installed manually?
Is there any documentation on the additional commands, where and how they are called?

regards

andrax

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

Time to create page: 0.093 seconds
Powered by Kunena Forum