[etherlab-users] Mailbox error using coopley accelnet slave

Massimo Mancin Massimo.Mancin at syco.it
Wed Jan 28 13:25:47 CET 2009


Hi all!

We have installed on a I386 computer with linux 2.6.24 the Etherlab master to control the coopley accelnet motor driver.

when the master is started, the slave is see from the master but on the log appear the following errors.

Jan 28 12:17:59 syco1 kernel: EtherCAT ERROR: Mailbox error response received from slave 0 - Unknown error reply code 0x0000.
Jan 28 12:17:59 syco1 kernel: EtherCAT ERROR: Failed to read number of assigned PDOs for SM2.

The complete log of the bootstrap of the master is:

Jan 28 12:17:59 syco1 kernel: EtherCAT: Master driver 1.4.0 r1611
Jan 28 12:17:59 syco1 kernel: EtherCAT: 1 master waiting for devices.
Jan 28 12:17:59 syco1 kernel: EtherCAT: Master driver 1.4.0 r1611
Jan 28 12:17:59 syco1 kernel: EtherCAT: 1 master waiting for devices.
Jan 28 12:17:59 syco1 kernel: ACPI: PCI interrupt for device 0000:00:09.0 disabled
Jan 28 12:17:59 syco1 kernel: ec_8139too EtherCAT-capable Fast Ethernet driver 0.9.28, master 1.4.0 r1611
Jan 28 12:17:59 syco1 kernel: ACPI: PCI Interrupt 0000:00:09.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
Jan 28 12:17:59 syco1 kernel: EtherCAT: Accepting device 00:1D:0F:C1:4A:1B for master 0.
Jan 28 12:17:59 syco1 kernel: ec0: RealTek RTL8139 at 0xbc00, 00:1d:0f:c1:4a:1b, IRQ 11
Jan 28 12:17:59 syco1 kernel: EtherCAT: Link state changed to UP.
Jan 28 12:17:59 syco1 kernel: EtherCAT: Starting EtherCAT-IDLE thread.
Jan 28 12:17:59 syco1 kernel: EtherCAT: 1 slave(s) responding.
Jan 28 12:17:59 syco1 kernel: EtherCAT: Slave states: PREOP.
Jan 28 12:17:59 syco1 kernel: EtherCAT: Scanning bus.
Jan 28 12:17:59 syco1 kernel: EtherCAT: Bus scanning completed in 36 ms.
Jan 28 12:17:59 syco1 kernel: ACPI: PCI interrupt for device 0000:00:09.0 disabled
Jan 28 12:17:59 syco1 kernel: ec_8139too EtherCAT-capable Fast Ethernet driver 0.9.28, master 1.4.0 r1611
Jan 28 12:17:59 syco1 kernel: ACPI: PCI Interrupt 0000:00:09.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
Jan 28 12:17:59 syco1 kernel: EtherCAT: Accepting device 00:1D:0F:C1:4A:1B for master 0.
Jan 28 12:17:59 syco1 kernel: ec0: RealTek RTL8139 at 0xbc00, 00:1d:0f:c1:4a:1b, IRQ 11
Jan 28 12:17:59 syco1 kernel: EtherCAT: Link state changed to UP.
Jan 28 12:17:59 syco1 kernel: EtherCAT: Starting EtherCAT-IDLE thread.
Jan 28 12:17:59 syco1 kernel: EtherCAT: 1 slave(s) responding.
Jan 28 12:17:59 syco1 kernel: EtherCAT: Slave states: PREOP.
Jan 28 12:17:59 syco1 kernel: EtherCAT: Scanning bus.
Jan 28 12:17:59 syco1 kernel: EtherCAT: Bus scanning completed in 36 ms.

To check if the slave is operative we have tested it with the Beckoff Twincat Program and it works fine.

Then we tried to change the mini.c example prorgram to define a valid set of PDO according to the accelnet manual and when the built module is loaded into the kernel we get the following errors:

