The DLR EtherCAT Library - A template based code-generation scheme for accessing real-time hardware from Modelica
Tobias Bellmann, Fabian Buse · Linköping electronic conference proceedings · 2019
In this paper, a new concept to access real-time hardware from within Modelica via the EtherCAT bus is introduced and the implementation of a prototype library is demonstrated.The DLR EtherCAT library uses the open source EtherCAT library EtherLab to gather information about the connected bus slaves.Thereupon, the slave information is used in a code generation process to build native Modelica blocks providing the interfaces to their hardware counterparts.These blocks subsequently can be used to build real-time models, running on a Linux based real-time system and therefore controlling the hardware directly from the model.The application of the library is shown in a robotic testbed where a motor drive is controlled via EtherCAT.