Ethercat random jitter fix
- grandixximo
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 178
- Thank you received: 268
15 Mar 2026 14:17 #344311
by grandixximo
Replied by grandixximo on topic Ethercat random jitter fix
I'm not good at coding either, I'm having the code checked by YangYang aka Mika in the forum, he is the master coder lol.
I did quick commit to fix the bug, seems legitimate, it was also present in original master. Thank you for reporting, hope the grinding noise goes away. Thank you for testing the code, would appreciate if you could leave a comment if my branch worked out without grinding noise for you. Thanks.
I did quick commit to fix the bug, seems legitimate, it was also present in original master. Thank you for reporting, hope the grinding noise goes away. Thank you for testing the code, would appreciate if you could leave a comment if my branch worked out without grinding noise for you. Thanks.
Please Log in or Create an account to join the conversation.
- andrax
-
- Offline
- Elite Member
-
Less
More
- Posts: 229
- Thank you received: 52
15 Mar 2026 14:55 - 15 Mar 2026 15:19 #344314
by andrax
Replied by andrax on topic Ethercat random jitter fix
Hi,
I just updated LinuxCNC via the package manager.
When I set `syncToRefClock=“true”`, I still get the error `lcec_conf: ERROR: Invalid master attribute syncToRefClock`.
I've now downloaded the EtherCAT master from GitHub.
When I run `make`, I get the following errors:
[/code]
Edit:
I've used Git now.
git clone github.com/sittner/linuxcnc-ethercat.git
There were no errors this time,
but the syncToRefClock=“true” still doesn't work.
I just updated LinuxCNC via the package manager.
When I set `syncToRefClock=“true”`, I still get the error `lcec_conf: ERROR: Invalid master attribute syncToRefClock`.
I've now downloaded the EtherCAT master from GitHub.
When I run `make`, I get the following errors:
devices/lcec_ep9214.c: In function ‘lcec_ep9214_write’:
devices/lcec_ep9214.c:206:23: warning: unused variable ‘hal_data’ [-Wunused-variable]
206 | lcec_ep9214_data_t *hal_data = (lcec_ep9214_data_t *)slave->hal_data;
| ^~~~~~~~
devices/lcec_ep9214.c:205:12: warning: unused variable ‘pd’ [-Wunused-variable]
205 | uint8_t *pd = slave->master->process_data;
| ^~
[code]Linking lcec.so
ld -d -r -o lcec.so.tmp lcec_main.o lcec_devicelist.o lcec_ethercat.o lcec_pins.o lcec_lookup.o lcec_modparam.o lcec_malloc.o
objcopy -j .rtapi_export -O binary lcec.so.tmp lcec.so.sym
(echo '{ global : '; tr -s '\0' < lcec.so.sym | xargs -r0 printf '%s;\n' | grep .; echo 'local : * ; };') > lcec.so.ver
gcc -shared -Bsymbolic -Wl,-rpath,/lib -Wl,--version-script,lcec.so.ver -o lcec.so lcec_main.o lcec_devicelist.o lcec_ethercat.o lcec_pins.o lcec_lookup.o lcec_modparam.o lcec_malloc.o -lm -Wl,--whole-archive liblcecdevices.a -Wl,--no-whole-archive -L/lib -llinuxcnchal -lethercat -lrt
chmod -x lcec.so
Compiling realtime lcec_conf.c
Compiling realtime lcec_conf_icmds.c
Compiling realtime lcec_conf_util.c
gcc -o lcec_conf lcec_conf.o lcec_conf_icmds.o lcec_conf_util.o lcec_devicelist.o lcec_ethercat.o lcec_pins.o lcec_lookup.o lcec_modparam.o lcec_malloc.o -Wl,-rpath,/lib -L/lib -llinuxcnchal -lexpat -Wl,--whole-archive liblcecdevices.a -Wl,--no-whole-archive -lethercat -lm
Compiling realtime lcec_devices.c
gcc -o lcec_devices lcec_devices.o lcec_devicelist.o lcec_ethercat.o lcec_pins.o lcec_lookup.o lcec_modparam.o lcec_malloc.o -Wl,-rpath,/lib -L/lib -llinuxcnchal -lexpat -Wl,--whole-archive liblcecdevices.a -Wl,--no-whole-archive -lethercat -lm
(cd configgen ; go build devicelist.go)
/bin/sh: 1: go: not found
make[1]: *** [Makefile:118: configgen/devicelist] Fehler 127
make[1]: Verzeichnis „/home/ich/Downloads/linuxcnc-ethercat-master/src“ wird verlassen
make: *** [Makefile:4: build] Fehler 2Edit:
I've used Git now.
git clone github.com/sittner/linuxcnc-ethercat.git
There were no errors this time,
but the syncToRefClock=“true” still doesn't work.
Last edit: 15 Mar 2026 15:19 by andrax.
Please Log in or Create an account to join the conversation.
- TAKUYA
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 4
15 Mar 2026 16:22 #344318
by TAKUYA
Replied by TAKUYA on topic Ethercat random jitter fix
you are missing the go package.
"sudo apt-get install golang"
then "make" and "sudo make install"
"sudo apt-get install golang"
then "make" and "sudo make install"
The following user(s) said Thank You: andrax
Please Log in or Create an account to join the conversation.
- Atsu
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 3
15 Mar 2026 17:11 #344320
by Atsu
Thank you! I pulled the latest changes and can confirm that it is now working. The dc-phased pin turns true, and I can see the pll- pins getting values other than zero. I did couple restarts and so far there is no grinding noise. I will continue testing to see if its gone for good.
Replied by Atsu on topic Ethercat random jitter fix
@TAKUYA
@Atsu
please check the value of the parameters lcec.0.pll-step
You can do so with this command
halcmd show param lcec.0.pll-step
This parameter will be set at 1000 automatically if you have RTAPI_TASK_PLL_SUPPORT
also I have updated again the repo
if you could be so kind as to download, build and test again, thank you
github.com/grandixximo/linuxcnc-ethercat
Thank you! I pulled the latest changes and can confirm that it is now working. The dc-phased pin turns true, and I can see the pll- pins getting values other than zero. I did couple restarts and so far there is no grinding noise. I will continue testing to see if its gone for good.
The following user(s) said Thank You: TAKUYA
Please Log in or Create an account to join the conversation.
- grandixximo
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 178
- Thank you received: 268
15 Mar 2026 22:07 - 15 Mar 2026 22:10 #344324
by grandixximo
Replied by grandixximo on topic Ethercat random jitter fix
@andrax
Sittner's repository does not support
syncToRefClock
If you want to test Sascha Ittner's code with pll
Set
refClockSyncCycles="-1"
My code is a different repo
github.com/grandixximo/linuxcnc-ethercat
Sasha's code is missing some drivers, he has done a huge rework, he also removed the grind, but used another method, I am still undecided on how to merge his code properly.
Sittner's repository does not support
syncToRefClock
If you want to test Sascha Ittner's code with pll
Set
refClockSyncCycles="-1"
My code is a different repo
github.com/grandixximo/linuxcnc-ethercat
Sasha's code is missing some drivers, he has done a huge rework, he also removed the grind, but used another method, I am still undecided on how to merge his code properly.
Last edit: 15 Mar 2026 22:10 by grandixximo.
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11770
- Thank you received: 3985
16 Mar 2026 03:04 #344341
by rodw
Replied by rodw on topic Ethercat random jitter fix
Take care with merging Sasha's code. The master linuxcnc-ethercat driver is now Scott Lairds repo github.com/linuxcnc-ethercat as it has a workflow that pushes the driver when built across to etherlabs repo on gitlab so we can get the driver with sudo apt install
Please Log in or Create an account to join the conversation.
- grandixximo
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 178
- Thank you received: 268
16 Mar 2026 06:31 #344346
by grandixximo
Replied by grandixximo on topic Ethercat random jitter fix
Honestly, waiting for Scott for some direction, he is not been replying any messages, so at the moment everything is stale, I don't really want to touch core functionality, I'm not sure about the uspace work by Sascha, should linuxcnc take that in as well? We would have to build Sasha's ethercat master as well to enable all of that. Not sure what the community needs
Please Log in or Create an account to join the conversation.
- rodw
-
- Offline
- Platinum Member
-
Less
More
- Posts: 11770
- Thank you received: 3985
16 Mar 2026 09:58 #344350
by rodw
Its just a shame the Ethercat license does not allow linuxcnc to manage it.
Not sure if that helps....
Replied by rodw on topic Ethercat random jitter fix
Thats a but disappointing. Its hard to keep commitment on projects like this. Sasha lost interest and it was badly broken. At one stage, I hosted the hal driver repo briefly when I built the initial 2.9 ISO then Bjarne at etherlab did a deal with Sasha to host it direct. I gladly gave it up. Then Scott did a deal with Sasha to host it and develop it (which he did). So I did some intros and Bjarne helped Scott build workflows to send builds to the etherlab repo so it was hosted and available so that was pretty cool. I see Sasha's page says use Scotts repo and he hadn't made any commits since 2024 until a mad flurry of commits in 2026! Whatever you do etherlab will be very supportive.Honestly, waiting for Scott for some direction, he is not been replying any messages, so at the moment everything is stale, I don't really want to touch core functionality, I'm not sure about the uspace work by Sascha, should linuxcnc take that in as well? We would have to build Sasha's ethercat master as well to enable all of that. Not sure what the community needs
Its just a shame the Ethercat license does not allow linuxcnc to manage it.
Not sure if that helps....
Please Log in or Create an account to join the conversation.
- grandixximo
-
Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 178
- Thank you received: 268
16 Mar 2026 14:43 #344355
by grandixximo
Replied by grandixximo on topic Ethercat random jitter fix
I'll wait and see what Sascha has to say, and wait a bit more to see if Scott will be able to dedicate sometime to the project.
Should I reach out to Bjarne? Or can you let him check the conversation in my PR in Scott's repo?
Should I reach out to Bjarne? Or can you let him check the conversation in my PR in Scott's repo?
Please Log in or Create an account to join the conversation.
- ihavenofish
- Offline
- Platinum Member
-
Less
More
- Posts: 999
- Thank you received: 284
17 Mar 2026 06:11 #344390
by ihavenofish
Can you expand on this? People are allowed to develop one and post it, but it cant be "inside" linuxcnc?
Replied by ihavenofish on topic Ethercat random jitter fix
Its just a shame the Ethercat license does not allow linuxcnc to manage it.
Can you expand on this? People are allowed to develop one and post it, but it cant be "inside" linuxcnc?
Please Log in or Create an account to join the conversation.
Time to create page: 0.181 seconds