Nearly all real-time industrial control relies on an architecture of periodic computation and communication. Performance estimates for designing solutions are often based on microbenchmarks such as interrupt latency (for example, cyclictest) and some compute benchmarks such as the venerable Dhrystone. EtherCAT® is one of the main industrial Ethernet protocols for control systems in robotics, factory automation, and precise motor drive control. The primary performance metric is the shortest achievable cycle time, with a given number of devices and size of the exchanged data structures. Timing and synchronization stability is another key consideration, both within the controller and within the network. EtherCAT controller (formerly called EtherCAT master) solutions are available for high level operating systems, such as TwinCAT® for Windows® and CODESYS® for Linux, to highly optimized commercial solutions such as icECAT and the open source IgH stack. Some of the optimized designs are able to run on microcontroller cores, and involve different tradeoffs compared to each other and the full featured high-end solutions. This application note explores achievable cycle times on Texas Instruments embedded processors running real-time Linux using the CODESYS EtherCAT stack.
EtherCAT® and TwinCAT® are registered trademarks of Beckhoff Automation GmbH.
Windows® is a registered trademark of Microsoft Corporation.
CODESYS® is a registered trademark of CODESYS Group.
ARM® is a registered trademark of ARM Limited.
All trademarks are the property of their respective owners.
Industrial control requires real-time communication with deterministic latency. The used technologies have evolved from serial fieldbuses to industrial Ethernet protocols defined in IEC standards such as EtherCAT. These standards use parts of IEEE Ethernet to leverage some of the economies of scale that Ethernet offers, but the standards add small changes such as cut-through switching that go beyond and partially restrict the use of typical IEEE bridges and endpoints. Contrary to typical consumer or enterprise systems, where average responsiveness or throughput are key performance indicators, in these applications the performance need is bounded by the worst-case latency of interacting with inputs and outputs across the network.
A typical industrial control network topology is shown in Figure 1-1. Ethernet specifies layers 1 and 2 of the local area network (LAN). For standard Ethernet, this allows for stateless unreliable transmission of variable-sized frames from one endpoint to another endpoint and the switching in between. This domain is shown by the area in the dotted rectangle to the left in Figure 1-1. The protocol on top, for example EtherCAT, is highly asymmetric; there is one controller managing a few or even hundreds of devices. Different protocols use slightly different terminology for this asymmetric relationship, and there are varying levels of this asymmetry. This document uses the terms “controller” for the controlling entity and “device” for the devices being controlled.