DMC, Inc.
Integrating EtherCAT into Custom Applications

Integrating EtherCAT into Custom Applications

Applications such as advanced industrial control systems and robotics require precise motion control, synchronized data sampling, and fast deterministic field buses. Traditional Ethernet TCP/IP, CAN or Modbus-based systems lack the speed, coordination, and scalability required for these applications.

That’s where EtherCAT comes in.

Originally developed by Beckhoff, EtherCAT (Ethernet for Control Automation Technology) has become one of the most popular real-time industrial Ethernet standards. It’s fast, reliable, and highly scalable – making it an excellent fit for applications where timing and performance are critical.

Why EtherCAT Fits High-Performance Embedded Applications

EtherCAT’s efficiency comes from how it moves data. EtherCAT masters can use standard off the shelf ethernet hardware, and they transmit standard Ethernet frames with the EtherCAT EtherType Identifier. The entire EtherCAT data payload (EtherCAT Telegram) for the entire network is embedded into the Ethernet payload. Every device on the network is daisy-chained together, and each device allows the entire Ethernet frame to pass through it, imparting minimal delay on the entire message. Each device will read out its section (Datagram) of the EtherCAT Telegram and insert the data that it is sending back to the master. This all happens on the fly as the frame is effectively passing through the device. The last device on the network will then turn the frame around and send it back up to the master. This is possible because of the full-duplex nature of Ethernet.

EtherCAT Frame

The following image shows how an EtherCAT frame might traverse through a network. The master transmits the frame, and each device will extract data in the Datagram addressed to it and insert its data on the fly into the Datagram. In this example very simple addressing is used as an example, most of the time such positional addressing is only used at network boot-up/discovery. Data not addressed to the slave is passed through the network until it reaches the end of the network, where the last slave sends it back to the master.

EtherCAT Master

This “processing on the fly” approach eliminates most of the traditional Ethernet delays caused by the need to address each device individually and enables cycle times in the tens of microseconds, with minimal jitter.

The protocol can also implement a feature called Distributed Clocks (DC), where the master can measure time, it takes for each device to receive and respond to a sync message, then provide each device with an offset to ensure all devices are synchronized within ~100ns of each other. This allows each EtherCAT controller to create a synchronization event for each device on the network within 100ns of each other.

For custom devices, that means:

  • Deterministic timing for motion control and automation.
  • Relatively low resource overhead compared to the capabilities, since much of the protocol runs in hardware.
  • Scalability, from a single board with a few I/O channels to complex multi-axis systems.

Types of EtherCAT Devices

There are two types of EtherCAT devices that can be implemented:

1. EtherCAT Masters

EtherCAT masters are usually run on controllers or embedded PCs that coordinate the network, process data and issue commands to each device on the network. In industrial applications (i.e. Industrial Automation) a master is usually an Industrial PC or PLC running TwinCAT.

Open-source stacks like Simple Open EtherCAT Master (SOEM) provide a lightweight, C-based master that runs on Linux or RTOS platforms. This can be a great option for small applications, such as a dedicated robot or lightweight real-time control system for highly integrated applications. These stacks typically work on commonly available hardware that supports standard Ethernet-based communication. This is because the master does not require any specialized hardware, it just needs raw access to the underlying Ethernet frames.

2. EtherCAT Slaves/SubDevice

Used when building custom EtherCAT-enabled devices like sensors, actuators, modular I/O, or motor/servo controllers.

Beckhoff’s Slave Stack Code (SSC) tool generates a firmware library that implements EtherCAT communication layer on your supported hardware. The “processing on the fly” of EtherCAT is really implemented in the EtherCAT slave controller hardware and not in software. So, the slaves/subdevices require specialized hardware to interface with the EtherCAT network properly.

This specialized hardware can take the form of a traditional microcontroller (i.e. STM32, TI C2000…) paired with an EtherCAT Slave Controller IC (ESC) like the LAN9252, or Beckhoff ET1100. Alternatively, some specialized microcontrollers, such as the TI TMS320F28388 or Infineon XMC4800 series, integrate the EtherCAT controller as a peripheral on chip.

In both cases, success depends on selecting compatible hardware and providing a real-time-capable software environment. For masters, that often means using a deterministic OS (e.g., PREEMPT_RT Linux or FreeRTOS). For slaves, it’s ensuring your MCU and ESC can handle EtherCAT’s timing and synchronization.

Explore Further Reading

Conclusion

EtherCAT brings industrial-grade speed and synchronization to embedded systems without requiring massive computing resources. With the right combination of hardware, stack software, and validation tools, engineers can build compact, deterministic systems that rival full-scale automation controllers in responsiveness and reliability.

Contact DMC’s Embedded Development team to implement custom EtherCAT devices today!