EtherCAT Master

The EtherCAT Master provides a master implementation with the following functionality:

  • test I/O data exchange with an iRJ45 device via EtherCAT

  • identify the device via the EtherCAT

  • cycle through the different states of the EtherCAT state machine

  • retrieve the object dictionary from the device

  • read object dictionary values

  • adjust RxPDO and TxPDO mapping

  • write the EEPROM of the device

The EtherCAT master implementation always assumes, that the device ist the first slave in the EtherCAT network. Working with more than one slave is currently not supported.

 

The EtherCAT master implementation cannot be used on interfaces that use an AutoIP address due to limitations of WinPCAP/npcap.

Enabling the EtherCAT mode

To work with the EtherCAT Master, the EtherCAT mode must be activated for the according network interface. To activate the mode, right click on a network and click on “Enable EtherCAT” as shown in the figure below.

Enabling EtherCAT for an interface

This will start the EtherCAT proxy program. Starting the proxy may take several seconds. The timeout for starting the proxy can be configured via Preferences -> EtherCAT ->Proxy start wait time in s. The default wait time is set to 10s. EtherCAT-enabled network interfaces are marked by red font color as depicted in the figure below.

Interface with activated EtherCAT mode

After enabling the network, the devices on the network can be searched via the search function as explained in section 4. This will run the device detection protocol via EoE. Once a device is found, the different tabs of the EtherCAT Master become active.

Please note, that the ICE shows the modulename (configured at the CM variables) in the “Network Navigator”. This name is independant from the “Manufacturer Device Name” configured in the EEPROM and application.

Device Info and State Machine

The EtherCAT Master consists of five different tabs.  The Device Info tab allows to retrieve basic EtherCAT device information like the device state, product name also contains the state machine of the device.

After scanning the network, by clicking on the “Refresh Device Info” button, the initial state of the device is read and shown in the state machine. The user can now cycle through the different states by double clicking on the desired state. The state machine can only switch to the next connect state e.g. switch from “Init” to “Pre-Operational” but not from “Init” to “Safe-Operational”.

Device Info tab with state machine

When switching to the next state was successful, the new state is shown with a green rectangle. In case an error occurred (error bit set in the current state), the state is marked with a red rectangle.

The following picture shows an error state where the user tried to switch from “Init” to “Bootstrap” but the “Bootstrap” state is not supported by the device:

As the long as the error is not acknowledged, the device may not switch to another state. The error can be acknowledged by clicking on “Acknowledge Error”. If successful, the error is gone and the state is marked with a green rectangle.

The Object Dictionary and Exchanging I/O data

The Object Dictionary tab allows to read the object dictionary of the device.

Reading the object dictionary is split into two phases:

  • Reading the info about the available objects via the button “Read Object Dictionary”: this only retrieves the list of available ojects and its meta information like access rights, mapping information aso.

  • Retrieving object value via the button “Read all object values”: this retrieves the actual values of the different objects

It is also possible to retrieve a single value. Therefore, select an entry in on the right side of the Object Dictionary table and click on the button “Read Value”.

The PDO Mapping tab allows to configure the mapping of the different PDOs. 

Mappings can be assigned to the different mapping parameter objects via the “Add object to mapping” button. First select the PDO mapping object that shall be changed in the PDO Mapper Objects list and then click on the button. Mappings can be removed via the “Remove object from mapping” button.

Which mapping objects are assigned to RxPDO and TxPDOs can be selected via the ”Select PDO assignment” button. 

When the mapping is changed, the data is not written to the device immediately. Once the assigned mapping is changed as required, click on “Write mapping config to device”. This triggers the update of the object dictionary within the device itself.

Process data can be exchanged via the I/O Data tab.

The I/O data tab shows on the RX PDO section the data that is sent as outputs to the device. The user can set the according values in the different fields.

The data exchange itself is started by clicking on “Start process data exchange”. To send the output data once the connection is establishd, click on “Update RxPDO data”. The input data (TX PDO) is updated on a regular interval.

While process data exchange is active, using EoE based services like reading/writing data via the ConfigManager or reading logs, is not available. 

Writing the EEPROM

Via the EEPROM tab, the EEPROM of an EtherCAT device can be written. The file to write can be selected via the “Load EEPROM Binary File” button.

The EEPROM file is sent to the device via the “Write EEPROM” button.