Dies ist eine alte Version des Dokuments!


ecmasterlib

Overview

The „ecmasterlib“ offer an easy way to use EtherCAT with EEROS or in a standalone project.

  • 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 data on the bus. It provides the following basic interfaces
    • Elmo.hpp: An interface for Elmo drives
    • Beckhoff/EL1008.hpp: An interface for digital input terminal
    • Beckhoff/EL2008.hpp: An interface for digital output terminal
    • Beckhoff/EL3004.hpp: An interface for analog input terminal
    • Beckhoff/EL4004.hpp: An interface for analog output terminal

You may need to implement your own interfaces for other drives and terminals.

Installation

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

$ cd path/to/working/directory
$ git clone https://gitlab.ost.ch/tech/inf/public/ecmasterlib
$ cd ecmasterlib
$ mkdir externalLib
$ cp ''<classB_path>''/SDK/LIB/Linux/x64/libAtemRasSrv.a externalLib
$ cp ''<classB_path>''/SDK/LIB/Linux/x64/libEcMaster.a externalLib
$ mkdir build-x86-64
$ cd build-x86-64
$ cmake -DCMAKE_INSTALL_PREFIX=/absolute/path/to/working/directory/install-x86-64 ..
$ make
$ make install

Functionality

The „ecmasterlib“ provides a callback function (void callbackFct(…)) which is called by the Acontis stack once per EtherCAT cycle. This method:

  • Copies the received data from the stack into the receive buffer of „ecmasterlib“
  • Copies the data to be sent from the send buffer of „ecmasterlib“ to the stack.

Adaptions

Overview

The components EtherCATInterfaceElmo_config, getDrivesBlock and setDrivesBlock need to be adjusted whenever 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.

Steps

  1. Study produced ENI file carefully (use XML viewer). Under <config><processimage><inputs> and <outputs> you find bitsize and offset of all transmitted values.
  2. Adjust headerfile accordingly, negative offset values indicate that the entry is not going to be used.
  3. Make necessary adaptions in getDrivesBlock and setDrivesBlock.

interface is specific for Gold Twitter drives from ElmoMC. Other drives (i.e. Maxon Maxpos 50/5) need a different interface. You may copy and adapt EtherCATInterfaceElmo for your drive type.

EEROS > EtherCATInterfaceElmo > ecmasterlib & EtherCATInterfaceBase > Acontis Stack

Detailed description