Ethercat random jitter fix
- grandixximo
-
Topic Author
- Away
- Elite Member
-
Less
More
- Posts: 209
- Thank you received: 294
07 Apr 2026 09:37 #345261
by grandixximo
Replied by grandixximo on topic Ethercat random jitter fix
I've used LeadShine and XingJie same issues with both, there may well be mitigations on the servos side for some manufacturer, but that does not mean the standard of Ethercat says they should be doing such a thing. So it's luck?
Please Log in or Create an account to join the conversation.
- grandixximo
-
Topic Author
- Away
- Elite Member
-
Less
More
- Posts: 209
- Thank you received: 294
07 Apr 2026 10:48 - 07 Apr 2026 11:27 #345263
by grandixximo
Replied by grandixximo on topic Ethercat random jitter fix
The linuxcnc-ethercat current release does not respect the ethercat standard, it has time phasing issues, this is demonstrably true.
Anyone lucky enough to not experience any issue has:
Incredibly low latency
Servos that somehow adjust phasing themselves further than what the Ethercat standard dictates.
CPU with instruction execution timing consistency across processes, somehow doing the phasing properly even if the code did not directly intended it.
Some servo feature that filters the commanded position.
Not used pos-cmd mode.
Not actively been looking for it, restarting 100+ times and induced high latency, and looking at Ferror and servo-thread in the halscope.
Even if some hardware is not bothered by wrong phasing, you should not blame this on the servo drives manufacturers. The software they are interfacing with demonstrably does NOT respect the communication standard.
Anyone lucky enough to not experience any issue has:
Incredibly low latency
Servos that somehow adjust phasing themselves further than what the Ethercat standard dictates.
CPU with instruction execution timing consistency across processes, somehow doing the phasing properly even if the code did not directly intended it.
Some servo feature that filters the commanded position.
Not used pos-cmd mode.
Not actively been looking for it, restarting 100+ times and induced high latency, and looking at Ferror and servo-thread in the halscope.
Even if some hardware is not bothered by wrong phasing, you should not blame this on the servo drives manufacturers. The software they are interfacing with demonstrably does NOT respect the communication standard.
Last edit: 07 Apr 2026 11:27 by grandixximo.
Please Log in or Create an account to join the conversation.
- andrax
-
- Offline
- Elite Member
-
Less
More
- Posts: 241
- Thank you received: 58
07 Apr 2026 11:42 #345264
by andrax
Replied by andrax on topic Ethercat random jitter fix
Interesting.
My computer is an ancient IPC from 2006. Except for the SSD, everything is original hardware.
The network card, however, has an Intel chip and is Beckhoff certified.
infosys.beckhoff.com/index.php?content=..../9309844363.html&id=
Perhaps that's a clue.
My computer is an ancient IPC from 2006. Except for the SSD, everything is original hardware.
The network card, however, has an Intel chip and is Beckhoff certified.
infosys.beckhoff.com/index.php?content=..../9309844363.html&id=
Perhaps that's a clue.
Please Log in or Create an account to join the conversation.
- grandixximo
-
Topic Author
- Away
- Elite Member
-
Less
More
- Posts: 209
- Thank you received: 294
07 Apr 2026 12:15 #345265
by grandixximo
Replied by grandixximo on topic Ethercat random jitter fix
What are the clues supposed to point us to?
I have igc i210 advertised as supported by igh and Beckhoff.
There maybe a lot of reasons why your setup works for you, but there is only one cause for the jitter noise I was experiencing, there maybe other unrelated noises on other hardware, but the one I identified is fixed in my fork of the code.
What will figuring out why you don't have the issue get us? Did you run extensive testing with restarts looking at the halscope to prove you don't have the issue?
I have igc i210 advertised as supported by igh and Beckhoff.
There maybe a lot of reasons why your setup works for you, but there is only one cause for the jitter noise I was experiencing, there maybe other unrelated noises on other hardware, but the one I identified is fixed in my fork of the code.
What will figuring out why you don't have the issue get us? Did you run extensive testing with restarts looking at the halscope to prove you don't have the issue?
Please Log in or Create an account to join the conversation.
- andrax
-
- Offline
- Elite Member
-
Less
More
- Posts: 241
- Thank you received: 58
07 Apr 2026 13:01 #345266
by andrax
Replied by andrax on topic Ethercat random jitter fix
Sorry,
It was just a thought. And no, I haven't had any jitter problems so far, despite endless restarts. I've often even had to restart the servos mid-operation (homing failure).
I'm absolutely certain that your driver is working and resolving the jitter issues.
But what if the hardware isn't compatible or is causing problems...?
I just wanted to throw that out there.
Sorry.
It was just a thought. And no, I haven't had any jitter problems so far, despite endless restarts. I've often even had to restart the servos mid-operation (homing failure).
I'm absolutely certain that your driver is working and resolving the jitter issues.
But what if the hardware isn't compatible or is causing problems...?
I just wanted to throw that out there.
Sorry.
Please Log in or Create an account to join the conversation.
- endian
-
- Online
- Elite Member
-
Less
More
- Posts: 318
- Thank you received: 122
07 Apr 2026 13:20 #345267
by endian
Replied by endian on topic Ethercat random jitter fix
what do you think with not to use pos cmd mode ? do you have an unreliable experiences with them?The linuxcnc-ethercat current release does not respect the ethercat standard, it has time phasing issues, this is demonstrably true.
Anyone lucky enough to not experience any issue has:
Not used pos-cmd mode.
Please Log in or Create an account to join the conversation.
- grandixximo
-
Topic Author
- Away
- Elite Member
-
Less
More
- Posts: 209
- Thank you received: 294
07 Apr 2026 14:22 #345271
by grandixximo
Replied by grandixximo on topic Ethercat random jitter fix
@andrax
No need to apologize, just trying to understand where you were going with it.
With my fork I don't have any jitter noise when things are set as they should. Finding the issue was no easy feat, before looking at linuxcnc ethercat, hardware wise I tested with different servos, different CPUs, different network chips, software wise, different ethercat versions, different kernels, different linuxcnc versions. Ruled out basically everything else, I knew it had to be linuxcnc-ethercat, and after putting in the time to find the issue, I am sure I found it, while before it was random, I can now reproduce it at will, and I can turn off the jitter at will, I can place the phasing in and out of the jitter with the sync0shift setting, this is correct and expected within the ethercat standard, even twincat has a default Sync0shift of 30% cycle time, and you should expect issue somewhere between 0 and 30% what issues will depend on hardware, but the standard does not want your Sync0shift in that range for a good reason, and the hardware is not supposed to work properly when you don't follow the standard, and the original code was NOT following the standard, maybe accidentally on some hardware it was ok, even a broken clock is right twice per day...
@Endian
I only use pos-cmd mode, i think velocity and torque mode can get better performance, give you more control, but require more tweaking, and I think (but not sure) any slight issue like the jitter of this topic might be absorbed by a finely tuned PID for the job.
While pos-cmd rely on PID of the servo, it's normally a general one, which will work for most applications, in my case it's very strict and quick, that's why the motor vibrates, it's trying to respect position very strictly, which usually is a good thing...
No need to apologize, just trying to understand where you were going with it.
With my fork I don't have any jitter noise when things are set as they should. Finding the issue was no easy feat, before looking at linuxcnc ethercat, hardware wise I tested with different servos, different CPUs, different network chips, software wise, different ethercat versions, different kernels, different linuxcnc versions. Ruled out basically everything else, I knew it had to be linuxcnc-ethercat, and after putting in the time to find the issue, I am sure I found it, while before it was random, I can now reproduce it at will, and I can turn off the jitter at will, I can place the phasing in and out of the jitter with the sync0shift setting, this is correct and expected within the ethercat standard, even twincat has a default Sync0shift of 30% cycle time, and you should expect issue somewhere between 0 and 30% what issues will depend on hardware, but the standard does not want your Sync0shift in that range for a good reason, and the hardware is not supposed to work properly when you don't follow the standard, and the original code was NOT following the standard, maybe accidentally on some hardware it was ok, even a broken clock is right twice per day...
@Endian
I only use pos-cmd mode, i think velocity and torque mode can get better performance, give you more control, but require more tweaking, and I think (but not sure) any slight issue like the jitter of this topic might be absorbed by a finely tuned PID for the job.
While pos-cmd rely on PID of the servo, it's normally a general one, which will work for most applications, in my case it's very strict and quick, that's why the motor vibrates, it's trying to respect position very strictly, which usually is a good thing...
Please Log in or Create an account to join the conversation.
Time to create page: 0.125 seconds