Repository navigation
ecat ecat-v0.21
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.5 from MetalMusings/ethercat (0.21 needs it for the DC reference clock, below): sudo apt install ./linuxcnc-ethercat-uspace_*_amd64.deb.
- Run-in-place LinuxCNC: unpack
ecat-rip-0.21-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.21
Tuning a servo drive in CSP, without LinuxCNC. In CSP the drive does the control; what LinuxCNC sees is the following error, and FERROR has to allow for it. EtherCAT Setup's new Response card (Test page) moves a drive out and back, records every servo cycle, and says what the error is made of: the bus's two cycles, a command filter in the drive, its position loop, the part that follows the acceleration, overshoot, an offset. Look for settings in the drive lists the drive's settings that may be the cause (from its quirk file, then by name in its own dictionary); Try it writes one to the drive's RAM with its own value kept, the next measurement is compared with the last, and Keep as setting / Undo end it. Last, FERROR and MIN_FERROR from the result. A guide: Tuning a servo drive, step by step; the start page has the task. On a plasma cutter's Rtelligent ECT60 drives this found 0x2009 "Filter Time" at its maximum (25.6 ms): with 2 ms the lag went from 17 to 4.6 ms and the error at 100 mm/s from 1.65 to 0.49 mm.
Feedforward from LinuxCNC (cia402.feedforward). For drives with 0x60B1 (velocity offset) and 0x60B2 (torque offset): the cia402 profile works them out from pos-cmd every cycle, in step with the target, 0 whenever the drive is not following in CSP and without a kick at enable. The Response card measures the torque per acceleration, tries the feedforward in the test and keeps it in the file; Apply writes the joint's velo-scale for it. The drive must be told to use them (a vendor setting). Tried against a simulated drive on a real bus (an EaserCAT 3000 acting as a CiA 402 drive) and in LinuxCNC with it: 40 mm moves at 100 mm/s, joint.0.f-error under 0.09 mm with feedforward, "joint 0 following error" without. Not tried on a real drive with these objects (the ECT60 has neither).
Behaviour change: the DC reference clock is the first slave with dc: (an assign-activate other than 0x0000), after ETG.1020: "the first device that should be synchronized is used as the reference clock". The master took the first DC-capable slave on the bus, also one the file leaves unused or does not have, and requested OP of it, which an unconfigured drive refuses (PREOP + ERROR in the log). Where the first DC-capable slave has no dc: (an EK1100, an I/O terminal), the clock moves to the first slave with dc:. Tried on two buses: three unused ECT60 with a DC slave after them (now the clock, no error), and an EK1100 + terminals + two ECT60 (the clock moved from the coupler to the first ECT60: all OP, two cycles, PLL error within 3 us). ecatsetup --check names the reference clock. Needs the master 1.5; with an older master the choice has no effect.
EtherCAT Setup, also
- Master page: Interrupts on CPU and Master threads on CPU (
irq-cpu,cpu), with the isolated CPUs named. - Measured SYNC0 results carry the slave's revision;
ecatsetup --device-datalists the quirk files and results, yours and the shipped ones, and what looks stale or wrong. - ESI files are kept parsed between runs (
~/.cache/ecatsetup): with Beckhoff's whole ESI folder the window opened in 53 s, now in under 2 s. - The drive test sets
velo-scalein CSP too, and writes its limits to a drive whose dictionary was not read (objects of 16 and 32 bits were taken as missing).
Not tried: the Response card's Try it on a drive other than the ECT60; feedforward on a real drive; homing and mode changes with feedforward on a bus; the DC reference clock change in LinuxCNC on turner's bus (halrun only, no motion).