Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
embedded_systems:ethercat:ethercatinterface [2019-06-24 16:48] grafembedded_systems:ethercat:ethercatinterface [2020-09-21 09:42] (aktuell) graf
Zeile 7: Zeile 7:
   * **EEROS**: The robotic framework   * **EEROS**: The robotic framework
   * **EtherCAT stack**: The EtherCAT stack from Acontis, see [[embedded_systems:ethercat:understanding_acontis|The Acontis EtherCAT Stack]].   * **EtherCAT stack**: The EtherCAT stack from Acontis, see [[embedded_systems:ethercat:understanding_acontis|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: +  * **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 basic interface: **[[embedded_systems:ethercat:ethercatinterface:EtherCATInterfaceBase]]** 
-    * **[[embedded_systems:ethercat:ethercatinterface:EtherCATInterfaceBase]]**: Basic interface for //ecmasterlib// +  * **EtherCATInterfaceElmo**: An interface based on //EtherCATInterfaceBase// designed for Elmo drives. See **[[embedded_systems:ethercat:ethercatinterface:EtherCATInterfaceElmo]]** for details. You may need to implement your own interface for different drives. the interface further includes to EEROS blocks for the control system: 
-    * **[[embedded_systems:ethercatinterface:EtherCATInterfaceElmo]]**: Based on //EtherCATInterfaceBase//. An interface designed for Elmo drives. You may need to implement your own interface for different drives. +    * **getDrivesBlock**: It has a signal output for every PDO input value (i.e. encoder values). You may need to modify this block in your application. 
-    * **EtherCATInterfaceElmo_config** +    * **setDrivesBlock**: It has a signal input for every PDO output value (i.e. setTorque). You may need to modify this block in your application.
-  * **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. +
- +
- +
-[[embedded_systems:ethercat:ethercatinterface:understanding_ethercatinterface|Understanding EtherCATInterface and ecmasterlib]]+
    
  
Zeile 27: Zeile 22:
  
 ==== Install ecmasterlib ==== ==== Install ecmasterlib ====
-Once the EtherCAT stack has been installed and the demo application is running, the //ecmasterlib// can be installed.+Once the EtherCAT stack has been installed and the demo application is running, the //ecmasterlib// can be installed. 
  
 <code> <code>
Zeile 33: Zeile 28:
 $ git clone https://github.com/ntb-ch/ecmasterlib.git $ git clone https://github.com/ntb-ch/ecmasterlib.git
 $ cd 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
 +</code>
 +
 +==== Install EtherCATInterfaceElmo ====
 +<code>
 +$ cd path/to/working/directory
 +$ git clone https://github.com/ntb-ch/ethercatinterfaceelmo.git
 +$ cd EtherCATInterfaceElmo
 $ mkdir build-x86-64 $ mkdir build-x86-64
 $ cd build-x86-64 $ cd build-x86-64
Zeile 40: Zeile 50:
 </code> </code>
  
-==== Functionality ====+===== Functionality =====
 The //"ecmasterlib"// provides a callback function (''void callbackFct(...)'') which is called by the Acontis stack once per EtherCAT cycle. The //"ecmasterlib"// provides a callback function (''void callbackFct(...)'') which is called by the Acontis stack once per EtherCAT cycle.
 This method: This method:
Zeile 55: Zeile 65:
  
  
-===== Necessary adaptions =====+===== Adaptions =====
 ==== Overview ==== ==== Overview ====
-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).+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. These components must also be adapted when creating a new EEROS application.
  
 +==== Steps ====
 +  - Study produced ENI file carefully (use XML viewer). Under <config><processimage><inputs> and <outputs> you find bitsize and offset of all transmitted values.
 +  - Adjust headerfile accordingly, negative offset values indicate that the entry is not going to be used.
 +  - Make necessary adaptions in //getDrivesBlock// and //setDrivesBlock//.
  
 ===== Attachment ===== ===== Attachment =====
 {{:embedded_systems:ethercat:diagram_ethercatinterface.rar|Class Hierarchy}} {{:embedded_systems:ethercat:diagram_ethercatinterface.rar|Class Hierarchy}}