EtherCAT

How does EtherCAT work?

How does EtherCAT work?

What is EtherCAT?

When dipping into the topic of industrial communication, sooner rather than later, one will come across EtherCAT. This popular protocol, first introduced in 2003 by company Beckhoff, is a so-called industrial Ethernet, meaning it is an extension of the well-known Ethernet technology for home and office networks, allowing for network functions to be implemented specifically for industrial application. Especially for modern automation tasks in production and research, industrial Ethernet solutions are the preferred standard when it comes to efficient networking and have established themselves as successors to classic field busses. EtherCAT (Ethernet for Control Automation Technology) is regarded as a particularly fast industrial Ethernet when it comes to throughput rate and real-time capability.

But what exactly makes EtherCAT so efficient and how does it work?

How does EtherCAT work?

EtherCAT uses standard Ethernet frames, meaning data packets typical for networks, in order to perform communication between all network participants. In the specific case of EtherCAT, these are comprised of Ethernet header, EtherCAT header, 1 to 15 EtherCAT telegrams (so-called datagrams), that in total contain 44 to 1498 bytes of reading and writing instructions, as well as the checksum for detecting bit errors.

Control is done via a master-slave system. The master sends “target data” to the slaves and receives “actual data”. Target data can be control instructions for active devices (actuators) in order to execute specific actions, such as setting the rotation speed of a motor. Actual data, on the other hand, represents information from measurung devices (sensors) regarding various states such as current position, rotation speed or temperature.

The EtherCAT master assembles EtherCAT datagrams and subsequently sends them through all connected slaves. The special feature of EtherCAT here is that already during the passing through, every slave takes its specific target data out of the circulating datagram while at the same time putting its own actual data into the datagram. All remaining data not intended for the slave are forwarded unchanged. After the datagram has passed through all slaves, it returns and is received back by the master. This procedure is extremely quick even at a high number of interconnected EtherCAT slaves as the pass-through delay for a single slave is only a few nanoseconds.

As a result, all relevant data between master and slaves are exchanged after a circulation. For a continuously accurate data reconciliation, the master performs this data exchange cyclically, with refresh rates that can go up to several kilohertz.

How does EtherCAT work: Data exchange

Which topologies can be used?

EtherCAT operates in full-duplex mode, meaning one line pair in a cable is used for the sending of data through all slaves while the other pair is responsible for returning the data after the last slave has been passed through. This way, EtherCAT at all times retains a logical ring structure, regardless of which topology is implemented, and thus allows for consistently stable real-time capabilities. This enables a high degree of flexibility for the networking as topologies can be integrated as line, tree as well as star or use any combination from these. For example, branches from line topologies are done by utilizing special EtherCAT hardware (so-called couplers). Another advantage: The wiring with standard Ethernet cables is not only cost-efficient but also offers a variety of possible configurations.

How does EtherCAT work: Topology

Synchronization with Distributed Clocks

Automated systems with physically distributed components often require accurate synchronization so as to optimally co-operate with each other. An example for this are the various servo axes of a robotic arm, which, only with precise interaction, are able to perform quick and accurate movements. In order to synchronize all individual “clocks” of all EtherCAT components, the Distributed Clocks concept (DC) is implemented. Here, the clock of a DC-capable slave is set as reference clock to which all other clocks in the system are synchronized to. Since the reference clock is hardware-based, an extremely high synchronization accuracy can be achieved with minor deviations in the range of only a few nanoseconds. This synchronization principle is comparable to the “Precision Time Protocol” Ethernet standard IEEE 1588.

How can I as application developer work with EtherCAT?

Here is the good news: The automation application does not have to deal with the actual date exchange. The EtherCAT master takes care of that as described earlier. The master, representing all target and actual data ranges of connected slaves, provides a memory range where all individual variables of the slaves are arranged. This memory range is then made available to the application program, therefore enabling the program to have direct access to the memory image of slave variables.

Since the automation application has to compute EtherCAT data cyclically, a timer routine is usually set up. In case, similar in context of Distributed Clocks, a high synchronization accuracy has to be achieved here as well, the cyclical computing in the application program needs to be synchronized with the DC reference clock as well. This allows for the lowest possible delay from application down to the actuator-sensor level. Time-critical parts of the application program can be executed in real-time context, enabling developers to implement real-time-capable EtherCAT-based control applications. For instance, the EtherCAT Master, integrated into Kithara RealTime Suite, can be used to implement the mechanisms described above.

Fields of application

EtherCAT is a modern, highly efficient protocol for industrial real-time automation and machine control that can be applied in nearly any industrial branch. This is also reflected in the EtherCAT Technology Group, which is the world's largest industrial Ethernet user organization with over 5800 members. Due to the mentioned features and performance characteristics, EtherCAT is especially suitable for applications that have to combine a high degree of automation with particularly time-critical requirements, such as test stands for quality assurance or robotics in industrial manufacturing. Case study from the company MacroTech.

How does EtherCAT work: Structure

EtherCAT® and Safety over EtherCAT® are registered trademarks and patented technologies, licensed by Beckhoff Automation GmbH, Germany.