Repository navigation
ecat ecat-v0.20
Pre-releaseecat for LinuxCNC 2.10. There are no 2.10 packages for Debian yet, so the main way to install is for a run-in-place LinuxCNC; there is a package too.
Install
First the userspace master, linuxcnc-ethercat-uspace 1.4 from MetalMusings/ethercat (it is what 0.19 and 0.20 were tried with; EoE and eoe.host-ip need it): sudo apt install ./linuxcnc-ethercat-uspace_*_amd64.deb.
- Run-in-place LinuxCNC: unpack
ecat-rip-0.20-debian13.tar.gz(or-debian12) and run./install. It putsecat.soin your tree'srtlibandecatsetupin~/.local/bin;./install --uninstalltakes it away.ecat.sois built against one LinuxCNC, commit b0e7b191b9 (2.10.0~pre2-436): the installer compares your tree's HAL headers with that build's and refuses on any difference (a different HAL API could crash a machine), and then says how to build ecat for your LinuxCNC from source. - LinuxCNC 2.10 package:
linuxcnc-ecat_*.deb(debian12, debian13).
LinuxCNC 2.9 users take ecat-v0.11. The window, ecatsetup --gui, needs python3-pyqt5. To try ecat without disturbing your setup: getting started. See the README.
What is new in 0.20
Shorter servo periods, and what to expect. On the plasma cutter (three Rtelligent ECT60 drives, an EaserCAT 7000, an Intel N100 with an igc card on xdp-native) LinuxCNC ran at 250, 200, 150 and 125 us with the machine moving and a heavy CPU load (stress-ng, 10 minutes each at 150 and 125 us). 125 us is the shortest these drives take: at 100 us an ECT60 refuses SYNC0 (AL 0x0036) and the bus never reaches OP. What was seen, the limits and how to measure your own: Servo period and performance. One machine, one kind of drive: not a guarantee for yours. 1 ms stays the usual setting.
The component
master: irq-cpuandcpu. Pins the network card's interrupts (and the master's threads) to a CPU, normally the isolated one the servo thread runs on (irq-cpu: 3withisolcpus=3). By default they are handled on the CPUs that also run the GUI and the mouse, and at 250 us and shorter a lost cycle came now and then (it stops the drives, by design). With the interrupts pinned none was seen in the later runs, three runs of 3 to 10 minutes, so this is a strong hint, not proof.- The automatic SYNC0 shift's margins are a sixth of the servo period when that is under 50 us (from 300 us up as before). With 50 us each, a 125 us period left 25 us for the spread of the frames' send time and one late frame sent SYNC0 to the three-cycle position for the rest of the run.
unused: trueper slave. A slave that is on the bus but not used by LinuxCNC is compared with the bus at start and then left alone: no configuration, no pins, it stays in PREOP. (A slave that is not in the file at all was always treated so.) A slave that is in the file and does not reach OP still stops every drive: the working counter is for the whole domain.- Behaviour change:
ecat.0.all-opmeans that every slave of the file is in OP. It used the master's bus-wide state, so a slave that was only on the bus kept it false. Thestate-*pins still tell the whole bus. The event log's AL states follow the slaves of the file too.
EtherCAT Setup
- Test page, Synchronisation card: the
pll-errspread, the room for two cycles (what decided three cycles at 125 us), where the network card's interrupts are against the isolated CPU, and what was measured on the drives. Remember this period for the drives... keeps a good (or refused) run; the results shown on the slave's page come with the program (ECT60: 100 to 250 us) and your own go to~/.config/ecatsetup/measured/sync0.yaml. - Slave page: the SYNC0 cycle the slave gets (servo period times factor), Measured on the bus, a warning at or below a refused period, and Used by LinuxCNC.
- Docs: Measured SYNC0 cycles.
Not tried: a start-up burst of lost cycles (about 1.4 s, 3 s after the bus is activated) remains at 150 us and shorter; the machine is in E-stop then, but do not switch it on in the first seconds. Serial channels (EL6021) are still only tried over a real wire against a slave of our own, not on a terminal; EoE only on one slave of our own. Two EoE slaves on one bus, and the Remember this period button on a long real run, were not tried.