EPI4xxx, ERI4xxx - IO-Link box module with analog outputs

Online configuration settings - TwinCAT (master)

In this part of the documentation is the configuration of a physically existing IO-Link master in TwinCAT described.

Online configuration “Scan” (TwinCAT 3.x)


Distinction between Online and Offline

The distinction between online and offline refers to the presence of the actual I/O environment (drives, terminals, box-modules).

If the configuration is to be prepared in advance of the system configuration as a programming system, e.g. on a laptop, this is only possible in “Offline configuration” mode. In this case all components have to be entered manually in the configuration, e.g. based on the electrical design (as described under 1. Importing the device description IODD).
If the designed control system is already connected to the EtherCAT system and all components are energized and the infrastructure is ready for operation, the TwinCAT configuration can simply be generated through “scanning” from the runtime system. This is referred to as online configuration. In any case, during each startup the EtherCAT master/ IO-Link master checks whether the devices it finds match the configuration. This test can be parameterized in the extended device settings.

To take advantage of the current features/settings of the master, the latest version of the ESI file should always be downloaded. Therefore it is necessary to consider the following note first.

Installation of the latest ESI-XML device description
The TwinCAT System Manager needs the device description files for the devices to be used in order to generate the configuration in online or offline mode. The device description is contained in the so-called ESI files (EtherCAT Slave Information) in XML format. These files can be requested from the respective manufacturer and are made available for download. The ESI files for Beckhoff EtherCAT devices are available on the Beckhoff website. The ESI files should be saved in the TwinCAT installation directory (default: C:\TwinCAT\IO\EtherCAT). The files are read (once) when a new System Manager window is opened. A TwinCAT installation includes the set of Beckhoff ESI files that was current at the time when the TwinCAT build was created. For TwinCAT 2.11 and higher, the ESI directory can be uploaded from the System Manager, if the programming PC is connected to the internet (TwinCAT → EtherCAT-Devices → Update Device Description…) see following figure.
Update Device Descriptions

The following conditions must be met before a configuration can be set up:

the real EtherCAT and IO-Link hardware (devices, couplers, drives) must be present and installed
the master/devices must be connected via EtherCAT cables and IO-Link cables in the same way as they are intended to be used later
the devices/modules be connected to the power supply and ready for communication
TwinCAT must be in CONFIG mode on the target system.

The online scan process consists of:

detecting the EtherCAT device (Ethernet Port at the IPC)
detecting the connected EtherCAT devices. This step can be carried out independent of the preceding step.

The scan with existing configuration can also be carried out for comparison.


Detecting/scanning of the EtherCAT device

The online device search can be used if the TwinCAT system is in CONFIG mode (blue TwinCAT icon or blue indication in the System Manager).

TwinCAT CONFIG mode display
Online scanning in Config mode
The online search is not available in RUN mode (production operation).
Note the differentiation between TwinCAT programming system and TwinCAT target system. The TwinCAT icon next to the Windows clock always shows the TwinCAT mode of the local IPC. The System Manager window shows the TwinCAT state of the target system.

Right-clicking on “I/O Devices” in the configuration tree opens the search dialog.

Scan Devices

This scan mode not only tries to find EtherCAT devices (or Ethernet ports that can be used as such), but also NOVRAM, fieldbus cards, SMB etc. Not all devices can be found automatically.

note for automatic device scan

Ethernet ports with installed TwinCAT real-time driver are shown as “RT Ethernet” devices. An EtherCAT frame is sent to these ports for testing purposes. If the scan agent detects from the response that an EtherCAT slave is connected, the port is shown immediately as an “EtherCAT Device”.

detected Ethernet devices

After confirmation with “OK” a device scan is suggested for all selected devices, see following figure.


Detecting/Scanning the EtherCAT devices

Online scan functionality
During a scan the master queries the identity information of the EtherCAT slaves from the slave EEPROM. The name and revision are used for determining the type. The respective devices are located in the stored ESI data and integrated in the configuration tree in the default state defined there.  Name_Revision

If an EtherCAT device was created in the configuration (manually or through a scan), the I/O field can be scanned for devices/slaves.

scan query after automatic creation of an EtherCAT device

The configuration has been build and directly shifted into the online state (OPERATIONAL). The EtherCAT system should then be in a functional cyclic state, as shown in the following figure.

online display example

Please note:

all slaves should be in OP state
the EtherCAT master should be in “Actual State” OP
“frames/sec” should match the cycle time taking into account the sent number of frames
no excessive “LostFrames” or CRC errors should occur

The configuration is now complete. It can be modified as described under the offline procedure.


The connected IO-Link master (EP6224-2022) is displayed in the TwinCAT structure as you can see in the figure below.

Master display after scan for boxes


Various effects may occur during scanning.

An unknown device is detected, i.e. an EtherCAT slave for which no ESI XML description is available. In this case the System Manager offers to read any ESI that maybe stored in the device.
Devices are not detected properly
Possible reasons include:
faulty data links, resulting in data loss during the scan
slave has invalid device description
The connections and devices should be checked in a targeted manner, e.g. via the emergency scan.
Then re-run the scan.

Scan over existing configuration

If a scan is initiated for an existing configuration, the actual I/O environment may match the configuration exactly or it may differ. This enables the configuration to be compared.

identical configuration

If differences are detected, they are shown in the correction dialog, so that the user can modify the configuration as required.

correction dialog

It is advisable to tick the “Extended Information” check box to reveal differences in the revision.

This EtherCAT slave matches the entry on the other side. Both type and revision match.
This EtherCAT slave is present on the other side, but in a different revision. If the found revision is higher than the configured revision, the slave maybe used provided compatibility issues are taken into account. If the found revision is lower than the configured revision, it is likely that the slave cannot be used. The found device may not support all functions that the master expects based on the higher revision number.
light blue
This EtherCAT slave is ignored („Ignore“ button).
This EtherCAT slave is not present on the other side.
Device selection based on revision, compatibility
The ESI description also defines the process image, the communication type between master and slave/device and the device functions, if applicable. The physical device (firmware, if available) has to support the communication queries/settings of the master. This is backward compatible, i.e. newer devices (higher revision) should be supported if the EtherCAT master addresses them as an older revision. The following compatibility rule of thumb is to be assumed for Beckhoff EtherCAT Terminals/Boxes:
device revision in the system >= device revision in the configuration
This also enables subsequent replacement of devices without changing the configuration (different specifications are possible for drives). Example: If an EL2521-0025-1018 is specified in the configuration, an EL2521-0025-1019 or higher (-1020, -1021) can be used in practice.
If current ESI descriptions are available in the TwinCAT system, the last revision offered in the selection dialog matches the Beckhoff state of production. It is recommended to use the last device revision when creating a new configuration, if current Beckhoff devices are used in the real application. Older revisions should only be used if older devices from stock are to be used in the application.
correction dialog with modifications

Once all modifications have been saved or accepted, click “OK” to transfer them to the real *.tsm configuration.