EtherCAT Setup
ESI File Installation
The TK EtherCAT Slave Information (ESI) file is included in the firmware package at $TKND_FIRMWARE_PKG/esi/Tendonkindle_TK_Series.xml. Copy it to your EtherCAT master's ESI directory:
sudo cp Tendonkindle_TK_Series.xml \
/etc/ethercat/esi/
The ESI file covers all three TK models. Object dictionary entries differ by model — check Device.Name = TK-120 / TK-240 / TK-480 in the file.
Bus Scan with IgH
After connecting actuators in daisy-chain topology and applying 48 VDC:
ethercat slaves
# Output:
# 0 0:0 PREOP + Tendonkindle TK-120
# 1 0:1 PREOP + Tendonkindle TK-240
# 2 0:2 PREOP + Tendonkindle TK-480
Each slave comes up in PREOP state. Request SAFEOP and then OP:
ethercat states -a OP
CoE Object Dictionary (Key Entries)
| Index | Sub | Name | Access |
|---|---|---|---|
| 0x6040 | 0 | Control word (NMT) | RW |
| 0x6041 | 0 | Status word | RO |
| 0x6060 | 0 | Modes of operation | RW |
| 0x6064 | 0 | Position actual value | RO |
| 0x607A | 0 | Target position | RW |
| 0x60FF | 0 | Target velocity | RW |
| 0x6071 | 0 | Target torque | RW |
| 0x2001 | 0 | Node ID (Tendonkindle custom) | RW |
| 0x2010 | 0 | Impedance stiffness Kp | RW |
| 0x2011 | 0 | Impedance damping Kd | RW |
SOEM Example (C++)
#include <soem/ethercat.h>
#include <cstdio>
int main() {
char iface[] = "eth0";
if (ec_init(iface) > 0) {
if (ec_config_init(FALSE) > 0) {
ec_config_map(&IOmap);
ec_configdc();
ec_statecheck(0, EC_STATE_SAFE_OP, EC_TIMEOUTSTATE);
ec_slave[0].state = EC_STATE_OPERATIONAL;
ec_writestate(0);
int8_t *mode = (int8_t*)ec_slave[1].outputs;
*mode = 10; // cyclic sync torque mode
ec_send_processdata();
ec_receive_processdata(EC_TIMEOUTRET);
}
ec_close();
}
return 0;
}
Mode 8 = cyclic sync position; Mode 9 = cyclic sync velocity; Mode 10 = cyclic sync torque. Set via object 0x6060.
IgH EtherCAT Master Config
Add to /etc/ethercat.conf:
MASTER0_DEVICE="eth0"
MASTER0_BACKUP=""
DEVICE_MODULES="generic"
Then restart the master and verify slaves are detected:
sudo systemctl restart ethercat
ethercat slaves