Ethernet over EtherCAT

Ethernet over EtherCAT (EoE) is a protocol that allows a Windows client application to communicate with a server program of an EtherCAT device (EtherCAT slave) through Ethernet packets using the EtherCAT network. The simplest way to connect the client and server is to use network interface cards (NIC). Note, however that this requires Windows and the server program each to have two NICs (four NICs total), because the EtherCAT network does not allow other Ethernet packets to run. If you have several EtherCAT slaves, each slave needs two NICs to use Ethernet and EtherCAT.

EoE solves this problem by encapsulating the Ethernet packets in EtherCAT mailbox packets. The Windows client application and device server application communicate through virtual NICs instead of physical NICs.

The principle of how the virtual NIC works is that the Windows application sends Ethernet packets to the virtual NIC. If there are multiple devices using EoE, the virtual switch that is bundled with KINGSTAR (EtherCAT master) divides the packets based on each device's MAC address, and sends them to KINGSTAR, which encapsulates these Ethernet packets in EtherCAT mailbox packets. It then sends the encapsulated packets to the slave through the EtherCAT NIC. Finally, the slave takes the Ethernet packets out of the encapsulated packets and sends them to the server program.

While EoE is convenient, it has limitations:

  1. The response time is slow. It takes a few milliseconds to receive the returned packets.
  2. You must configure the EoE settings in KINGSTAR manually. By default, the EoE feature is disabled.

Configure the EoE settings in KINGSTAR

The following steps describe how to set up EoE in KINGSTAR.

I. Configure the Windows IP Address and Subnet mask

To use virtual NIC, we need to assign an IP address to Windows and RTX64, and provide the subnet mask. The first step is to assign an IP address to Windows.

NOTE:  The connection for Internet Protocol Version 4 (TCP/IPv4) must be checked for the Virtual Network to function. Internet Protocol Version 6 (TCP/IPv6) is not supported, whose check box can be cleared.

  1. Open the Internet Protocol Version 4 (TCP/IPv4) Properties:
  2. Windows 10: Control Panel > Network and Internet > View Network Status and Tasks > Change adapter settings > Ethernet: Windows Virtual RTX64 Ethernet > Properties (right-click) > Internet Protocol Version 4 (TCP/IPv4) > Properties > Use the following IP address

  3. Set the IP Address you wish to use. We suggest you use the following settings:
  4. Windows: 192.168.100.254

    Subnet mask: 255.255.255.0

    IMPORTANT:  The Subnet mask you specify in Windows must match the Subnet mask specified in the RTX64 Control Panel. By default, the RtVirtualNic interface sets the Subnet mask to 255.255.255.0.

    IMPORTANT:  The Default gateway and DNS boxes must be empty.

  5. Click OK.
II. Configure RTX64 Virtual Network Interface

Virtual NIC is part of the RTX64 feature. We need to configure it in the RTX64 control panel. Virtual NIC and EoE is available in KINGSTAR 3.3 or later. To use EoE, you need to install KINGSTAR 3.3 or higher versions.

  1. On the taskbar, click Start > RTX64 4.5 Runtime > RTX64 Control Panel.
  2. Click Manage interfaces.
  3. On the left pane, click to add a new interface.
  4. In the Add Interface dialog box, in the Device list, select RTX64 Virtual Network Interface. Other boxes are automatically populated after you made the selection. The first three octets of the IP address of Windows and RTX64 must be the same. For IPv4 address, we suggest you use 192.168.100.253. When you're done, click Add.
  5. NOTE:  If you use the default address 192.168.100.50, the maximum number of the EtherCAT slaves working with the default EoE configuration will be 49. Setting the last octet to 253 can avoid the problem when you have slaves more than 50, and raises the maximum number of slaves to 252. If you have more slaves, you need to manually configure all IP addresses, MAC addresses, and Netmasks.

  6. Under NAL properties, in the Device list, the RTX64 Virtual Network Interface added on the left pane should be displayed. If it isn't, select the virtual NIC you've added on the left pane.
  7. Under TCP/IP Stack properties, in the Filter status list, select Enabled.
  8. In the Filter name box, browse to the file KSeoe.rtdll, which is in the <KSMDir>\bin (<KSMDir> is the location where KINGSTAR is installed). This will associate the KINGSTAR filter with the interface.

Begin to use EoE

After you set up EoE and start KINGSTAR, KINGSTAR automatically assigns an IP address to each EtherCAT slave. The IP address of the EtherCAT slave is "slave ID + 1." For example, if you have three slaves that don't support EoE, and their IDs are 0, 1, 2, the IP address of the fourth slave that supports EoE is 192.168.100.4. Its slave ID is 3, so its IP address is 4 (the last octet).

NOTE:  EoE works only in the operational state (Op).

Change the IP address of the EtherCAT slave

If you don't want to use the IP address KINGSTAR assigns to the slave, you can use the IP setting function to change the IP address.