How does EtherCAT work?

How does EtherCAT work?

Concept illustration, not a wiring drawing or a fixed PDO map. The cycle range shown is not a performance guarantee for every device; the normal return path is explained below.

How does EtherCAT work?

EtherCAT exchanges control data by processing an Ethernet frame as it passes through the field devices. The master initiates the transfer. Each device’s EtherCAT controller handles the mapped data while forwarding the frame, and the completed frame returns to the master. The essential idea is shared access to a configured process image—not a separate application-level request and reply for every device. [1]

Start with the EtherCAT overview for the wider technology picture. Here, the focus is one working cycle: which bytes move, who owns them, what makes them valid and when they become useful to the control task. The examples assume classic, directly transported EtherCAT; other EtherCAT speed classes and specialized network bridges need their own design checks.

Start with the data the machine actually needs

Worked example, not a vendor configuration: imagine three devices. A provides 16 digital inputs, B provides a pressure value, and C is a servo drive. Assume all three support the following mapping and one LRW (Logical Read Write) operation. No drive-enable command or ready-to-import PDO profile is being specified.

Worked map: 16 process-data bytes in one logical range
Offset / sizeValue and ownerAt the master
0–1 / 2 bytesA: 16 digital input bitsInput / TxPDO
2–3 / 2 bytesB: pressure, UINT16Input / TxPDO
4–5 / 2 bytesC: controlwordOutput / RxPDO
6–9 / 4 bytesC: target position, INT32Output / RxPDO
10–11 / 2 bytesC: statuswordInput / TxPDO
12–15 / 4 bytesC: actual position, INT32Input / TxPDO

Choose the illustrative logical base address 0x00010000. The map then occupies 0x00010000–0x0001000F. These are offsets in a logical process-data range, not PLC register numbers or CoE object indexes. C consumes 6 output bytes; A, B and C supply 10 input bytes between them. The example therefore carries 16 process-data bytes.

For B alone, assume 0.01 bar per raw count. A received value of 625 means 6.25 bar. That conversion comes from our stated assumption, not from EtherCAT. A different pressure instrument could use another scale, a floating-point value or additional status fields. With a 4–20 mA input module, the electrical range and the module’s raw-value representation must both be known.

Now ask what a second reading of 625 proves. Perhaps the pressure is steady; perhaps the measurement has stopped updating. Use a device status, sample counter or timestamp where the device provides one. Neither a repeated value nor a successful transfer establishes measurement accuracy or calibration. Those are separate checks.

Follow that map through one transfer

The PLC or motion application writes its commands into the master’s output image. In this example, those commands occupy C’s six output bytes. The master then builds the scheduled EtherCAT frame. Depending on the controller, task execution and I/O exchange may be phased differently; do not assume that reading inputs, running the application and transmitting outputs are one indivisible operation. [3]

At A, the EtherCAT Slave Controller (ESC) supplies the digital input data. At B, it supplies the pressure data. At C, mapped output data is delivered to the device and mapped feedback is inserted into the passing transfer. The frame is not held at each device while its application CPU composes a fresh reply. This is the purpose of on-the-fly processing. [1]

On a normal two-port line, the last device closes the forward path into the return path. The frame travels back through the same cable route using the other transmission direction. On this normal return leg, the devices forward the frame rather than each producing another set of measurements. The physical wiring can look like a line while the communication path is a logical ring. Topology and port orientation determine the actual route. [10]

Back at the master, reception is only the beginning of validation. The expected datagrams, their working counters and the devices’ communication states need to agree with the configuration. A number appearing on a SCADA display is not proof that this cycle supplied a valid new sample. [11]

The master needs a suitable Ethernet interface, driver and EtherCAT software. Field devices need an ESC implementation; an ordinary Ethernet socket does not supply that functionality. The master/device relationship is therefore both a scheduling role and a hardware distinction, not just a name assigned to any networked product. [1]

What the frame contains—and what it does not

For direct transport, the Ethernet frame uses EtherType 0x88A4. Its payload contains an EtherCAT header followed by one or more datagrams. A datagram specifies an operation, address and length, carries the data and ends with its own WKC. A frame can therefore contain several independently checked accesses; there is no single universal “correct WKC” for an entire network. [2]

