EtherCATInterface and ecmasterlib


The „ecmasterilb“ and „EtherCATInterface“ offer a relative easy way to use EtherCAT with EEROS or in standalone project.

  • EEROS: The robotic framework
  • EtherCAT stack: The EtherCAT stack from Acontis, see The Acontis EtherCAT Stack.
  • ecmasterlib: This library provides an easy interface to the EtherCAT stack. The library initializes the stack and takes over the periodic sending and receiving of the bus data. It provides the following interfaces:
    • EtherCATInterfaceBase: Basic interface for ecmasterlib
    • EtherCATInterfaceElmo: Based on EtherCATInterfaceBase. An interface designed for Elmo drives. You may need to implement your own interface for different drives.
    • EtherCATInterfaceElmo_config
  • getDrivesBlock: EEROS-block in control system. I has a signal output for every PDO input value (i.e. encoder values). You may need to modify this block in your application.
  • setDrivesBlock: EEROS-block in control system. I has a signal input for every PDO output value (i.e. setTorque). You may need to modify this block in your application.

Understanding EtherCATInterface and ecmasterlib


Install EtherCAT

First, follow the recommended workflow in this tutorial on how to install EtherCAT on your system and how to run a demo application without EEROS.

Install ecmasterlib

Once the EtherCAT stack has been installed and the demo application is running, the ecmasterlib can be installed.

Clone, build and install ecmasterlib TODO:(URL)

$ cd path/to/working/directory
$ git clone url-to-ecmasterlib
$ cd ecmasterlib
$ mkdir build-x86-64
$ cd build-x86-64
$ cmake -DCMAKE_INSTALL_PREFIX=/absolute/path/to/working/directory/install-x86-64 ..
$ make
$ make install

Install EEROS

Install EEROS as described in this tutorial, but use the command line option -DUSE_ETHERCAT=TRUE when calling cmake.

cmake -DCMAKE_INSTALL_PREFIX=/absolute/path/to/working/directory/install-x86-64 -DUSE_ETHERCAT=TRUE ..

Necessary adaptions


The components EtherCATInterfaceElmo_config, getDrivesBlock and setDrivesBlock need to be adjusted, if you change the variables, which are transmitted via PDOs (periodic sent/received messages by the EtherCAT bus). These components must also be adapted when creating a new EEROS application.