This page guides through the configuration of the Lokomat EtherCAT in Matlab R2013b. For Matlab R2017b, refer to TwinCAT documentation instead.
Additional documentation (general purpose) can be found here.
LinMot related documentation can be found here.
Install the EtherCAT Configurator.
Run as administrator and click Evaluate.
Apparently, only the 30 days trial is available for free. If the Evaluate button is disabled, try reinstalling or using a different machine. Note: could be possible to clean registers to restart the 30 days trial.
Download the ESI files of your devices connected to the EtherCAT network.
The LinMot drive is described with *.xml device description file distributed with the LinMotTalk software.
C:\Programme\LinMot\LinTalk1100 3.11 Build 20091204\Firmware\Interfaces\EtherCAT\XML\LinMot_ECAT_Servos_V1_4.xml
Use the correct Build version of LinMotTalk to match the driver firmware:
C1250 - LinMot-Talk 6.11 Build 20221104
E1250 - LinMot-Talk 5.1 Build 20121010
C:\Program Files (x86)\EtherCAT Configurator\EtherCAT\LinMot_ECAT_Servos_V1_4.xml
New ProjectI/O Devices and Scan Devices and select the Device with EtherCAT installed.EtherCAT devices are found, right-click on I/O Devices and Append Device and select the EtherCAT Master and the Network Device you want to use.Scan for Boxes click yes. This will scan the network connected to the selected I/O Device and the EtherCAT devices should appear.Activate Free Run click no. We don’t need to start the system to create an ENI.Here there are some Lokomat-specific actions to perform in order to make it work with Matlab R2013b.
We need to disable the EoE feature, as follows:
EtherCAT - Advanced Settings - Mailbox - EoE - Disable
If for any reason you already disabled the EoE feature on the Master, this option is not selectable. Re-enable the EoE Support on the Master first.
We need to enable the Distributed Clock feature, otherwise the EtherCAT FSM does not go into OP state at startup, as follows:
EtherCAT tab - Advanced Settings - Distributed Clock - Enable
DC tab - Operation Mode - DC-Synchron
We need to customize the PDO mapping, i.e., the packets that are sent and received from each driver through EtherCAT. The C1250 drivers come with the CoE mapping, and we want to use the default mapping, as follows:
Process Data - Outputs - Disable 0x1604 - Enable 0x1700
Process Data - Inputs - Disable 0x1A03 - Enable 0x1B00
We need to enable the Distributed Clock feature, otherwise the EtherCAT FSM does not go into OP state at startup, as follows:
Box 5 - EtherCAT tab - Advanced Settings - Distributed Clock - Enable
Box 5 - DC tab - Operation Mode - SM-Synchron
The PDO mapping of the E1250 should be correct by default. If needed, change the PDO mapping following the instructions above.
If you select
DC-Synchronfor the E1250 LinMot Driver, the drive sendsPDOoutput, but does not receivePDOinput (commands). Make sure it is set toSM-Synchron!
When available, we need to disable the FoE (File Access of EtherCAT) feature, as follows:
Term XX - EtherCAT tab - Advanced Settings - Mailbox - FoE - Disable
After this, the FoE option should disappear.
Check if the Distibuted Clock Operation Mode is on FreeRun, as follows:
Term XX - DC tab - Operation Mode - FreeRun/SM-Synchron
For some reason, if you set
DC-Synchronfor the Beckhoff terminals, the system does not go intoOPstate at startup. Make sure it is set toFreeRun/SM-Synchron!
We need to disable the EoE in the Master, as follows:
Device (EtherCAT) - EtherCAT tab - Advanced Settings - EoE Support - Virtual Ethernet Switch - Disable
We need to enable the Distributed Clock (DC) in the Master, as follows:
Device (EtherCAT - Distributed Clock - Automatic Selection
To set a cycle time for the ENI, we need to configure a Dummy Task and link it to some dummy I/O variables, as follows:
Additional Tasks - right-click - Append Task (default name Task 1 is fine)Task 1 node, and set Cycle Ticks to
1 to set the update rate to 1000Hz2 to set the update rate to 500HzSet the task inputs:
Drive 1/Default Inputs/StatusWord onto Inputs of Task 1It doesn’t matter which variable you select, as long as you select one. You don’t have to repeat this for each Drive!
Then double-click the StatusWord node under Task 1, and select the StatusWord variable under Drive 1.
Alternatively, click on StatusWord, click Linked to ..., and select the 'StatusWord` variable under Drive 1.
It is not important to link the Task to the same exact variable, as long as they are the same type (e.g.,
UINT16)
Set the task outputs:
Drag some parameter, e.g. Drive 1/Default Output/ControlWord onto Outputs of Task 1
Then double-click the ControlWord node under Task 1, and select the ControlWord variable under Drive 1.
To export the ENI file, follow:
Check the topology:
Device (EtherCAT) - EtherCAT - Topology
Export the file:
Device (EtherCAT) - EtherCAT - Export Configuration File....
Save the configuration for further use:
File - Save as - ENI_configuration.esm
If you want to change some configuration in the EtherCAT network, you can reopen the configuration (
.esm) and you don’t have to reconnect the network and/orScan Devices
| Old Config | New Config | Code | Description | Channel 1 | Channel 2 | Channel 3 | Channel 4 | Channel 5 |
|---|---|---|---|---|---|---|---|---|
| Box 1 | BM8050-EC | LinMot Gateway | ||||||
| Drive 1 | C1250-MIDS-XC-1S | LinMot Driver RA | ||||||
| Drive 2 | C1250-MIDS-XC-1S | LinMot Driver RI | ||||||
| Drive 3 | C1250-MIDS-XC-1S | LinMot Driver LI | ||||||
| Drive 4 | C1250-MIDS-XC-1S | LinMot Driver LA | ||||||
| Box 2 | Box 5 | E1250-EC-UC | LinMot Driver PM | |||||
| Term 3 | Term 6 | EK1100 | Terminal | |||||
| Term 4 | Term 7 | EL3255 | Analog channels | Pelvis Pot | HipRotR Pot | HipRotL Pot | BWS Pot | |
| Term 5 | Term 8 | EL3255 | Analog channels | KneeL Pot1 | KneeR Pot1 | KneeR Pot2 | KneeL Pot2 | |
| Term 6 | Term 9 | EL3255 | Analog channels | LA Pot | LI Pot | RI Pot | RA Pot | |
| Term 7 | Term 10 | EL3102 | Analog Input +/- 10V | KneeL Force | KneeR Force | |||
| Term 8 | Term 11 | EL5101 | Incremental Encoder | BWS Enc | ||||
| Term 9 | Term 12 | EL9510 | Power Supply 10V | |||||
| Term 10 | Term 13 | EL3356-0010 | Analog Resistor Bridge | |||||
| Term 11 | Term 14 | EL9505 | Power Supply 5V | |||||
| Term 12 | Term 15 | EL9011 | Terminal |