EtherCAT Frame Decoder
Decode EtherCAT hexadecimal frames into the EtherCAT frame header and individual datagrams. Inspect command codes, datagram index, addressing fields, data length, circulating and more-datagrams flags, IRQ values, payload bytes and Working Counter values.
| # | Offset | Command | Index | Address | Length | C | M | IRQ | Data | WKC |
|---|
—
—
What Is an EtherCAT Frame?
EtherCAT is an industrial Ethernet protocol designed for fast deterministic
communication between controllers and distributed field devices. EtherCAT
traffic can be carried directly inside an Ethernet II frame using EtherType
0x88A4.
Inside the Ethernet payload, an EtherCAT frame begins with a two-byte header. That header describes the length and protocol type, followed by one or more EtherCAT datagrams.
EtherCAT Ethernet II Frame
Ethernet II:
Destination MAC 6 bytes
Source MAC 6 bytes
EtherType 2 bytes
EtherCAT payload variable
Optional padding
Ethernet FCS often removed by capture hardware
EtherCAT directly over Ethernet normally uses EtherType
0x88A4. Packet-capture software frequently omits the physical
Ethernet FCS, so this calculator does not require a final Ethernet CRC.
EtherCAT Frame Header
The EtherCAT payload begins with a 16-bit little-endian header.
Bits 0–10
Length
Bit 11
Reserved
Bits 12–15
TypeThe length specifies the number of EtherCAT datagram bytes following the two-byte EtherCAT header.
EtherCAT Protocol Type
The upper four bits of the EtherCAT header contain the protocol Type field.
For ordinary EtherCAT command datagrams, the commonly encountered type value is
1.
Header word:
0x100C
Length:
0x00C
= 12 bytes
Type:
0x1
Because the header is transmitted little-endian, that value appears on the
wire as bytes 0C 10.
EtherCAT Datagram Structure
CMD 1 byte
IDX 1 byte
ADP 2 bytes
ADO 2 bytes
Length/C/M 2 bytes
IRQ 2 bytes
DATA N bytes
WKC 2 bytesThe minimum datagram therefore consumes twelve bytes even when its data length is zero.
EtherCAT Command Codes
| Code | Command | Description |
|---|---|---|
| 0x01 | APRD | Auto Increment Physical Read |
| 0x02 | APWR | Auto Increment Physical Write |
| 0x03 | APRW | Auto Increment Physical Read Write |
| 0x04 | FPRD | Configured Address Physical Read |
| 0x05 | FPWR | Configured Address Physical Write |
| 0x06 | FPRW | Configured Address Physical Read Write |
| 0x07 | BRD | Broadcast Read |
| 0x08 | BWR | Broadcast Write |
| 0x09 | BRW | Broadcast Read Write |
| 0x0A | LRD | Logical Read |
| 0x0B | LWR | Logical Write |
| 0x0C | LRW | Logical Read Write |
| 0x0D | ARMW | Auto Increment Read Multiple Write |
| 0x0E | FRMW | Configured Address Read Multiple Write |
EtherCAT Datagram Index
The IDX byte is used to associate a transmitted datagram with its corresponding response. It is an eight-bit value and is independent of the command code and device address.
CMD:
04
IDX:
21
The datagram index is:
0x21 = 33EtherCAT ADP and ADO
Physical EtherCAT commands carry two 16-bit address fields: ADP and ADO. Their interpretation depends on the command type.
ADP
Address Position / Configured Station Address
ADO
Address OffsetFor auto-increment commands, ADP participates in position-based addressing. For configured physical commands, ADP can represent the configured station address and ADO identifies the register or memory offset.
EtherCAT Logical Address
Logical commands such as LRD, LWR and LRW use the four bytes occupying ADP and ADO as one 32-bit logical address.
Address bytes:
00 10 00 00
Little-endian logical address:
0x00001000The calculator therefore reports both ADP/ADO and the combined logical address when a logical command is detected.
EtherCAT Datagram Length
Each datagram contains a 16-bit little-endian field whose lower eleven bits represent its data length.
Datagram length word:
Bits 0–10
Data Length
Bit 14
Circulating / C flag
Bit 15
More Datagrams / M flagReserved bits are retained separately by the parser so that unexpected values do not silently alter the calculated payload length.
More Datagrams Flag
The M bit indicates that another EtherCAT datagram follows the current datagram in the same EtherCAT frame.
M = 0
Current datagram is final
M = 1
Another datagram followsThe decoder follows the actual encoded datagram lengths and can list multiple commands from a single frame.
EtherCAT Working Counter
Every EtherCAT datagram ends with a two-byte Working Counter, commonly called WKC. EtherCAT slave processing modifies the counter according to whether the addressed operation was successfully processed.
WKC bytes:
01 00
Little-endian:
0x0001
= 1A WKC of zero can indicate that no applicable slave processed the datagram, while larger values can represent successful participation by one or more devices. The exact expected counter depends on the topology and command.
EtherCAT IRQ Field
The two-byte IRQ field is present in each EtherCAT datagram before the data area. It is decoded as a 16-bit little-endian value and shown without assigning application semantics that cannot be proven from the packet alone.
EtherCAT vs Standard Ethernet
EtherCAT still uses standard Ethernet framing, MAC addresses and physical-layer technology, but EtherCAT processing differs from normal store-and-forward application communication. EtherCAT slave controllers can process relevant data while the frame passes through them.
| Feature | EtherCAT | Typical Ethernet Application |
|---|---|---|
| EtherType | 0x88A4 for native EtherCAT | Depends on upper protocol |
| Datagrams per Ethernet frame | One or more | Protocol-specific |
| Working Counter | Yes | No equivalent Ethernet field |
| Device processing | On-the-fly architecture | Usually full-frame reception first |
EtherCAT Frame Decoder FAQs
What EtherType does native EtherCAT use?
How long is the EtherCAT frame header?
Is the EtherCAT header little-endian?
What does APRD mean?
What does FPRD mean?
What does LRW mean?
What is the EtherCAT WKC?
Can one EtherCAT frame contain multiple datagrams?
What does the M flag mean?
Does this decoder require an Ethernet FCS?
Can this tool identify PDO signal names?
Decode EtherCAT Commands and Working Counters
Inspect EtherCAT frame headers, physical and logical addresses, datagram commands, payload lengths, multi-datagram flags, IRQ fields and Working Counter values directly from hexadecimal industrial Ethernet traffic.