Having mostly put the machine together and found ModbusTCP unsuitable, I took another attempt at Ethercat.
- I installed LinuxCNC 2.9.4 from the ISO on the nearest available beige box (which has a Realtek ethernet card)
- I installed the r8168-dkms driver
- I built ethercat from source to exclude EoE as follows:
- git clone
gitlab.com/etherlab.org/ethercat.git
ethercat-master
- cd ethercat-master/
- git checkout stable-1.6
- ./bootstrap (I didn't have autoconf or libtool installed: they are necessary)
- ./configure --sysconfdir=/etc/ --disable-8139too --enable-userlib --enable-generic --disable-eoe
- make all modules
- sudo su
- make modules_install install
- depmod
- exit
- sudo nano /etc/ethercat.conf
- sudo systemctl enable ethercat.service
- sudo systemctl start ethercat.service
- sudo systemctl status ethercat.service
- sudo chmod 666 /dev/EtherCAT0
- sudo nano /etc/udev/rules.d/99-ethercat.rules
- sudo udevadm control --reload-rules
- I installed linuxcnc-ethercat from the repository
- I installed the CIA402 module:
- git clone
github.com/dbraun1981/hal-cia402
- sudo halcompile --install cia402.comp
And it works very nicely most of the time. See attached ethercat xml file.
I see some "PLL error" failures sometimes, which can only be "solved" by restarting the control process. I've tried adjusting refClockSyncCycles and sync0Shift in accordance with some other threads, but I don't understand what those do or what they should actually be.