API Reference yaethercat v#0.1.0

Copy Markdown View Source

Modules

The AL state machine of a SubDevice (ETG.1000.6, 6.4.1), through its AL control and AL status registers (5.3).

CoE, the CAN application protocol over EtherCAT, through a SubDevice's mailbox (ETG.1000.6, 5.6): SDO uploads and downloads, which read and write the entries of its object dictionary, by index and subindex.

An EtherCAT PDU, called a datagram here: one command to the SubDevices, with its address, its data and the working counter they increment (ETG.1000.4, 5.4).

An EtherCAT frame: a header of two bytes, with the length of what follows and its type, then one or more datagrams (ETG.1000.4, 5.3). It goes in an Ethernet frame of EtherType 0x88A4, or in a UDP datagram to port 0x88A4 (34980).

The mailbox of a SubDevice: two areas of its memory behind sync managers 0 and 1, one the MainDevice writes and one it reads, each holding one message at a time (ETG.1000.4, 5.6 and 7.2).

The MainDevice of one EtherCAT segment: the process that owns its transport, sends frames, and matches the frames that come back to what was sent.

The process data of a segment as one image in logical memory: the outputs of every SubDevice, then their inputs, each SubDevice's part mapped to its sync manager by an FMMU.

The registers of an EtherCAT SubDevice controller (ESC) that this library uses, by the names ETG.1000.4 clause 6 gives them, and the layout of the sync manager and FMMU entities.

The Slave Information Interface: the EEPROM of a SubDevice, which describes it (ETG.1000.6, 5.4).

A SubDevice as a scan found it: where it is, who it is, what its controller (ESC) can do, and its SII.

How EtherCAT frames get to the SubDevices and back: the behaviour of a transport, which an EtherCAT.MainDevice opens and owns.

Raw Ethernet on macOS, through a BPF device (/dev/bpfN).

Raw Ethernet on Linux, through a packet socket (AF_PACKET) that OTP's :socket opens: frames of EtherType 0x88A4 only, on one interface, and none this machine sent.

EtherCAT frames in UDP datagrams (ETG.1000.4, 5.3.2), sent to port 0x88A4 (34980) of a host unless another is given, and answered from there.

Mix Tasks

Scans the EtherCAT segment on an interface and prints its SubDevices: where they are, who they are, their AL state, their mailbox, sync managers and the PDOs their SII lists.