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:ethercatinterface:ethercatinterfaceelmo [2019-05-21 08:40] – angelegt mgehrig2embedded_systems:ethercatinterface:ethercatinterfaceelmo [2019-05-21 09:25] mgehrig2
Zeile 1: Zeile 1:
-====== EtherCATInterfaceElmo ======+====== EtherCATInterfaceElmo ===== 
 +===== Summary ===== 
 +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 ('ll_'-prefix) are at the bottom of the class. 
 + 
 +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. 
 +These are the only methodes which use the low level get/set methodes from //"EtherCatInterfaceBase"//
 + 
 +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**. 
 + 
 +Some advanced functions may take several cycles. 
 +They are only completed when they return ''true''
 +These methods must be called again in each cycle until they return ''true''
 + 
 +==== Advanced set functions ==== 
 +All advanced set functions with a boolean return value have to be called multiple times until they return true. 
 +This is because the drives may need to run through multiple state changes and may have to send different commands depending on the state of the drive. 
 +Call this methodes every cycle of your control system until it returns true. 
 + 
 +==== Advanced get functions ==== 
 +This methodes implement additional logic to interpret the data from the EC bus and return a sensible value. 
 + 
 +=== getPosition / getPositionAux === 
 +The methodes //"getPosition / getPositionAux"// calculates the position difference between the actual position (int32_t) and the position of the last call (int32_t). 
 +The difference is added to the stored position (int64_t). 
 +This approach prevents an overflow of a 32 bit integer. 
 + 
 +These methodes consider a fixed offset as well. 
 +The offset may be set with the index pulse (see below). 
 + 
 +=== Gain scheduling functions === 
 +This functions are implemented for backwards compatibility are probably not used. 
 + 
 + 
 +==== Basic funcitons ==== 
 +These functions provide some basice conversions for ease of use. 
 + 
 + 
 + 
 + 
 +===== EtherCatInterfaceElmo_config.hpp ===== 
 +This is configuration file has do be adapted depending on the EtherCAT network. 
 + 
 +The most important part of this file is the offset definition of all PDO offset. 
 +Before you start your application, you have to define all PDO offsets of your network. 
 + 
 +Be aware that EtherCATInterface assumes that all drives send the identical variables via PDO. 
 +With the current implementation it is not possible to send different variables for different drives. 
 + 
 +If a variable is not available, the offset is set to a negative number like '-1'
 +The methods which would use a unavailable variable will throw an error if called.