1. Introduction

1.1. What is EtherCAT?

EtherCAT is an IEEE802.3 Ethernet based fieldbus system. EtherCAT defines a new standard in communication speed and is due to its flexible topology and simple configuration to handle like a conventional Fieldbus. The implementation of EtherCAT is inexpensive to implement which allows the system to use fieldbus technology in applications which had to ommit fieldbus use in the past. EtherCAT is an open technology which is standardized within the IEC (International Electrotechnical Commission). The system itself is supported and powered by the EtherCAT Technology Group, which is an international community of users and vendors where more than 3100 members already joined including acontis technologies GmbH.

Fieldbusses are proved and established in automation and most applications depend on them. The use of PC based control systems in a reasonable way was only made possible by the introduction of fieldbus technology. Since the control CPU’s speed is increasing rapidly (especially with IPC’s), the conventional fieldbus systems are moreover become the bottle neck and limit the reachable performance of the control systems. Additionaly the control topology becomes multi layered with some subsided cyclic systems:

  • the control task himself

  • the fieldbus system

  • and propably some local extension busses in the I/O system

  • or simply the local firmware cycle in the peripheral device

Because of this latency times are generated which are typically a multiple of 3 or 5 of the control cycle time, which is not a satisfying solution in most applications. On top of the fieldbus systems, to interconnect control systems, ethernet is state of the art for a long time. The use of Ethernet to control drives or I/O systems is pretty new and was reserved for the conventional fieldbus systems in the past. In this focus the propability to carry small data, hard real time possibilities and of course low costs are the primary requirements. EtherCAT fulfills those requirements and brings internet technologies to the level of I/O communication.

1.2. EtherCAT protocol

The EtherCAT protocol is optimized for process data transfer and is transported directly within the Ethernet frame thanks to a special Ethertype. It may consist of several EtherCAT telegrams, each serving a particular memory area of the logical process image which can address up to 4 gigabytes in size. The data sequence is independent of the physical order of the Ethernet terminals in the network; addressing can be in any order. Broadcast, Multicast and communication between slaves are possible. Direct Ethernet frame transfer is used in cases where maximum performance is required and the EtherCAT components are operated in the same subnet as the controller. However, EtherCAT applications are not limited to a single subnet: EtherCAT UDP packages the EtherCAT protocol into UDP/IP datagrams. This enables any control with Ethernet protocol stack to address EtherCAT systems. Even communication across routers into other subnets is possible. In this variant, system performance obviously depends on the real-time characteristics of the control and its Ethernet protocol implementation. The response times of the EtherCAT network itself are hardly restricted at all: the UDP datagram only has to be unpacked in the first station. In addition to data exchange according to the master/slave principle, EtherCAT is also very suitable for communication between controllers (master/master). Freely addressable network variables for process data and a variety of services for parameterization, diagnosis, programming and remote control cover a wide range of requirements. The data interfaces for master/slave and master/master communication are identical. For slave to slave communication, two mechanisms are available. Upstream devices can communicate to downstream devices within the same cycle and thus extremely fast. Since this method is topology dependent, it is particularly suitable for slave to slave communication relationships given by machine design - e.g. in printing or packaging applications. For freely configurable slave to slave communication, the second mechanism applies: the data is relayed by the master. Here two cycles are needed, but due to the extraordinary performance of EtherCAT this is still faster than any other approach. EtherCAT only uses standard frames according to IEEE802.3 - the frames are not shortened. EtherCAT frames can thus be sent from any Ethernet MAC, and standard tools (e.g. monitor) can be used.

1.3. EC-Simulator - Features

Feature ID: Unique identification used in ETG.1500 EtherCAT Master Classes

Feature name

Short description

Implemented

Feature ID

Service Commands

Support of all commands

x

101

IRQ field in datagram

Use IRQ information from Slave in datagram header

x

102

Slaves with Device Emulation

Support Slaves with and without application controller

x

103

EtherCAT State Machine

Support of ESM special behavior

x

104

Error Handling

Checking of network or slave errors, e.g. Working Counter

105

VLAN

Support VLAN Tagging

106

EtherCAT Frame Types

Support EtherCAT Frames

x

107

UDP Frame Types

Support UDP Frames

108

Cyclic PDO

Cyclic process data exchange

x

201

Multiple Tasks

Different cycle tasks

Multiple update rates for PDO