PDO names describe the application’s process-data arrangement. They do not mean that every PDO must occupy its own Ethernet frame. RxPDO is received by the field device; TxPDO is transmitted by it. At the master, these become outputs and inputs respectively. Keep that viewpoint explicit when checking a servo drive’s command and feedback mapping. [3]

CoE carries the CANopen application model, including object-dictionary concepts, into EtherCAT. That is not a statement that classical CAN frames circulate on the EtherCAT cable. Some simple EtherCAT devices have no CoE dictionary at all. [5]

Nor should the comparison be reduced to “all Ethernet uses request/reply.” Ethernet does not prescribe one application exchange model. The relevant differences from a conventional Ethernet installation concern frame handling, device functions and scheduling. Direct cyclic EtherCAT does not require an IP address for each field device; optional service or tunneling functions are a separate matter. [1]

Why this three-device example expects a WKC of five

The Working Counter is not simply a device count. For the single LRW command in this example, a successful read contributes one, a successful write contributes two, and both operations at the same device contribute three. The weighting belongs to the read/write command. Do not apply the “write adds two” rule to an independent write-only command. [2]

Expected contribution to the example LRW
DeviceAccess from the masterWKC
ARead digital inputs+1
BRead pressure+1
CWrite commands and read feedback+3
TotalExpected weighted total5

A returned value of four tells you that the expected contribution is missing. It does not identify B as the failed device: losing A’s read contribution would produce the same number. When several devices share a datagram, their WcState indications may also go invalid together. Use individual AL states and port diagnostics to locate the fault instead of replacing every device marked red. [11]

Conversely, a WKC of five is not a certificate for the machine. It does not validate a pressure scale, guarantee fresh acquisition or prove that an axis reached its target. A multi-byte access counter should not be treated as a semantic check of every mapped byte. Transport acceptance, drive acceptance and completed motion are different observations. [2]

The memory machinery behind the exchange

FMMUs map addresses. A Fieldbus Memory Management Unit connects a logical data range to the device’s local memory. The master configures that relationship. A device being third in the cable chain does not permanently assign it the third slot in a frame. Network position, station address and process-data offset are distinct concepts. [2]

SyncManagers coordinate access. They manage exchange between the EtherCAT side and the local application. Buffered process-data handling makes completed data groups available to the consumer; mailbox handling uses a handshake for messages. Neither function means that all devices sampled their inputs at the same instant. On-the-fly handling also does not mean blindly applying a damaged frame: master-written SyncManager buffer changes are accepted only after a valid FCS check. [2]

A useful engineering distinction is: FMMU selects where the data belongs; SyncManager manages a consistent handover; Distributed Clocks provide a time reference. After handover, the drive’s own control loops and encoder feedback still determine the physical result. Treating every stage as “the EtherCAT delay” hides the stage that actually needs attention.

What must be configured before the cycle can run

During startup, the master checks the discovered layout against the project and establishes the addressing and data-access configuration. The correct ESI XML describes device capabilities and process-data options to the engineering tool. Check the actual product and revision as well as the selected map. A file with the right family name is not sufficient evidence that every variant supports the chosen behavior. Engineering software and the device documentation must agree. [6]

Position-based replacement is convenient, but two identical devices accidentally exchanging places can remain indistinguishable by product type alone. Where supported, explicit identification or a station alias can provide an additional check. The implementation and supported settings are device-specific; do not assume that every EtherCAT node offers the same identification feature. [7]

Use PDOs for the data the control task needs repeatedly. Use supported SDO access for on-demand settings or diagnostic parameters. An SDO transaction is not a substitute for a cyclic setpoint path. Before changing a drive map, check the exact interface and operating mode in its model-specific manuals; a manual collection is a starting point, not proof that every drive in a brand’s catalogue supports EtherCAT. [4]

The usual startup progression
StateWhat it means for communication
INITInitialization; no normal process-data exchange.
PREOPSupported mailbox and parameter access; normal process data is not running.
SAFEOPInput process data can be available; normal output operation is not yet enabled.
OPInput/output process-data operation is available. The drive’s own operating state still matters.

The normal progression is INIT → PREOP → SAFEOP → OP. BOOT is a separate firmware-update state on devices that support it. OP does not mean a motor is enabled, and SAFEOP must not be read as a certified safe machine state. A drive state machine and a Safe Torque Off function answer different questions. [8]

Arrival time is not necessarily execution time

