Reach EtherCAT Slaves via Ethernet (“EoE”)

”The communication protocol “Ethernet over EtherCAT” (EoE) is used to transfer process data as well as standard Ethernet communication. EoE is used, for example, to access the web server of an EtherCAT slave from an engineering PC. The Ethernet communication is tunneled through EtherCAT. In this way, for example, tunneled access to the integrated webserver of EtherCAT slaves or to devices from third-party manufacturers is possible for maintenance purposes. From the network's point of view the EtherCAT network then looks like an Ethernet subnet.

EoE functions are available in e!COCKPIT in the “EoE” Tab of the fieldbus configuration if EoE is sported by the respective device description and if the expert settings are enabled in the slave's interface settings (via “Settings” control panel > [Interface Settings]).

Reach EtherCAT Slaves via Ethernet
Reach EtherCAT Slaves via Ethernet

To use EoE, a so-called “Terminal Access Point”, or TAP for short, must be installed for the EtherCAT Master (controller). TAPs are virtual network kernel drivers that simulate network devices using software. Data packets are then not forwarded to hardware in the form of network cards, but to a program. In this case, the data is sent to the EtherCAT master which forwards it to the EtherCAT slave.

Install TAPs (Linux)

  1. First, stop the runtime.
  2. In the init script “/etc/init.d/networking”, add the following lines directly in front of the entry “function do_ifupdown UP” (e.g., using WinSCP):
    ip tuntap add dev tap0 mode tap
    ip link set dev tap0 up
    ip addr add <IP_ADDRESS/NETMASK> dev tap0
    (e.g., “ip addr add 192.168.1.2/24 dev tap0”)
  3. Save the init script.

Note: The IP address of the TAP device must be in a different subnet than the IP address of the EtherCAT master device
Example: If the EtherCAT master is located in the IP network 192.168.1.0/24 with the IP address 192.168.1.1/24, then the IP address of the TAP device should be located in another network (for example 192.168.2.0/24) and have an IP address in this subnet, for example 192.168.2.1/24.

Change Routing and IP Settings in WBM

  1. Open WBM for the EtherCAT Master.
  2. The EtherCAT interface X2 on the controller must not have an IP address in order to use EoE. You should therefore adapt the configuration on the “Networking”> “TCP/IP Configuration” page:
    Use 0.0.0.0. as “Static IP Address and “Subnet Mask” under “Network Details Bridge 2 (br1)”.
    For firmware 17 or higher, set the IP address to “none”.
  3. Click [Submit].
  4. To access the EtherCAT slave from your PC via the EtherCAT Master, switch on the routing function for the EtherCAT Master:
    To do this, enable the “Enabled” option on the “Networking”> “Routing” page under “IP Forwarding through multiple interfaces”.
  5. Click [Submit].
  6. Click the [Reboot] button to reboot the device.

Configure EoE Settings in e!COCKPIT

  1. Open your EtherCAT project in e!COCKPIT.
  2. Open the fieldbus configurator for your EtherCAT.
  3. To change communication settings of individual slaves that support EoE, open the “EoE” tab.
    The settings are described in detail under “EoE” Tab.
  4. Enable the EoE functionality of the slave by enabling the “Virtual Ethernet Port”.
  5. Specify the settings for the IP port based on the parameters of the virtual network adapter.
    Tip: Note that IP port must be in the same range as the virtual Ethernet adapter (TAP device). With a network adapter address of 192.168.2.0 and a subnet mask of 255.255.255.0, the IP port must be in a range between 192.168.2.2 and 192.168.2.254.
  6. You can also specify the EtherCAT DNS server. This can be, for example, the controller or another router in the network.
  7. Enter the IP address of the TAP device as the gateway address, e.g. 192.168.2.1.

Make routing known on engineering PC

To access the EtherCAT slave from an engineering PC via EoE routing, the route address must be made known to the PC. This is done by entering it in the command line.

Example: route ADD 192.168.2.0 MASK 255.255.255.0 192.168.1.100

This means that the subnet 192.168.2.0/24 is reached via the router in the device with the IP address 192.168.1.100.

Test Routing

  1. Select the EtherCAT Master.
  2. Go online by clicking the [Connect] button.
  3. The application is loaded on the EtherCAT Master. The EoE settings are enabled.
  4. Launch the application.
  5. You can now reach the EtherCAT slave from the EtherCAT Master.
    Test this, for example, with a ping command from the EtherCAT Master.