Dies ist eine alte Version des Dokuments!
The „ecmasterlib“ offer an easy way to use EtherCAT with EEROS or in a standalone project.
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
The „ecmasterlib“ provides a callback function (void callbackFct(…)
) which is called by the Acontis stack once per EtherCAT cycle.
This method:
The receive and send buffers of „ecmasterlib“ are byte arrays (uint8_t* inBuffer; uint8_t* outBuffer;
) which are the same size as the PDOs.
The „ecmasterlib“ also provides a condition variable (std::condition_variable cv;
) to synchronize the user application (i.e. EEROS).
When an „ecmasterlib“ object is created, an instance (monotonic) is created. The stack is started in the same way as in the „EcMasterDemoDC“ of Acontis.
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.
The ecmasterlib
and EtherCATInterface
offer a relative easy way to use EtherCAT with EEROS or in a standalone project. ecmasterlib
offers the low level interface to the Acontis stack (class A). It is based on the demo application EcMasterDemoDC
from Acontis. EtherCATInterfaceElmo
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