EtherCAT® MainDevice Stack SDK with API for C, C++, C#, Rust, Python
The EC-Master MainDevice (formerly Master) Stack is designed and optimized to run on different embedded (real time) operating systems. Already existing implementations are available Linux (with and without Real-Time), Microsoft Windows® 11, Wind River VxWorks, BlackBerry QNX, IntervalZero RTX64, TenAsys INtime®, Integrity, Xenomai, FreeRTOS, eCos, TI-RTOS, T-Kernel and more operating systems. The EtherCAT MainDevice stack, formerly Master, can be ported on any other embedded operating systems.
Software Architecture

- Application Programming Interface (API): Programming the EtherCAT MainDevice core in C/C++, C#, Python and Rust.
- EC-Master Core: The key EtherCAT MainDevice functionality in the core layer. All protocol handling, e.g. process data transfer and mailbox protocols (CoE, EoE, FoE, AoE, SoE) are executed here. This is complemented by sophisticated diagnosis features.
- Real-time Ethernet Driver: Data exchange between MainDevice and SubDevices. Zero-copy and/or polling techniques together with the core layer are supported to achieve best real-time performance and minimize CPU load.
- MainDevice and Network Configuration: The integrated XML parser supports the EtherCAT Network Information (ENI) file defined in the EtherCAT specification.
- Operating System Layer: The only OS specific layer. All operating system calls are executed here. To achieve best performance the most functions can be implemented using simple "C"-language macros.
Features according to ETG.1500 MainDevice Classes
The ETG (EtherCAT Technology Group) has defined two EtherCAT MainDevice Classes (ETG.1500) with a well defined set of MainDevice functionalities.
Class A defines a standard EtherCAT MainDevice and Class B defines a minimum EtherCAT MainDevice. Additional Functionality, which can be considered to be optional, is described by Feature Packs (FP).
(*1): According to ETG.1500 not mandatory for Class A
(*2): According to ETG.1500 not mandatory for Class B
Basic Features
| Feature name |
Short description |
Class A |
Class B |
| Service Commands |
Support of all commands |
X |
X |
| IRQ field in datagram |
Use IRQ information from SubDevice in datagram header |
X |
X |
| SubDevices with Device Emulation |
Support SubDevices with and without application controller |
X |
X |
| EtherCAT State Machine |
Support of ESM special behavior |
X |
X |
| Error Handling |
Checking of network or SubDevice errors, e.g. Working Counter |
X |
X |
| VLAN |
Support VLAN Tagging |
X |
-- (*2) |
| EtherCAT Frame Types |
Support EtherCAT Frames |
X |
X |
| UDP Frame Types |
Support UDP Frames |
-- (*1) |
-- (*2) |
| Multiple Instances |
One control system operating multiple networks |
X |
X |
Process Data Exchange
| Feature name |
Short description |
Class A |
Class B |
| Cyclic PDO |
Cyclic process data exchange |
X |
X |
| Multiple Tasks |
Different cycle tasks Multiple update rates for PDO |
X |
X |
| Frame repetition |
Send cyclic frames multiple times to increase immunity |
-- (*1) |
-- (*2) |
Network Configuration
| Feature name |
Short description |
Class A |
Class B |
| Online scanning |
Network configuration functionality included in EtherCAT MainDevice |
X |
X |
| Reading ENI |
Network Configuration taken from ENI file |
X |
X |
| Compare Network configuration |
Compare configured and existing network configuration during boot-up |
X |
X |
| Explicit Device identification |
Identification used for Hot Connect and prevention against cable swapping |
X |
X |
| Station Alias Addressing |
Support configured station alias in SubDevice, i.e. enable 2nd Address and use it |
X |
X |
| Access to EEPROM |
Support routines to access EEPROM via ESC register |
X |
X |
Mailbox Support
| Feature name |
Short description |
Class A |
Class B |
| Support Mailbox |
Main functionality for mailbox transfer |
X |
X |
| Mailbox Resilient Layer |
Support underlying resilient layer |
X |
X |
| Multiple Mailbox channels |
|
X |
X |
| Mailbox polling |
Polling Mailbox state in SubDevices |
X |
X |
CAN application layer over EtherCAT (CoE)
| Feature name |
Short description |
Class A |
Class B |
| SDO Up/Download |
Normal and expedited transfer |
X |
X |
| Segmented Transfer |
Segmented transfer |
X |
X |
| Complete Access |
Transfer the entire object (with all sub-indices) at once |
X |
X |
| SDO Info service |
Services to read object dictionary |
X |
X |
| Emergency Message |
Receive Emergency messages |
X |
X |
Ethernet over EtherCAT (EoE)
| Feature name |
Short description |
Class A |
Class B |
| EoE protocol |
Services for tunneling Ethernet frames. includes all specified EoE services |
X |
X |
| Virtual Switch |
Virtual Switch functionality |
X |
X |
| EoE Endpoint to Operation Systems |
Interface to the Operation System on top of the EoE layer |
FP (*1) |
FP (*2) |
File access over EtherCAT (FoE)
| Feature name |
Short description |
Class A |
Class B |
| FoE protocol |
Support FoE Protocol |
X |
X |
| Firmware Up-/Download |
Password, FileName should be given by the application |
X |
X |
| Boot State |
Support Boot-State for Firmware Up/Download |
X |
X |
Servodrive-Profile over EtherCAT (SoE)
| Feature name |
Short description |
Class A |
Class B |
| SoE Services |
Support SoE Services |
X |
X |
ADS over EtherCAT (AoE)
| Feature name |
Short description |
Class A |
Class B |
| AoE Protocol |
Support AoE Protocol |
X |
X |
Vendor over EtherCAT (VoE)
| Feature name |
Short description |
Class A |
Class B |
| VoE Protocol |
External Connectivity supported |
X |
X |
Synchronization with Distributed Clock (DC)
| Feature name |
Short description |
Class A |
Class B |
| DC support |
Support of Distributed Clock |
X |
-- (*2) |
| Continuous Propagation Delay compensation |
Continuous Calculation of the propagation delay |
X |
-- (*2) |
| Sync window monitoring |
Continuous monitoring of the Synchronization difference in the SubDevices |
X |
-- (*2) |
SubDevice-to-SubDevice Communication
| Feature name |
Short description |
Class A |
Class B |
| via MainDevice |
Information is given in ENI file or can be part of any other network configuration. Copying of the data can be handled by MainDevice software or MainDevice application layer. Required to support FSoE Safety instances. |
X |
X |
Master information
| Feature name |
Short description |
Class A |
Class B |
| Master Object Dictionary |
Support of Master Object Dictionary (ETG.5001 MDP sub profile 1100) |
X |
X |
Feature Packs
| Feature name |
Short description |
Class A |
Class B |
| Cable Redundancy |
Stay operational in case of cable break between two SubDevices |
FP |
FP |
| Hot Connect |
Add or remove additional SubDevices during bus communication is in progress. Newly added SubDevices are automatically transferred into the OPERATIONAL state. |
FP |
FP |
| TCP-Server and Remote API |
The TCP-Server together with the Remote API Context.Scope.Library allows accessing EC-Master from a remote system |
FP |
FP |
| EoE Endpoint |
The interface allows sending and receiving Ethernet frames to/from the EtherCAT network |
FP |
FP |
Advantages
- High performance and low CPU load to achieve fast update rates.
- Ready-to-run for many operating systems.
- Supporting the CPU architectures x86 (32 Bit and 64 Bit), ARM (32 Bit and 64 Bit) and RISCV.
- Available for many processors from Intel, Texas Instruments, ST, Broadcom, Nvidia, Renesas, NXP, Xilinx, etc.
- Together with our services you get professional partnership setting up your custom control system. On request you may get the complete system integration.
- Reliable and robust implementation. For example, the EC-Master Stack is running in the KUKA Robot Control and in controllers from Yaskawa, Lenze and Omron.
Free Evaluation Request