Distributed Clocks allow supported devices to act against aligned local clocks. The system compensates for propagation delays and clock differences so that a configured sampling or output event can be tied to a time reference rather than to the instant a frame arrives. The required data still has to arrive before its deadline. Synchronization does not rescue a setpoint that misses the intended update. [1]

Select and verify the actual operating mode. Free Run, SyncManager synchronization and DC Sync are not interchangeable. A DC-capable device may not have DC enabled by default. When assessing real-time performance, check the source of the measurement timing as well as the master task. The same distinction matters when EtherCAT feedback feeds a PID loop. [9]

A real counterexample to “EtherCAT means synchronized fast inputs”: Beckhoff lists a typical 3 ms input filter for the eight-channel EL1008 digital input terminal. Its Distributed clocks field is marked “–”. These are device properties, not network-speed settings. [12]

Reading that terminal on an illustrative 1 ms network schedule does not remove its 3 ms filtering characteristic. A fast encoder output signal needs a suitable acquisition interface; the EtherCAT label alone is not the selection criterion. This EL1008 example is separate from the hypothetical 16-input A device used earlier.

From 16 application bytes to a wire-time budget

The earlier map is not the complete packet. For a small calculation, assume one LRW datagram, no VLAN tag, a 100 Mbit/s link and no additional datagrams. The EtherCAT and datagram field sizes come from the ESC technology documentation. [2]

The EtherCAT payload is 2 + 10 + 16 + 2 = 30 bytes: EtherCAT header, datagram header, process data and WKC respectively.

Ethernet minimum-size padding brings the payload area to 46 bytes. Add the 14-byte Ethernet header and 4-byte FCS: 64 bytes. Including the 8-byte preamble/SFD and an inter-frame gap equivalent to 12 byte-times gives a scheduling cost of 84 byte-times. The gap is idle time, not twelve transmitted application bytes. [1]

At 100 Mbit/s, 84 × 8 ÷ 100,000,000 = 6.72 µs. This is the transmission-time budget for that minimum-sized frame including the gap. It is not the complete EtherCAT cycle or the sensor-to-motion response.

Multiplying 6.72 µs by the number of devices would also miss the point: each device does not recreate a complete packet before forwarding it. Propagation, ESC handling, return travel, task scheduling, input filtering and output timing all need their own treatment. Latency and link bit rate are different quantities. More data or multiple task rates can require additional frames, so system limits cannot be inferred from this small calculation alone.

Inspect a transfer without turning the inspection into a fault

First establish what should be present. Record the connected devices and sensors, their identity and revision, port order, mapped lengths and master-relative directions. Check signed versus unsigned values, bit positions and engineering units. A successful scan is not a physical identification test for the machine’s actuators.

Then inspect the master diagnostics or a supported trace. Look at transmitted and returned traffic, expected and actual WKC, AL state and any relevant DC deviation. Wireshark’s ecat display filter isolates EtherCAT. Fields such as ecat.cmd, ecat.cnt and ecat.data expose the operation, counter and bytes. [13]

Separate outgoing traffic from the returned result. A counter at initialization on a transmitted datagram is not the counter after device processing. Compare direction, command, address and length at the chosen capture point. A filter such as ecat.cnt == 0 is not, by itself, a general-purpose fault detector if outgoing frames are also visible.

Do not insert an ordinary Ethernet switch into a running classic EtherCAT line to create a capture point. Use a supported master trace or a suitable TAP arrangement. Branches use EtherCAT junctions; cable selection, link distance and port orientation must match the equipment. The normal return path is not the same thing as enabled cable redundancy. [10]

Use symptoms to choose the next check
ObservationCheck next
Link is present, but OP is not reachedRead the AL error; verify ESI/revision, PDO lengths and required startup settings.
Several WcState flags fail togetherIdentify the shared datagram and inspect devices individually before assuming multiple hardware failures.
WKC is correct, but a value is implausibleCheck mapping, signedness, units and scaling. Successful access cannot validate all application meanings.
Data disappears intermittentlyCorrelate frame loss with port errors, connectors, cables and supply continuity.
A command is visible, but there is no motionCheck the drive state, operating mode, interlocks, power stage and independent safety permissions.

Preserve the diagnostic evidence and check power-supply conditions before changing hardware. These are narrowing questions, not a claim that one symptom conclusively identifies a failed part. [11]

What a useful commissioning record should establish

A defensible record answers three questions: Did the intended device exchange the intended bytes? Was the returned data valid for the