6.2. Multiple EtherCAT® Bus Support

6.2.1. Licensing

Multiple EtherCAT® Bus support is included within the Class B and Class A MainDevice stack. For each bus a separate runtime license is required. A single runtime allows the usage of the multi instance functions only with an instance identifier of 0.

6.2.2. Overview

The acontis EtherCAT® MainDevice allows controlling more than one EtherCAT® bus within one application process. For this use case the MainDevice core is instantiated several times by using the multi instance API functions inside the application. Each API function is available as a single instance version (prefix ecat, e.g. ecatInitMaster()) and a multi instance version (prefix em, e.g. emInitMaster()). The first parameter of all multi instance functions emXxx() is the instance identifier. The single instance functions ecatXxx() will use the first MainDevice core instance with the identifier 0. The maximum number of supported instances is 12 (MAX_NUMOF_MASTER_INSTANCES).

EC-Master multi-instance API architecture showing multiple MainDevice instances each controlling a separate EtherCAT bus via a shared API

6.2.3. Example application

The application EcMasterDemoMulti demonstrates a client application which handles two MainDevice instances with the following configuration (el9800.xml):

  • MainDevice instance 0: One Beckhoff EtherCAT® Evaluation Board EL9800

  • MainDevice instance 1: One Beckhoff EtherCAT® Evaluation Board EL9800

Parameters for this application:

-ndis 192.168.1.32 1 -f el9800.xml @ -ndis 192.168.2.32 1 -f el9800.xml