EtherCAT for pycangui: a plugin that scans an EtherCAT ring, sets the slaves' states, reads and writes their objects by CoE (CANopen over EtherCAT), and runs their process data.
A commissioning and diagnostic tool, not a motion controller. On Windows frames go out through Npcap, which works with almost any network adapter, USB dongles included, but does not hold the steady 1 ms cycle that cyclic synchronous modes and distributed clocks need.
Early work. What there is now: choose an adapter, scan, set states, read and write objects, and run the process data -- mapped from the slaves' PDO assignments, sent every few milliseconds by the helper's own thread, its values shown live and its outputs set by hand. Each slave a scan finds is also a device in pycangui's device lists, its process data read and written through the cycle and the rest of its objects by SDO, ready for the CiA 402 plugin to drive. The object dictionary from the slave comes next.
The plugin's pane talks to a helper, a small program of its own, which owns the network card. pycangui starts it when the pane is first shown and stops it with the plugin or the window, so nothing is left holding the adapter.
In pycangui's Plugins menu, from the plugin lists, or install the zip from the releases. It needs pycangui 0.7.0 or later.
| System | Needs |
|---|---|
| Windows 10 or 11, x86-64 | Npcap; the pane says if it is missing |
| Linux, x86-64, or ARM64 from version 0.3 | root or CAP_NET_RAW to open an adapter; glibc 2.35 or later |
Not available on macOS: the helper that drives the network adapter is built only for Windows and Linux.
Setting up, the tests and making a release are in CONTRIBUTING.md.
This plugin puts slaves into Op and runs their process data, which sets outputs and drives acting. pycangui's safety notice applies: know what every slave on the ring will do before you start it, and keep a way to stop the equipment within reach.
If you find the plugin doing something unsafe -- writing to a slave without being asked, or not stopping what it says it stopped -- open an issue.
GPL-3.0-or-later: see LICENSE and NOTICE. The helper links SOEM, which is GPLv3. pycangui itself is Apache-2.0 and never ships this plugin.
EtherCAT® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany. This project is not affiliated with Beckhoff or the EtherCAT Technology Group.