1. Generate ENI-File

As already mentioned, the master requires an EtherCAT Network Information (ENI) file. For this purpose, the EtherCAT coupler (including the input and output terminals) is temporarily connected to a computer on which TwinCAT3 is installed. Of course, all other available tools can also be used to create ENI files.

Connect Hardware to Laptop

Fig. 4 Connect the EtherCAT Devices to a Laptop

You can either follow the general instructions in section “Export Configuration File…” of the Beckhoff TwinCAT3 Manual or follow our example guide below.

1.1. Open New Project

After opening TwinCAT3 click on File -> New Project. Then fill out the names and provide a location to which the new project is saved. Complete your entered data with a click on OK.

New Project

Fig. 5 Creating a new project

Afterwards the following TcXaeShell window should appear (it may take a short while).

TcXaeShell

Fig. 6 TcXaeShell for a new project

1.2. Scan for Devices

Expand the I/O section in the Solution Explorer with a click on the small triangle and select the Devices section. Afterwards right-click on Devices and then click on Scan. Now the following pop-up should appear, which you can accept with OK.

ScanDevices

Fig. 7 Scan for EtherCAT devices

Once new devices are found (in our case I/O devices), the following pop-up should appear. Select the devices you want to use in your project (most likely all) and continue with a click on OK.

foundDevices

Fig. 8 Found EtherCAT devices during scanning

The succeeding pop-ups, which ask for scanning for boxes and activating the free run, can both be answered with yes. Once finished, the devices found (called Device 2 in our example) are listed under Devices. If they don’t show up correctly, it might be necessary to download and add ESI files for your devices. Consult the manual of your device and the documentation of TwinCAT3 in this case.

1.3. Export ENI-File

Select Device 2 with double click. Then chose the middle tab, named EtherCAT, in the upper middle section of the TcXaeShell, named after the project (here DIO Example). The following should then be displayed.

exportENI

Fig. 9 Overview of the device

Now click on Export Configuration File… and save the eni.xml to a destination of your choice.

saveENI

Fig. 10 Save the ENI file

1.4. Reference ENI-File

You can download the ENI file eni.xml for the EtherCAT bus structure described in this example.