Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
Letzte ÜberarbeitungBeide Seiten der Revision
embedded_systems:ethercat:ethercatinterface:understanding_ethercatinterface [2019-03-05 15:41] – angelegt mgehrig2embedded_systems:ethercat:ethercatinterface:understanding_ethercatinterface [2019-06-24 16:35] graf
Zeile 1: Zeile 1:
-====== Understanding EtherCatInterface ====== +====== ecmasterlib  ====== 
-===== ecmasterlib =====+===== Summary ===== 
 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 8: Zeile 9:
 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 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.+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. When an //"ecmasterlib"// object is created, an instance (monotonic) is created.
-The stack is started exactly as in the //"EcMasterDemoDC"// of Acontis+The stack is started in the same way as in the //"EcMasterDemoDC"// of Acontis.
- +
- +
-===== EtherCatInterfaceBase ===== +
-This is the base class for all interface classes. +
-It mainly provides ''set'' and ''get'' methods for 8, 16, and 32 bit long data. +
-The get methods calculate the correct offset of the receive buffer of the //"ecmasterlib"// and returns the data. +
-The set methods also calculate the offset and write the data into the transmit buffer of //"ecmasterlib"//+
- +
-==== EtherCatInterfaceBase_config.hpp ==== +
- +
- +
-===== EtherCatInterfaceElmo ===== +
-The //"EtherCatInterfaceElmo"// is especially designed for the Gold Twitter drives from Elmo. +
-It consists of the following components: +
-  * EtherCatInterfaceElmo.hpp +
-  * EtherCatInterfaceElmo.cpp +
-  * EtherCatInterfaceElmo_config.hpp +
- +
-The //"EtherCatInterfaceElmo.hpp"// declares all methods of the interface. +
-The low level methods are at the bottom of the page. +
- +
-These low level methods read and write individual data objects to/from the stack. +
-Which objects are available and their file type must be read from the documentation of the manufacturer of the EtherCAT slave. +
-Each data object has its own method. +
- +
-Where a data object is located in the PDO depends on the ENI file used. +
-These offsets must be read from the ENI file and configured in //"EtherCatInterfaceElmo_config.hpp"//.+
  
-All methods above the low level methods are optional. 
-They contain a certain degree of intelligence and simplify the interface to the user application. 
  
-==== Blocking functions ==== 
-Methods in the interface must never be **blocking**. 
  
-All advanced functions can take several cycles. 
-They are only completed when they return ''true''. 
-These methods must be called again in each cycle until they return ''true''.