Dies ist eine alte Version des Dokuments!
The „ecmasterilb“ and „EtherCATInterface“ offer a relative easy way to use EtherCAT with EEROS or in standalone project.
First, follow the recommended workflow in Recommended Workflow on how to install EtherCAT on your system and how to run a demo application without EEROS.
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://github.com/ntb-ch/ecmasterlib.git $ 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 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 .. ...
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.