Ethercat random jitter fix

More
6 months 2 weeks ago #345615 by papagno-source
Furthermore, while on Debian 12 and Debian Trixie the Grub command line has been optimized, with isolcpu, c state, etc., in Debian 10 there are no optimizations. Obviously I tried to remove the optimizations on Debian 12 and Trixie, as well as on Debian 10, but the problem persists, only on Debian 12 and Trixie.

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

More
6 months 2 weeks ago #345628 by Hakan
Replied by Hakan on topic Ethercat random jitter fix
I tried to compile 1.5.2 on trixie but easier said than done. While I could get around several configuration issues,
there were in the end too severe compilation problems (for me) that I gave up.
At least 1.5.2 doesn't compile out-of-the-box on trixie.

In theory the DC sync should be pretty insensitive to jitter and latency. It should tolerate perhaps 1/2 servo cycle time,
depending on the phase when data is sent to the slaves. It's enough that data arrives a bit before Sync0,
Sync0 then does the precision timing.

I also think the initial synchrony check delay is different from the DC sync issue.
I checked on my system and I do have a several-second delay still. Bad news.
Good news is that I can try to see what the problem is.

So far I have come to understand that it has to do with the initial value
of the "System time difference" in register 0x92c.
Here is a way to observe, don't need to wade through tons of lines of syslog entries:
Code:
watch -n0 "ethercat reg read -p2 -tsm32 0x92c"
-pn n is any of the DC slaves except the first one with the reference clock.

Before starting linuxcnc it has a low value from previous linuxcnc session.
Start linuxcnc it jumps to aorund 1000000 (1 ms) and slowly works its way to do single digits.
This is on a 2 kHz servo loop system. It takes some 3-4 seconds to work its way down 
below the synchrony limit, and that's where the startup delay comes from.
Obvious question is "Where does the initial 1 ms System time difference come from?"
And it's always around 1 ms, if I wait a minute between linuxcnc starts or over night.

 

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

More
6 months 2 weeks ago #345630 by papagno-source
We need to join forces and solve this problem once and for all, otherwise there's no point in switching to Debian 12 or Trixie. Keep in mind that Debian 10 works on both older dual cores and i9s. I've tried Trixie on Advantech e8500 cards, and it doesn't work. If we don't solve these existential problems, there's no point in updating the string writing style, or doing many other things that have always worked, but now we want to update the writing style. I've been building LinuxCNC machines for 17 years, and they're still working flawlessly and do everything we do today. Now we need to solve this problem, and I'm available to run any tests. It would be nice to be able to compile LinuxCNC 2.10 on Debian 10, but I understand the dependency issue. We need to figure out if the problem is on the Kernel or EtherCAT side. I could contact anyone who can help us with this, so they can move forward with the fix. Grandixximo's work is to be commended, but he is optimizing a problem, which is not the main problem.

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

More
6 months 2 weeks ago #345632 by grandixximo
please come over to discord

discord.gg/6mKut8xe

Forum is down way too often, I'm also trying to build 1.5.2
Honestly I don't think it will fix anything, not sure if is worth it, but I am building it
gitlab.com/grandixximo/ethercat/-/pipelines
not ready yet, only generic drive will work.

also

github.com/grandixximo/linuxcnc-ethercat...ses/tag/v1.41.0-pre1

did you test?

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

More
6 months 2 weeks ago #345633 by rodw
Replied by rodw on topic Ethercat random jitter fix

I tried to compile 1.5.2 on trixie but easier said than done. While I could get around several configuration issues,
there were in the end too severe compilation problems (for me) that I gave up.
At least 1.5.2 doesn't compile out-of-the-box on trixie.
Code:
 
This does not surprise me. I found over the years of keeping repositories in sync, Ethercat includes dkms code which is tailored for specific kernels and breaks with the release of new versions of Debian. This did happen again with the release of Trixie but etherlab expedited the release of 1.6 on my request so you guys probably never noticed. Also, 1.6 is much more sensitive to secure boot and this requires authorizing dkms to modify the kernel code.

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

More
6 months 2 weeks ago #345639 by grandixximo
gitlab.com/grandixximo/ethercat/-/jobs/1...ad?file_type=archive

Here have debs of ethercat 1.5.2 compatible with debian 13

github.com/grandixximo/linuxcnc-ethercat...0.9.5-retro1.5.2-rc1

and here a linuxcnc-ethercat compatible with the 1.5.2 retro release

you need to type in the mac address and use generic in the systemconfig/ethercat file, in my test OP is same speed, please test on your end and let me know.

linuxcnc-ehtercat retro version I only tweaked latest version based on Sascha's work, and did minimal changes to be compatible with retro 1.5.2 ethercat

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

Time to create page: 0.097 seconds
Powered by Kunena Forum