Repository navigation
ecat 0.23
Pre-releaseecat for LinuxCNC 2.9 and 2.10, with a new part: the real-time check (the Timing tab), for any LinuxCNC computer, EtherCAT or not.
Install
First the userspace master, linuxcnc-ethercat-uspace 1.5 from MetalMusings/ethercat (unchanged since 0.21): sudo apt install ./linuxcnc-ethercat-uspace_*_amd64.deb. Then the file for your LinuxCNC:
- LinuxCNC 2.9 (2.9.4 or newer, as packages):
linuxcnc-ecat_*+lcnc2.9.debian13_amd64.deb(or.debian12). - LinuxCNC 2.10 run-in-place: unpack
ecat-rip-0.23-debian13.tar.gz(or-debian12) and run./install.ecat.sois built against LinuxCNC commit b0e7b191b9 (2.10.0~pre2-436); the installer refuses if your tree's HAL headers differ and says how to build from source. - LinuxCNC 2.10 package:
linuxcnc-ecat_*.debwithout+lcnc2.9.
The packages now recommend stress-ng and ethtool, which the real-time check uses; apt installs them with ecat. The window, ecatsetup --gui, needs python3-pyqt5. See the README and getting started.
What is new in 0.23
The real-time check: where jitter comes from, and what to change. A new Timing tab in EtherCAT Setup, and ecatsetup --rt-check on the command line (docs):
- Measures how late every real-time thread starts, cycle by cycle: beside a running LinuxCNC (any I/O: Mesa, EtherCAT, parallel port; nothing that talks to the I/O is loaded) or the INI's threads alone in halrun; at rest, as the computer is used, or under
stress-ng. A small probe component,ecat_rtprobe, is shipped besideecat.sofor this. Twice for a baseline, so that a later change counts only when it moves the numbers by more than chance does. - Reads the computer: kernel and its parameters, isolated CPUs, hyperthread siblings, frequency and idle states, every interrupt and where it is handled, network cards (coalescing, EEE), graphics, ACPI GPEs, and with As root SMIs and
rtla timerlat. Late cycles are matched against what happened at the same time. - Findings from a rule catalogue (YAML, 41 rules in five areas; your own rules in
~/.config/ecatsetup/rtrules/), each with what was seen, why it matters, what to do, risk, cost, how to check it, how to undo it and its source. - Look or Improve. In Improve, a run-time change is tried with one button (it asks first, runs with sudo, never needs a restart), measured again, and kept or undone. Every change is logged, with an undo script.
- To do yourself: the changes to make lasting, written out ready to use: the new
GRUB_CMDLINE_LINUX_DEFAULTline, sysctl and modprobe files, a start-up service, the BIOS. - Save report for asking for help.
Tested on two of our computers: settings that were known to be right were taken away one at a time, and the check found them again. A user then tried it alone on a third computer, using only the window: a Mesa Ethernet machine with LinuxCNC 2.9.4. Fixed from that test:
- With load now says when
stress-ngis missing, and does not start. - A finding says when
ethtoolis missing. - Two new rules: an isolated CPU that no real-time thread uses (for example
isolcpus=1,2,3with the threads on 3 →isolcpus=1,3), and the Mesa card's interrupt on the real-time CPU. The Mesa interrupt rule has not been tried on a Mesa card yet.
Choose the machine's INI file before measuring, even when LinuxCNC is not running. The check finds the I/O's network card from it. Without it, the rules about that card cannot see it.
The EtherCAT component (ecat.so) is unchanged since 0.22.1; only the probe ecat_rtprobe.so is new.