x

202

Frame repetition

Send cyclic frames multiple times to increase immunity

x

203

Online scanning

Network configuration functionality included in EtherCAT Master

x

301

Reading ENI

Network Configuration taken from ENI file

x

Compare Network configuration

Compare configured and existing network configuration during boot-up

x

302

Explicit Device identification

Identification used for Hot Connect and prevention against cable swapping

x

303

Station Alias Addressing

Support configured station alias in slave,

i.e. enable 2nd Address and use it

x

304

Access to EEPROM

Support routines to access EEPROM via ESC register

x

305

Support Mailbox

Main functionality for mailbox transfer

x

401

Mailbox Resilient Layer

Support underlying resilient layer

x

402

Multiple Mailbox channels

x

403

Mailbox polling

Polling Mailbox state in slaves

x

404

SDO Up/Download

Normal and expedited transfer

x

501

Segmented Transfer

Segmented transfer

x

502

Complete Access

Transfer the entire object (with all sub-indices) at once

x

503

SDO Info service

Services to read object dictionary

x

504

Emergency Message

Receive Emergency messages

x

505

PDO in CoE

PDO services transmitted via CoE

506

EoE protocol

Services for tunneling Ethernet frames. includes all specified EoE services

x

601

Virtual Switch

Virtual Switch functionality

602

EoE Endpoint to Operation Systems

Interface to the Operation System on top of the EoE layer

603

FoE Protocol

Support FoE Protocol

x

701

Firmware Up-/Download

Password, FileName should be given by the application

x

702

Boot State

Support Boot-State for Firmware Up/Download

x

703

SoE Services

Support SoE Services

x

801

AoE Protocol

Support AoE Protocol

x

901

VoE Protocol

External Connectivity supported

x

1001

DC support

Support of Distributed Clock

1101

Continuous Propagation Delay compensation

Continuous Calculation of the propagation delay

1102

Sync window monitoring

Continuous monitoring of the S ynchronization difference in the slaves

1103

via Master

Information is given in ENI file or can be part of any other network configuration

Copying of the data can be handled by master stack or master’s application

x

1201

1.4. Editions (HiL / SiL)

1.4.1. Hardware-in-Loop (HiL) Simulation

The System-Under-Test (SUT) is communicating via an EtherCAT cable with the EC-Simulator software running on an external hardware, the HiL System. In this setup the unchanged application together with the EtherCAT master can be tested using the standard physical network interface.

1.4.2. Software-in-the-Loop (SiL) Simulation

The EtherCAT network is simulated by a software running on the System Under Test (SUT). Instead of communicating with the Ethernet Controller, the EC-Master EtherCAT master is directly exchanging EtherCAT frames with the simulation software.

1.5. Protected version

The EC-Simulator software is available in different protected versions:

  • Dongled: Binary with dongle protection (Windows only)

  • Protected: Binary with MAC protection. Requires a physical network adapter for license check (HiL/SiL).

  • Source: Binary and source code without protection

  • Unrestricted: Binary without MAC protection

The protected version is limited to 5 slaves and will automatically stop after about 10 minutes of continuous operation. In order to remove this restriction a valid runtime license key or a dongle is required. The runtime license protection with license key is based on the MAC address of the Ethernet controller used for the EtherCAT protocol. With a valid license key and Protected version the purchased features are automatically unlocked. The Dongled version needs the Dongle and WIBU service to be installed and running. The purchased features stored on the Dongle are automatically unlocked.

1.5.1. Licensing procedure for Development Licenses

  1. Installation of EC-Simulator Protected or Dongled version accordingly

  2. In case of EC-Simulator Protected: Determine the MAC Address by calling esGetSrcMacAddress(0, &oSrcMacAddress)/ecatGetSrcMacAddress(&oSrcMacAddress) or from a sticker applied on the hardware near the Ethernet controller.

  3. Send an Email with the subject “Development License Key Request” with the MAC address to sales@acontis.com

  4. Acontis will create the license keys and return them in a License Key Text File (CSV format).

