After installing LinuxCNC 2.9.3 (Debian 12) and EtherCAT module (Master driver 1.6.2), I am unable to get EtherCAT communication working. LinuxCNC will run, but there is no active status or feedback positions. DS402 statuswords are zero, indicating there is no communication.
I have a LinuxCNC system running with an older version (2.8.0). I copied the linuxcnc_axis folder from the working system and put it into this one and made adjustments for the new system.
In ecat_gantry.ini, the hal file is listed correctly.
Code:
[HAL]
TWOPASS=ON
HALFILE = ecat_gantry.hal
In ecat_gantry.hal, I updated the loadusr command. (removed the path that was incorrect)
Code:
loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec
The ethercat-conf.xml file is configured correctly for the three servo drives. This same configuration works on an almost identical system. The only difference in hardware is the AKD2G in this system is FS3 (functional safety) whereas the working system is FS1 (STO only). I made the appropriate change in the ethercat pid code.
Code:
<!--cnc-bg Config -->
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">
<!-- AKD X Axis (beam) -->
<slave idx="0" type="generic" vid="0000006A" pid="00414b44" configPdos="true">
<!-- Clear SM PDOs -->
<sdoConfig idx="1C12" subIdx="00">
<sdoDataRaw data="00"/>
</sdoConfig>
<!-- Clear SM PDOs -->
<sdoConfig idx="1C13" subIdx="00">
<sdoDataRaw data="00"/>
</sdoConfig>
<!-- Clear RX PDO1 -->
<sdoConfig idx="1A00" subIdx="00">
<sdoDataRaw data="00"/>
</sdoConfig>
<!-- Map status word to RX-PDO1 -->
<!-- 0x6041 0010 -->
<sdoConfig idx="1A00" subIdx="01">
<sdoDataRaw data="10 00 41 60"/>
</sdoConfig>
<!-- Map position feedback to RX-PDO1 -->
<!-- 0x6064 0020 -->
<sdoConfig idx="1A00" subIdx="02">
<sdoDataRaw data="20 00 64 60"/>
</sdoConfig>
<!-- Set RX-PDO1 count to 2 -->
<sdoConfig idx="1A00" subIdx="00">
<sdoDataRaw data="02"/>
</sdoConfig>
(That is only the first part of the ethercat-conf.xml file.)
It recognizes the 3 servo drives, but they are all errored.
Code:
jim@cnc:~$ ethercat slaves
0 6:0 PREOP E AKD EtherCAT Drive (CoE)
1 6:1 SAFEOP E AKD2G Dual Axis FS3 EtherCAT Drive (CoE)
2 1:0 PREOP E AKD EtherCAT Drive (CoE)
Code:
jim@cnc:~$ sudo dmesg | grep EtherCAT
[sudo] password for jim:
[ 4.545203] EtherCAT: Master driver 1.6.2 1.6.2.g285cdf0-1+12.2
[ 4.545268] EtherCAT: 1 master waiting for devices.
[ 4.572786] ec_generic: EtherCAT master generic Ethernet device module 1.6.2 1.6.2.g285cdf0-1+12.2
[ 4.572795] EtherCAT: Accepting 00:1B:21:5A:44:37 as main device for master 0.
[ 4.588476] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 4.588497] EtherCAT 0: Link state of ecm0 changed to UP.
[ 5.192449] EtherCAT 0: Link state of ecm0 changed to DOWN.
[ 5.240474] EtherCAT 0: Link state of ecm0 changed to UP.
[ 5.264455] EtherCAT 0: 3 slave(s) responding on main device.
[ 5.264458] EtherCAT 0: Slave states on main device: PREOP, SAFEOP + ERROR.
[ 5.265859] EtherCAT 0: Scanning bus.
[ 5.878393] EtherCAT WARNING 0-1: Slave has state error bit set (SAFEOP + ERROR)!
[ 7.657131] EtherCAT ERROR 0-1: Timeout after 1000 ms while waiting for SDO 0x1c12:0 upload response.
[ 7.657134] EtherCAT ERROR 0-1: Failed to read number of assigned PDOs for SM2.
[ 8.657645] EtherCAT ERROR 0-1: Timeout after 1000 ms while waiting for SDO 0x1c13:0 upload response.
[ 8.657647] EtherCAT ERROR 0-1: Failed to read number of assigned PDOs for SM3.
[ 9.267846] EtherCAT 0: Bus scanning completed in 4000 ms.
[ 9.267848] EtherCAT 0: Using slave 0 as DC reference clock.
[ 9.267851] EtherCAT 0: Starting EoE thread.
[ 9.307336] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 9.308655] EtherCAT ERROR 0-0: AL status message 0x001D: "Invalid output configuration".
[ 9.310093] EtherCAT 0-0: Acknowledged state PREOP.
[ 9.316500] EtherCAT ERROR 0-1: AL status message 0x001B: "Sync manager watchdog".
[ 9.320634] EtherCAT 0-1: Acknowledged state SAFEOP.
[ 9.372708] EtherCAT ERROR 0-2: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 9.374026] EtherCAT ERROR 0-2: AL status message 0x001D: "Invalid output configuration".
[ 9.375463] EtherCAT 0-2: Acknowledged state PREOP.
[ 9.397756] EtherCAT ERROR 0-1: AL status message 0x001B: "Sync manager watchdog".
[ 9.403141] EtherCAT 0-1: Acknowledged state SAFEOP.
[ 9.469755] EtherCAT ERROR 0-1: AL status message 0x001B: "Sync manager watchdog".
[ 9.473818] EtherCAT 0-1: Acknowledged state SAFEOP.
...
Code:
[55800.087042] EtherCAT WARNING 0-1: SDO information error response while fetching SDO entry 0x1C32:0E!
[55800.087045] EtherCAT ERROR 0-1: SDO abort message 0x06090011: "Subindex does not exist".
[55800.089891] EtherCAT WARNING 0-1: SDO information error response while fetching SDO entry 0x1C32:0F!
[55800.089893] EtherCAT ERROR 0-1: SDO abort message 0x06090011: "Subindex does not exist".
[55800.092737] EtherCAT WARNING 0-1: SDO information error response while fetching SDO entry 0x1C32:10!
[55800.092738] EtherCAT ERROR 0-1: SDO abort message 0x06090011: "Subindex does not exist".
[55800.096957] EtherCAT WARNING 0-1: SDO information error response while fetching SDO entry 0x1C32:11!
[55800.096958] EtherCAT ERROR 0-1: SDO abort message 0x06090011: "Subindex does not exist".
[55800.101182] EtherCAT WARNING 0-1: SDO information error response while fetching SDO entry 0x1C32:12!
[55800.101183] EtherCAT ERROR 0-1: SDO abort message 0x06090011: "Subindex does not exist".
Can anyone help me determine what is wrong?