[Etherlab-users] AKD drive Failed to set SAFEOP state, slave refused state change

Joachim Sällvin joachim.sallvin at corpowerocean.com
Fri Sep 18 07:20:18 CEST 2020


Hi,

My AKD drive slave refuses to go to operational. Any suggestions why?

This is what dmesg tells me when trying:
[53271.293863] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[53271.294126] EtherCAT ERROR 0-0: AL status message 0x001D: "Invalid output configuration".

The AKD drive is the only slave on the bus
$ sudo ethercat slaves
0  901:0  PREOP  E  AKD EtherCAT Drive (CoE)

and I've configured it so that I get

$ sudo ethercat cstruct -p0
/* Master 0, Slave 0, "AKD"
 * Vendor ID:       0x0000006a
 * Product code:    0x00414b44
 * Revision number: 0x00000002
 */

ec_pdo_entry_info_t slave_0_pdo_entries[] = {
    {0x6040, 0x00, 16},
    {0x60c1, 0x01, 32},
    {0x6041, 0x00, 16},
    {0x3470, 0x04, 16},
    {0x60fd, 0x00, 32},
    {0x606c, 0x00, 32},
    {0x6063, 0x00, 32},
};

ec_pdo_info_t slave_0_pdos[] = {
    {0x1600, 2, slave_0_pdo_entries + 0},
    {0x1a00, 3, slave_0_pdo_entries + 2},
    {0x1a01, 2, slave_0_pdo_entries + 5},
};

ec_sync_info_t slave_0_syncs[] = {
    {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
    {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
    {2, EC_DIR_OUTPUT, 1, slave_0_pdos + 0, EC_WD_DISABLE},
    {3, EC_DIR_INPUT, 2, slave_0_pdos + 1, EC_WD_DISABLE},
    {0xff}
};



I've tried with the command line tool...
$ sudo ethercat states OP

..and with my c-application. But the result is the same.

One thing that puzzles me is the size of the synch managers SM2 and SM3:

$ sudo ethercat pdos
SM0: PhysAddr 0x1800, DefaultSize 1024, ControlRegister 0x26, Enable 1
SM1: PhysAddr 0x1c00, DefaultSize 1024, ControlRegister 0x22, Enable 1
SM2: PhysAddr 0x1100, DefaultSize    0, ControlRegister 0x24, Enable 1
  RxPDO 0x1600 ""
    PDO entry 0x6040:00, 16 bit, ""
    PDO entry 0x60c1:01, 32 bit, ""
SM3: PhysAddr 0x1140, DefaultSize    0, ControlRegister 0x20, Enable 1
  TxPDO 0x1a00 ""
    PDO entry 0x6041:00, 16 bit, ""
    PDO entry 0x3470:04, 16 bit, ""
    PDO entry 0x60fd:00, 32 bit, ""
  TxPDO 0x1a01 ""
    PDO entry 0x606c:00, 32 bit, ""
    PDO entry 0x6063:00, 32 bit, ""

Should they really have DefaultSize 0?

$ sudo ethercat versionIgH EtherCAT master 1.5.2 53ce5e56d511
$ uname -a Linux ctrlPC1 5.4.54-rt32 #1 SMP PREEMPT_RT Wed Aug 12 12:59:33 CEST 2020 x86_64 x86_64 x86_64 GNU/Linux



Detailed dmesg printout:


[54154.149923] EtherCAT: Master driver 1.5.2 53ce5e56d511
[54154.149991] EtherCAT: 1 master waiting for devices.
[54154.154118] ec_generic: EtherCAT master generic Ethernet device module 1.5.2 53ce5e56d511
[54154.154127] EtherCAT: Accepting 78:D0:04:27:52:E4 as main device for master 0.
[54154.154131] ec_generic: Binding socket to interface 4 (enp0s31f6).
[54154.189154] EtherCAT 0: Starting EtherCAT-IDLE thread.
[54154.189384] EtherCAT 0: Link state of ecm0 changed to UP.
[54154.197141] EtherCAT 0: 1 slave(s) responding on main device.
[54154.197149] EtherCAT 0: Slave states on main device: PREOP.
[54154.197613] EtherCAT 0: Scanning bus.
[54154.489005] EtherCAT 0: Bus scanning completed in 292 ms.
[54154.489006] EtherCAT 0: Using slave 0 as DC reference clock.
[54154.489007] EtherCAT 0: Starting EoE thread.
[54154.521934] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[54154.522227] EtherCAT ERROR 0-0: AL status message 0x001D: "Invalid output configuration".
[54154.525166] EtherCAT 0-0: Acknowledged state PREOP.


Any ideas?

Best Regards,

Joachim Sällvin

Software Developer
CorpowerOcean







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200918/0f90bfb8/attachment.htm>


More information about the Etherlab-users mailing list