EC-Master Architecture

2.1. EC-Master Architecture

The EC-Master EtherCAT® MainDevice stack is implemented in C++ and can be easily ported to any embedded OS platforms using an appropriate C++ compiler. The API functions are C language interfaces, thus the MainDevice stack can be used in ANSI-C as well as in C++ environments.

The MainDevice stack is divided into modules, see diagram and descriptions below:

EC-Master software architecture overview showing the application layer, EC-Master stack, EtherCAT link layer, and the connected EtherCAT network with SubDevices
  • EtherCAT® MainDevice Core: In the core module cyclic (process data update) and acyclic (mailbox) EtherCAT® commands are sent and received. Among others there exist some state machines to handle for example the mailbox protocols.

  • Configuration Layer: The EtherCAT® MainDevice is configured using an XML file whose format is fixed in the EtherCAT® specification ETG.2100. EC-Master contains an OS independent XML parser.

  • Real-time Ethernet Driver Layer: This layer exchanges Ethernet frames between the MainDevice and the SubDevices. If hard real-time requirements exist, this layer has to be optimized for the network adapter card in use.

  • OS Layer: All OS dependent system calls are encapsulated in a small OS layer. Most functions are that easy that they can be implemented using simple C macros.