Number;MAC Address;License Key
1;00-00-5A-11-77-FE;DA1099F2-15C249E9-54327FBC-3BA579B2-318AB2B6-CD13B221
2;64-31-50-80-20-4E;A2B4C98D-00185EF9-22134567-DA1099F2-15C249E9-54327FBC
  1. Activate the License Key by calling esSetLicenseKey() or EC_T_LINK_PARMS_SIMULATOR (SiL) with the license key that corresponds to the MAC address on the hardware and check the return code. The license key is 53 characters long. For HiL the API esSetLicenseKey() must be called after esInitSimulator() and before esConfigureNetwork(). For SiL the license key must be set at EC_T_SIMULATOR_INIT_PARMS::szLicenseKey .

Example HiL:

esSetLicenseKey(0, "A2B4C98D-00185EF9-22134567-DA1099F2-15C249E9-54327FBC");

Example SiL:

EcMasterDemo -simulator 1 1 eni.xml --lic A2B4C98D-00185EF9-22134567-DA1099F2-15C249E9-54327FBC --link -i8254x 1 1

1.5.2. Licensing procedure for Runtime Licenses

  1. Installation of EC-Simulator Protected or Dongled version accordingly

  2. In case of EC-Simulator Protected: Determine the MAC Address by calling esGetSrcMacAddress(0, &oSrcMacAddress)/ecatGetSrcMacAddress(&oSrcMacAddress) or from a sticker applied on the hardware near the Ethernet controller.

  3. Provide the MAC Addresses and numbers from previously ordered and unused runtime license stickers in a text file to acontis as described in the example below. Please use a separate line for each runtime license sticker number and MAC Address.

100-105-1-1/1603310001;00-00-5A-11-77-FE
100-105-1-1/1603310002;64-31-50-80-20-4E
  1. Send an Email with the subject “Runtime License Key Request” with the MAC address to sales@acontis.com

  2. Acontis will create the license keys and return them in a License Key Text File (CSV format).

Number;MAC Address;License Key
1;00-00-5A-11-77-FE;DA1099F2-15C249E9-54327FBC-3BA579B2-318AB2B6-CD13B221
2;64-31-50-80-20-4E;A2B4C98D-00185EF9-22134567-DA1099F2-15C249E9-54327FBC
  1. Activate the License Key by calling esSetLicenseKey() or EC_T_LINK_PARMS_SIMULATOR (SiL) with the license key that corresponds to the MAC address on the hardware and check the return code. The license key is 53 characters long. For HiL the API esSetLicenseKey() must be called after esInitSimulator() and before esConfigureNetwork(). For SiL the license key must be set at EC_T_SIMULATOR_INIT_PARMS::szLicenseKey .

Example HiL:

esSetLicenseKey(0, "A2B4C98D-00185EF9-22134567-DA1099F2-15C249E9-54327FBC");

Example SiL:

EcMasterDemo -simulator 1 1 eni.xml --lic A2B4C98D-00185EF9-22134567-DA1099F2-15C249E9-54327FBC --link -i8254x 1 1

1.6. Known restrictions

Some slaves require extended information to be simulated.

The “<ExtendedInfo>”-Tag in EXI are currently not importable to EC-Engineer and must be removed before importing EXI as ENI file. Simulator settings contained in the extended information are stored in the .ecc file and can be copied between EC-Engineer instances using Copy and Paste.

Value Information (Default, Min, Max) from object dictionary cannot be retrieved using SSC, see SSC\sdoserv : „the transmission of the value info is not supported yet of the sample code”.

Occasional start up error (timeout) in case of DCM Bus Shift (DC control loop not included in EC-Simulator), work-around with OsQueryMsecCount() replacement possible.

1.7. License

1.7.1. EC-Simulator license

According to EC-Simulator Software License Agreement (SLA).

1.7.2. Free Open Source Software contained in EC-Simulator

1.7.2.1. Expat XML parser license

Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
and Clark Cooper
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.7.3. Free Open Source Software supported by EC-Simulator

The following components are not part of EC-Simulator, but relate to it:

1.7.3.1. acontis atemsys Linux kernel module

The acontis atemsys is licensed under the GPL:

Copyright (c) 2009 - 2020 acontis technologies GmbH, Ravensburg, Germany
All rights reserved.

This program is free software; you can redistribute  it and/or modify it
under  the terms of  the GNU General  Public License as published by the
Free Software Foundation;  either version 2 of the  License, or (at your
option) any later version.

1.7.3.2. WinPCap

The WinPCap library is supported, but not shipped with EC-Simulator.

1.7.3.3. Npcap

The Npcap library is supported, but not shipped with EC-Simulator.