IgH EtherCAT Master for Linux

Note

Please note that the IgH EtherCAT Master supports Linux Kernel up to 4.9. If you are running a higher Kernel we strongly suggest to downgrade.

EtherCAT is a high performance Ethernet-based fieldbus system. It overcomes the limitations of Ethernet on typical automation networks, where short cycle times are required. Since automation networks are characterized by short data length per node, instead of receiving, processing and copying each Ethernet frame at every node, with EtherCAT the data is read as it passes through the node. Hence, the Ethernet frames are processed on the fly, achieving a high response network with no more than a few nanoseconds of delay. EtherCAT is based on the master/slave principle, meaning a master and slave nodes are needed.

Master EtherCAT applications do not need any custom device and can be run in a normal PC, laptop or device with an Ethernet connector. EtherCAT slave applications are the only ones which need custom devices, such as Synapticon’s COM EtherCAT module.

In order to control our SOMANET nodes through EtherCAT as slave devices, we first need to set up a master side in our computer that will drive the communication. Follow the steps described throughout this article to set up your EtherCAT master stack in a Linux platform.

Installing EtherCAT Master driver

  1. Download the Makefile Installer (contains Makefile and EtherCAT Master by IgH EtherLAB)

  2. Unpack the downloaded zip file and change into the directory

  3. Be sure to have Linux kernel headers and build-essential installed in order to avoid compilation errors. They can be installed following this command:

    $ sudo apt-get install linux-headers-$(uname -r) build-essential
    
  4. Compile the master driver:

    $ make ethercatMaster
    
  5. After compiling, install the driver. You also have the possibility to install it setting an auto-start when booting configuration:

    $ make ethercatMasterInstall
    

    or

    $ make ethercatMasterInstallWithAutoStart
    

Important

If you perform a system update, your EtherCAT Master driver might get corrupted! Reinstalling will solve the problem.

Starting and stopping the driver

  1. The EtherCAT master driver has to be launched manually when used if it was installed without AutoStart option. It is recommendable to unplug your wired internet connection since some conflicts among interfaces might come up.

    $ sudo /etc/init.d/ethercat start
    
  2. You can check your EtherCAT connected devices by running:

    $ ethercat slave
    
  3. To stop your EtherCAT Master driver just run:

    $ sudo /etc/init.d/ethercat stop