EtherLab® EtherCAT Master

SimWB can act as an EtherCAT master using the low level driver and API provided by EtherLab®. That is, SimWB can be configured to act as a master to query EtherCAT remote I/O slave devices on the network.

The EtherCAT master runs on a standard Ethernet interface whose driver is provided by the Linux kernel.
Before running an EtherCAT master under SimWB, you must first install the package provided by EtherLab®.

Reference Information

I/O Card Model Number

N/A. Use system ethernet device.

I/O Driver Model Number

N/A.

I/O Module License:

ICS-SWB-1250 : EtherCAT master license for 10 slaves.

ICS-SWB-1251 : EtherCAT master license for 10 additional slaves.

EtherLab® Package Installation

To install the EtherLab® package, use the following steps:

Tune System for Optimal Real-Time Performance

To optimize the EtherCAT bus performance, you can perform the following tuning. Append the /etc/rc.d/rc.local file with the commands that follow to invoke these optimizations every time the system reboots.
Note: The following instructions assume that eth1 is configured as the EtherCAT master.

Use Dedicated Port for Optimal Real-Time Performance

It is recommended that you dedicate an ethernet port for the EtherCAT bus to ensure real-time performance. Also, configure the Network Manager to not reset/auto-connect to this port.

SimWB I/O Mapping

Mapping the PDO (process data object) of EtherCAT slaves to RTDB items is a 3-step process.

  Slave PDO list:
 
When you open the mapping panel for the EtherCAT master, the list of online slaves is displayed automatically. You will not be able to configure the slave and map PDOs to RTDB items if your EtherCAT network is off or you have no slaves connected to it.
All the slave PDOs available for reading or writing are visible in the list.
 
You can drag and drop TxPDO(s) (Tx from the viewpoint of the slave) into the input domain (input into SimWB, DomainIn). Similarly, you can drag and drop RxPDO(s) into the output domain (DomainOut).

  Mailbox COE (CANOpen over EtherCAT):
 
This tab displays the slave SDOs (Service Data Objects) and allows you to configure their values. Refer to your slave documentation for the function of particular SDOs.
 
The list is read from the online slaves and saved in the SimWB RTDB so that it does not have to be re-read every time the panel is open as this is a slow process. The list can be refreshed by clicking on the Read from Slaves button.
You might have to set slave SDOs to specific values to open slave PDOs that are not available in the default on state configuration for the slave. Click on the SDO value field to edit the value. Only writable entries can be edited this way.
If you changed an SDO value, you can update the slave immediately by clicking on the Download SDOs button. You should then go back to the slave PDO list and refresh the list of PDOs by clicking on the Rescan Slaves button in the Online Slaves tab.
 
To write specific values to the SDOs on test startup, before the EtherCAT master I/O task starts scanning the network, you must check the corresponding checkbox in the Set on Start column. The software writes the values for the SDOs with Set on Start selected before configuring the slave PDOs.

  Mapping into Input & Output Domains:
 
Drag a collection of PDOs from the Online Slaves list and drop them into the corresponding domain.
You can now select a specific PDO and map it by selecting and checking the appropriate box in the RTDB item list in the right-hand side.
Only RTDB items corresponding to the PDO data type (Analog / Digital - Single bit) will be displayed in the RTDB item list.

Troubleshooting

If you encounter unexpected behavior, the output of the following commands may help in debugging the issue:

EtherLab® Package Installation (Legacy Method)

Note:  The libraries corresponding to the EtherLab® package are by default installed in the /opt/etherlab/lib directory, which is not in the default system path of dynamic libraries. You should make a link to the library with in the /usr/local/lib/ directory.
cd /usr/local/lib/
ln -sf /opt/etherlab/lib/libethercat.so.1.0.0
ln -sf /opt/etherlab/lib/libethercat.so.1
ln -sf /opt/etherlab/lib/libethercat.so
         To update the dynamic linker run-time bindings, execute ldconfig. If the run-time linker is not updated, then you could run into the following error when you start the test:
elabecatm_in: error while loading shared libraries: libethercat.so.1: cannot open shared object file: No such file or directory