Ethercat random jitter fix

  • grandixximo
  • grandixximo's Avatar Topic Author
  • Away
  • Elite Member
  • Elite Member
More
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.

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

More
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:

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 2
[/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.

 
Last edit: 15 Mar 2026 15:19 by andrax.

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

More
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"
The following user(s) said Thank You: andrax

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

More
15 Mar 2026 17:11 #344320 by Atsu
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.
Attachments:
The following user(s) said Thank You: TAKUYA

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

Time to create page: 0.119 seconds
Powered by Kunena Forum