Ethercat random jitter fix
- Hakan
- Away
- Platinum Member
-
Less
More
- Posts: 1314
- Thank you received: 451
19 Apr 2026 08:50 #345723
by Hakan
Replied by Hakan on topic Ethercat random jitter fix
I seems the initial delay is caused by lcec setting a bad initial reference time to the slaves.
Here is a listing of the first five lines, from lcec.write-all.
Data is cycle number, pll-err, reference clock time, application timelcec reads reference time of 3.53 second, and then sets it to 2.80 seconds. (lower 32 bits).
Now, speculating a bit, the clock is not changed right away, instead the clock is slowly changed
and the slave maintains a system time offset register 0x92c. It can then report and accurate
time by using the clock, that is off until in sync, and add the system time offset.
Must say it is speculation this though.
Anyway, the initial time setting in rt_app_main, or possibly the first few rounds in lcec_write should be looked at.
Here is a listing of the first five lines, from lcec.write-all.
Data is cycle number, pll-err, reference clock time, application time
0 0 3536553781 142022168
1 0 3536553781 143094900
2 1629533556 2808528640 144063093
3 0 2809491813 2810488578
4 10994 2810477584 2811488510Now, speculating a bit, the clock is not changed right away, instead the clock is slowly changed
and the slave maintains a system time offset register 0x92c. It can then report and accurate
time by using the clock, that is off until in sync, and add the system time offset.
Must say it is speculation this though.
Anyway, the initial time setting in rt_app_main, or possibly the first few rounds in lcec_write should be looked at.
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Premium Member
-
Less
More
- Posts: 152
- Thank you received: 11
19 Apr 2026 09:26 #345724
by papagno-source
Replied by papagno-source on topic Ethercat random jitter fix
Good morning everyone. This is very likely the problem. I've noticed that sometimes the problem occurs on the first reboot. I start LinuxCNC, with automatic startup at system startup. If I restart LinuxCNC with the system running, the problem goes away, but sometimes it doesn't. Tomorrow I'll try to test Grandixximo's latest fix. If it doesn't work, I'll reverse the bus sequence, install the SLA and I/O last, make sure the drives are the first node, and modify HAL.
Please Log in or Create an account to join the conversation.
Time to create page: 0.086 seconds