Welcome to Firefly
Switch language
Firefly Docsss
Last Updated: 2026-08-27 07:36:09

EtherCAT Overview

Overview

1.1 Introduction to EtherCAT

EtherCAT (Ethernet for Control Automation Technology) is a real-time Ethernet technology for industrial automation. It uses the standard Ethernet physical layer, but slaves typically read output data and write input data directly as a frame passes through, reducing the latency introduced by forwarding frames from one slave to the next.

EtherCAT is commonly used in the following scenarios:

  • Servo drives and multi-axis motion control.
  • Industrial I/O, sensors, and actuators.
  • Robots, CNC equipment, and automated production lines.
  • Measurement and control systems that require distributed clock synchronization.

A typical topology is shown below:

Linux EtherCAT master

        ├── Slave 0: Servo drive / I/O

        ├── Slave 1: Servo drive / I/O

        └── Slave N: Sensor / actuator

An EtherCAT network should use a dedicated Ethernet interface. The master directly transmits and receives Layer 2 EtherCAT frames through this interface. The interface generally has no IP address and should not be managed simultaneously by NetworkManager, a DHCP client, or standard network services.

1.2 Introduction to the IgH EtherCAT Master

The IgH EtherCAT Master is an open-source Linux EtherCAT master implementation provided by the EtherLab project. Its core runs in kernel space, while user applications communicate with the master through a character device and libethercat.

The IgH master mainly consists of the following components:

ComponentCommon file or interfaceFunction
Master kernel moduleec_master.koManages the EtherCAT bus, slave states, process data, and clock synchronization
Network driverec_generic.ko or a dedicated driverConnects the master to the physical Ethernet interface; dedicated drivers generally provide better real-time performance
Character device/dev/EtherCAT0Interface between the kernel master and user-space tools and applications
User-space librarylibethercat.soProvides the ecrt_* application development API
Command-line toolethercatScans slaves, displays PDOs, reads and writes SDOs, changes states, and diagnoses the bus
Master applicationUser applicationPerforms cyclic communication, state-machine processing, and application control according to the device configuration
EtherCAT application / ethercat tool


            libethercat.so


            /dev/EtherCAT0


             ec_master.ko


 Generic NIC driver or platform real-time NIC driver


             EtherCAT slaves

Official IgH API documentation:

1.3 Basic Terminology

TermMeaning
MasterEtherCAT master responsible for discovering, configuring, and cyclically accessing slaves
SlaveEtherCAT slave, such as a servo drive, I/O module, or sensor
PDOProcess Data Object, real-time process data exchanged cyclically
SDOService Data Object, generally used for acyclic parameter access and device configuration
CoECAN application protocol over EtherCAT, a commonly used object dictionary protocol
DCDistributed Clocks, the EtherCAT distributed clock synchronization mechanism
ESIEtherCAT Slave Information, an XML description file provided by the slave vendor
AliasSlave alias address used to identify a device consistently
PositionPhysical position of a slave in the bus topology, starting at 0

EtherCAT slaves generally transition through the following states:

INIT → PREOP → SAFEOP → OP
  • INIT: Initialization state; mailbox and process data communication have not started.
  • PREOP: Mailbox communication and SDO configuration are available, but valid PDO data is not yet exchanged.
  • SAFEOP: Input process data is valid, while outputs generally remain in a safe state.
  • OP: Input and output process data is exchanged normally.

On this page