Repository navigation
Releases
Userspace EtherCAT master for LinuxCNC uspace-v1.5
Packages 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.5
A DC reference clock the application selects counts at once. ecrt_master_select_reference_clock() only stored the choice; the master found the reference clock again only after the next bus scan. An application selects it after creating its slave configurations, which is mostly after the scan, so the choice changed nothing: the first DC-capable slave on the bus stayed the clock, and, as the reference clock always is, was requested to OP whether the application configured it or not. An unconfigured drive refuses that (AL 0x001E, the slave in PREOP + ERROR, two ERROR lines in the log). Now the selection finds the clock and the transmission delays at once when the slaves are scanned and the master is not active; activation writes the offsets and delays again.
ecat 0.21 uses it to follow ETG.1020 (Protocol Enhancements, 21.1): "the first device that should be synchronized is used as the reference clock", i.e. the first slave of its configuration with DC, never a slave it leaves unused. New test: tests/test_sim_dc_ref_select.c.
Tried on a bus with three ECT60 drives (unused), an EaserCAT 7000 and an EaserCAT 3000 with DC: the master now uses slave 4 as the reference clock, slaves 0-3 stay in PREOP without an error, SYNC0 shift and two cycles of turn-around as before.
Works with ecat 0.21 (LinuxCNC 2.10), which needs it for the reference clock; ecat 0.12 to 0.20 and 0.11 (LinuxCNC 2.9) also run on it (they do not select a reference clock, so nothing changes for them).
Userspace EtherCAT master for LinuxCNC uspace-v1.4
Packages 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.
Userspace EtherCAT master for LinuxCNC uspace-v1.3
Packages 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.3
Messages through the master's log. With the AF_XDP transport (xdp-skb, xdp-native), libbpf and libxdp printed straight to stderr, and the raw, XDP and CCAT transports printed their own errors the same way. None of it reached the master's log, so an application that takes the log through ecrt_lib_init() (ecat's event log, EtherCAT Setup's Messages from the master, its report) never saw why a transport failed to open. Now:
- libbpf's and libxdp's messages go through the master's log with their level (debug messages are dropped);
- the lines they print on every start of a working system are left out: the ELF sections libbpf does not know (
skipping unrecognized data section) and libxdp's fallback to a single program without a mounted bpffs; - the transports' errors are logged as errors (
EtherCAT ERROR: XDP: Failed to create XSK socket: ...), a stale XDP program as a warning.
Only the list of transport names that the tool prints stays on stderr. All of it runs when a transport opens or closes, never in the cyclic path.
Tried on a bus with xdp-native on an igc card (no libbpf lines any more) and on lo, which has no native XDP (the kernel's message, libxdp's and the transport's error come as WARN, INFO and ERR log lines).
Works with ecat 0.12 and later (LinuxCNC 2.10) and ecat 0.11 (LinuxCNC 2.9); needs the fork's ecrt_master_request_al_state(), ecrt_master() and ecrt_master_get_slave() (all in 1.1 and later).
Userspace EtherCAT master for LinuxCNC uspace-v1.2
Packages 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.
New in 1.2: the ethercat-uspace tool offers to start a master when a command finds none (on a terminal it shows sudo ethercat-uspace start, asks [y/N], starts the master and runs the command again; with the kernel master loaded it stops that first). No offer for start/stop/version, as root, while LinuxCNC holds the interface, or with ETHERCAT_USPACE_NO_PROMPT set.
Works with ecat 0.12 (LinuxCNC 2.10) and ecat 0.11 (LinuxCNC 2.9); needs the fork's ecrt_master_request_al_state(), ecrt_master() and ecrt_master_get_slave() (all in 1.1 and later).
Userspace EtherCAT master for LinuxCNC uspace-v1.1
Packages 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.