Repository navigation
Userspace EtherCAT master for LinuxCNC uspace-v1.4
Pre-releasePackages of the userspace EtherCAT master for LinuxCNC's ecat component: debian12 for Debian 12 (bookworm), debian13 for Debian 13 (trixie). Since 1.1 without lcec_uspace (frozen; keep uspace-v1.0 from MetalMusings/linuxcnc-ethercat for it). See packaging/linuxcnc/README.md.
Install: sudo apt install ./linuxcnc-ethercat-uspace_*_amd64.deb (the file for your Debian).
New in 1.4
Ethernet over EtherCAT (EoE) while an application runs. Until now the EoE thread needed callbacks that only a kernel master has, so in userspace EoE stopped when LinuxCNC took the bus over ("No EoE processing because of missing callbacks!"). Now the Ethernet frames ride in the application's cyclic frames: ecrt_master_send() takes them from the EoE queue (without waiting for a lock, and within a frame budget), the EoE thread only runs the state machines and never sends. A bus without EoE slaves is read as before, with no added work in the servo cycle.
One mailbox, several protocols. A slave has one mailbox; with EoE and SDOs (or other protocols) on the same slave, the master used to hand one reader's mail to another, and a slave with EoE and start-up SDOs never reached OP. Mails are now kept apart per protocol (up to eight per reader), a lost mail is a warning, a CoE dictionary or segment request the slave has not taken is sent again, and two mailbox writes to one slave never share a frame (the AX58100 takes both at the end of the frame and the second replaces the first).
The host's address on an EoE device. New ecrt_slave_config_eoe_host_address(): the master gives the slave's network device (eoe0s<position>) the computer's address and the subnet mask when it configures the slave and after each scan, and brings it up. ecat's eoe: {host-ip: ...} uses it. ethercat-uspace's set-IP request had its flags two bytes off and asked a silent slave for ever; both fixed. A frame for a device that is down is dropped without a message.
Faster start with XDP. The XDP program stays on the network card between masters (a reset of the card's link at every attach cost 2-3 s): on an igc card LinuxCNC's start to OP went from 4.4 s to 1.5 s.
Fixes. The Debian 12 package builds again with libbpf 1.1 (the XDP code used two calls from libbpf 1.4); the kernel modules still build (the shared mailbox code uses plain fields there; its sharing between protocols has not been run in the kernel master).
Tried with an EaserCAT 3000 (SOES and lwIP, a web page) as a slave on a bus with three drives: ping, a web page and SDO reads in OP, about 0.5 Mbit/s each way at 1 ms, no change in the servo thread's jitter; and in LinuxCNC with the machine homing and jogging. Not tried on a bought EoE device, nor with two EoE slaves on one bus.
Works with ecat 0.19 (LinuxCNC 2.10), which needs it for EoE and host-ip; ecat 0.12 to 0.18 and 0.11 (LinuxCNC 2.9) also run on it.