Jan 28 12:34:53 syco1 kernel: EtherCAT ERROR: Mailbox error response received from slave 0 - Unknown error reply code 0x0000.
Jan 28 12:34:53 syco1 kernel: EtherCAT ERROR: Failed to read number of mapped PDO entries.
Jan 28 12:34:53 syco1 kernel: EtherCAT WARNING: Failed to read mapped PDO entries for PDO 0x1A00.
Jan 28 12:34:53 syco1 kernel: EtherCAT ERROR: Mailbox error response received from slave 0 - Unknown error reply code 0x0000.
Jan 28 12:34:53 syco1 kernel: EtherCAT WARNING: Failed to clear PDO mapping.
Jan 28 12:34:53 syco1 kernel: EtherCAT WARNING: Failed to configure mapping of PDO 0x1A00.
Jan 28 12:34:53 syco1 kernel: EtherCAT ERROR: Mailbox error response received from slave 0 - Unknown error reply code 0x0000.
Jan 28 12:34:53 syco1 kernel: EtherCAT WARNING: Failed to clear PDO assignment of SM3.
Jan 28 12:34:53 syco1 kernel: EtherCAT WARNING: PDO configuration failed on slave 0.

and the complete log is:
Jan 28 12:34:52 syco1 kernel: ec_mini: Starting...
Jan 28 12:34:52 syco1 kernel: EtherCAT: Requesting master 0...
Jan 28 12:34:52 syco1 kernel: EtherCAT: Successfully requested master 0.
Jan 28 12:34:52 syco1 kernel: ec_mini: Registering domain...
Jan 28 12:34:52 syco1 kernel: ec_mini: Configuring PDOs...
Jan 28 12:34:52 syco1 kernel: ec_mini: Registering PDO entries...
Jan 28 12:34:52 syco1 kernel: ec_mini: size 7, offset 0
Jan 28 12:34:52 syco1 kernel: ec_mini: Activating master...
Jan 28 12:34:52 syco1 kernel: EtherCAT: Domain0: Logical address 0x00000000, 7 byte, expected working counter 1.
Jan 28 12:34:52 syco1 kernel: EtherCAT:   Datagram domain0-0: Logical offset 0x00000000, 7 byte, type LRD.
Jan 28 12:34:52 syco1 kernel: EtherCAT: Master thread exited.
Jan 28 12:34:52 syco1 kernel: EtherCAT: Starting EtherCAT-OP thread.
Jan 28 12:34:52 syco1 kernel: ec_mini: Starting cyclic sample thread.
Jan 28 12:34:52 syco1 kernel: ec_mini: Started.
Jan 28 12:34:52 syco1 kernel: ec_mini: 1 slave(s).
Jan 28 12:34:52 syco1 kernel: ec_mini: AL states: 0x02.
Jan 28 12:34:52 syco1 kernel: ec_mini: Link is up.
Jan 28 12:34:52 syco1 kernel: ec_mini: AccelNet: State 0x02.
Jan 28 12:34:52 syco1 kernel: ec_mini: AccelNet: online.
Jan 28 12:34:52 syco1 kernel: ec_mini: AcualPos 0, modeOfoper 0, status 0
Jan 28 12:34:53 syco1 kernel: EtherCAT: Domain 0: Working counter changed to 1/1.
Jan 28 12:34:53 syco1 kernel: ec_mini: Domain1: WC 1.
Jan 28 12:34:53 syco1 kernel: ec_mini: Domain1: State 2.
Jan 28 12:34:53 syco1 kernel: ec_mini: AcualPos -721418479, modeOfoper D5, status 1111
Jan 28 12:34:53 syco1 kernel: EtherCAT: Slave states: OP.
Jan 28 12:34:52 syco1 kernel: ec_mini: Starting...
Jan 28 12:34:52 syco1 kernel: EtherCAT: Requesting master 0...
Jan 28 12:34:52 syco1 kernel: EtherCAT: Successfully requested master 0.
Jan 28 12:34:52 syco1 kernel: ec_mini: Registering domain...
Jan 28 12:34:52 syco1 kernel: ec_mini: Configuring PDOs...
Jan 28 12:34:52 syco1 kernel: ec_mini: Registering PDO entries...
Jan 28 12:34:52 syco1 kernel: ec_mini: size 7, offset 0
Jan 28 12:34:52 syco1 kernel: ec_mini: Activating master...
Jan 28 12:34:52 syco1 kernel: EtherCAT: Domain0: Logical address 0x00000000, 7 byte, expected working counter 1.
Jan 28 12:34:52 syco1 kernel: EtherCAT:   Datagram domain0-0: Logical offset 0x00000000, 7 byte, type LRD.
Jan 28 12:34:52 syco1 kernel: EtherCAT: Master thread exited.
Jan 28 12:34:52 syco1 kernel: EtherCAT: Starting EtherCAT-OP thread.
Jan 28 12:34:52 syco1 kernel: ec_mini: Starting cyclic sample thread.
Jan 28 12:34:52 syco1 kernel: ec_mini: Started.
Jan 28 12:34:52 syco1 kernel: ec_mini: 1 slave(s).
Jan 28 12:34:52 syco1 kernel: ec_mini: AL states: 0x02.
Jan 28 12:34:52 syco1 kernel: ec_mini: Link is up.
Jan 28 12:34:52 syco1 kernel: ec_mini: AccelNet: State 0x02.
Jan 28 12:34:52 syco1 kernel: ec_mini: AccelNet: online.
Jan 28 12:34:52 syco1 kernel: ec_mini: AcualPos 0, modeOfoper 0, status 0
Jan 28 12:34:53 syco1 kernel: EtherCAT: Domain 0: Working counter changed to 1/1.
Jan 28 12:34:53 syco1 kernel: ec_mini: Domain1: WC 1.
Jan 28 12:34:53 syco1 kernel: ec_mini: Domain1: State 2.
Jan 28 12:34:53 syco1 kernel: ec_mini: AcualPos -721418479, modeOfoper D5, status 1111
Jan 28 12:34:53 syco1 kernel: EtherCAT: Slave states: OP.
Jan 28 12:34:53 syco1 kernel: ec_mini: AL states: 0x08.
Jan 28 12:34:53 syco1 kernel: ec_mini: AccelNet: State 0x08.
Jan 28 12:34:53 syco1 kernel: ec_mini: AccelNet: operational.
Jan 28 12:34:53 syco1 kernel: ec_mini: AL states: 0x08.
Jan 28 12:34:53 syco1 kernel: ec_mini: AccelNet: State 0x08.
Jan 28 12:34:53 syco1 kernel: ec_mini: AccelNet: operational.

The configuration we have insert in the mini.c is

#define AccelnetSlavePos  0, 0

#define Accelnet_AEP055 0x000000ab, 0x00000380


const static ec_pdo_entry_reg_t domain1_regs[] = {
    {AccelnetSlavePos,  Accelnet_AEP055, 0x6060, 0, &off_accelnet},
    {}
};


static ec_pdo_entry_info_t accelnet_pdo_entries[] = {
    {0x6060, 0,  8}, // mode of operation
    {0x6041, 0, 16}, // status
    {0x6064, 0, 32}, // actual position
    {0x6040, 0, 16}, // control word
    {0x6060, 0,  8}, // mode of operation
};

static ec_pdo_info_t accelnet_pdos[] = {
    {0x1A00, 3, accelnet_pdo_entries},
    {0x1600, 2, accelnet_pdo_entries+3},
};

static ec_sync_info_t accelnet_syncs[] = {
    {2, EC_DIR_OUTPUT}, // ,1, accelnet_pdos+1},
    {3, EC_DIR_INPUT, 1, accelnet_pdos},
    {0xff}
};


Some one can help me ?

Thanks,

Massimo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20090128/ae4b6087/attachment-0002.htm>


More information about the Etherlab-users mailing list