EtherCAT Protocol Stack
The EtherCAT Protocol Stack provides all required services for a compliant communication according to the EtherCAT Standard IEC61158. . It facilitates easy and fast development of EtherCAT Slave devices. The functional range can be extended by additional modules. Access to the hardware is carried out via a hardware abstraction layer. These drivers are available for selected hardware.
The EtherCAT Library provides all required services for a compliant communication according to the EtherCAT Standard IEC61158 . It facilitates easy and fast development of EtherCAT Slave devices. The functional range can be extended by additional modules. Access to the hardware is carried out via a hardware abstraction layer. These drivers are available for selected hardware, including port’s FPGA solution, which is available for Altera Nios ® II and Xilinx MicroBlaze™. The FPGA solution can also be used for other Industrial Ethernet Protocols, e.g. Ethernet POWERLINK, EtherNet/IP and PROFINET. An uniform user interface makes it easy to implement different protocols.
The EtherCAT Library is based on EtherCAT Standard IEC61158. . It provides the most importand services specified therein.
It is completely written in ANSI-C and can be compiled with every ANSI-C compliant compiler.
With the standard version of the EtherCAT Library all services are provided for development of full-featured EtherCAT Slave devices.
Additional services of other communication profiles are provided by means of extension modules.
All hardware specific parts are decoupled from the EtherCAT Library protocol stack through a defined driver interface. This provides easy adaptation to different hardware platforms.
The user application communicates with the EtherCAT Library through function calls and call-back functions.
Configuration and scaling of the EtherCAT Library is done with the help of the EtherCAT Design Tool, which is delivered as EtherCAT Design Tool light version. With it the EtherCAT Library can be tailored to an optimum to the available resources of the application. Besides the creation of the object directory all settings for the hardware can be carried out with it.
The EtherCAT Library consists of a hardware independent and a hardware dependent part that communicate with message queues. The hardware dependent part consists of controlling software for the EtherCAT driver and timer functions.
The application communicates only with the hardware independent part of the EtherCAT Library. That way it is possible to exchange drivers without any influence on the functionality of the application. The initialization of EtherCAT services is done with function calls within the application. During the execution of the application the EtherCAT Library executes all necessary communication tasks autonomously and informs the application about successful received EtherCAT messages with the help of callback functions.
Communication requests from other devices as well as necessary periodical tasks and time out monitoring is handled within the EtherCAT Library. All requests are proved for correctness (access rights, data types etc.). The application is notified after completion of the communication and occurrence of failures, respectively, through service oriented callback functions. In these callback functions appropriate actions can be carried out from the application.
The object directory is designed to contain references to the variables in the user application. Consequently it is possible to take over variables from an existing software without any changes in the object dictionary.
The high degree of scalability of the EtherCAT Library is of particular importance for devices with limited resources. On one hand, this is achieved by the modularity in individual service groups, and on the other hand, through the use of compiler directives in the respective modules. Thus, the code size is proportional to the utilized EtherCAT services.
Delivery of the EtherCAT Library comprises different example programs that describe the usage of the various EtherCAT Library services. All examples contain a complete implementation of a EtherCAT Library device including the object directory as well as application code. These are ready to be compiled and run.
Among the detailed documented source code there is the reference manual and a printed user manual as documentation available.
The EtherCAT Library is constantly improved and adopted to customer requirements. In order to keep up with the latest version of the EtherCAT Library port provides its customers an update service.
For development, test and initial operation of EtherCAT devices port provides a comprehensive tool chain. The creation of the object directory is simplified with the EtherCAT Design Tool (EtherCAT Design Tool light version belongs to the scope of delivery).
The graphical EtherCAT Design Tool is available for the creation of the object directory, the electronic data sheet (EDS file in XML format) and for the documentation of the device in HTML or text format.
Besides the communication objects several application objects in different device profiles are also specified in EtherCAT. These definitions guarantee a defined behavior of the corresponding device class and enable the interchangeability of EtherCAT devices. Device profiles can be easily created by use of the EtherCAT Design Tool.
Scope of delivery
- EtherCAT Library library with separate driver interface
- EtherCAT driver
- GOAL Support
- immediately compilable examples
- EtherCAT Design Tool Light
- user manual
- reference manual containing descriptions of all functions, including parameters and return values
- Maintenance Agreement
All changes of current standards as well as extensions through new developed standards are constantly incorporated into the EtherCAT Library. In order to take profit of the changes port offers all its customers a maintenance agreement with the following conditions:
- updates free of charge for the contracted period
- free of charge support for the EtherCAT Library
- Support for initial operation
In order to provide a quick and effective access to the development of EtherCAT devices we recommend to do the initial operation of the EtherCAT device together on the target platform. Customer experiences of his/her hardware, the used compiler and the experience of our engineers with EtherCAT and the EtherCAT Library can complement each other. This leads to reduced development times and a EtherCAT conform device.
To our customers we offer a reference design comprised of hard- and software to support a vast number of protocols with only one universal hardware platform.
Ordering Information & Drivers
EtherCAT Source Code Library
EtherCAT Design Tool
ECAT-DP-PIC32MX / LAN9252
ECAT-DP-ST STM32F7xx_KeilRTX (ext. ET1100 over SPI)
ECAT-DP-STM32L4 / LAN9252
ECAT-DP-TI TMS320F2837x / ET1100/1200
ECAT-DP-XMC4500 / ET1100/1200
ESC on Board
with external ESC (ET1100 / 1200)
Linux (with ESC on PCI Card)
The EtherCAT Slave Stack support the follow EtherCAT Slave Controllers:
- Beckhoff ET1100/ET1200/FPGA IP Cores
- Renesas R-IN Engine
- TI TIESC
- Microchip LAN9252
- Trinamic TMC8460
- Infineaon XMC 4800 / 4700
- SITARA AM335
- TI TMS320F28388X (CM4 Core)
Port´s EtherCAT Slave Stack conforms the EtherCAT conformance test in the current version.
05/2021 - EtherCAT Slave Stack V1.7.1
The EtherCAT stack was expanded to support FSoE (Safety).
please note: However, an FSoE stack (3rd party) is still required to implement a safety device.
- EoE is now dynamically configurable (if dynamic configuration is activated)
- Fixed handling of PDO mappings with gap entries
- Added extended object attributes to support Safety flags
- Added support of MDP profile for devices with only one slot
- FSoE can now be supported (3rd party FSoE stack is required)
- Support LED emulations for targets that have dynamic configuration disabled
- SPI for ET1100: use Waitstate byte to support higher SPI speeds
- Added support for TI TMS320F28388X (CM4 Core)
- Added examples for TI TMS320F28388X (CM4 Core)
08/2017 - EtherCAT Slave Stack V1.6
- added MII Management API (Phy access via ESC registers)
- added support for Input Only slaves with Sync Manager 2 as Inputs
- CoE: added timeout when waiting for a Master to read response from a Mailbox
- SDO: Complete Access - allow writing less than all Subindices
- fixed waiting for DC during SafeOP to OP when feature NMT Split is activated
- added support for UNSIGNED64 and INTEGER64 data types
- MBOX: fixed bug "deadlock of Rx Buffers in case of asynchronous traffic"
- added support for TCP/IP stack "lwIP" over EoE
- TIMER: renewed Timer API
- fixed clang compiler warnings
- added support for GOAL
07/2016 - EtherCAT Slave Stack V1.5
The EtherCAT Slave Stack V1.5 new features:
- data type BYTE supported
- full support of SDO Complete Access (automatic padding of bit data types)
- FoE Busy-Requests (delay a FoE Read or Write request while device is busy)
- EoE: supporting services “Set IP Parameter” & “Get IP Parameter” for configuring virtual MAC address and IP parameter
- Supporting objects with gaps
- Full support of SDO Info service for Online Dictionaries
- EEPROM access via PDI
- Library conforms to new EtherCAT Conformance Test 2.0
port´s EtherCAT protocol stack solution had 10 years ago a common predecessor in the back then recent CANopen Library. A user of our CANopen will feel instantly “at home”, everybody else soon as well. The Stack is supported by our ICC – industrial communication creator (former DesignTool) and has below USP against Beckhoff’s Library:
- nearly identical API as the stack provides
- out-of-the-box support for many platforms, with on-chip ESCs and also for MCUs with external ESC such as Beckhoff’s ET1100/1200 or Microchip LAN9252
- supporting the ET1100/1200 we support as well ANY known in-silicon embedded ESC any silicone manufacturer may put into his silicone
- ICC industrial communication creator () supported – out of the same
- Comprehensive Set of examples, including as DS402 example (CSP Mode)
- Mailbox connected to the included TCP/IP stack, accordingly our stack offers off-the-shelf TCP/IP functionality for your device (does not apply to the Linux Driver)
- Linux Support
- DSPs (; Memory)
- Professional support by port.de
- Mighty powerful Object Dictionary, including options to assign repetitive objects in groups, so called Sub-Segments. This enables the user to handle these groups similar/identical while still handling different objects. This is a powerful feature to handle quick and effective multiple axis. All of this supported with our ICC ()
- our ICC (industrial communication creator – former ) creates a compliant ESI file for your device.
You need more information and documentation - then please have a look here: