I listened to you and made the following corrections.

                                          <Mailbox DataLinkLayer="true">   

                                           <FoE/>

                                          </Mailbox>

                                          

So "EtherCAT ERROR 0-0: Received mailbox protocol 0x08 as response." The error 
is gone!

           [   54.128206@1] EtherCAT: Master driver 1.5.2 unknown

           [   54.128482@1] EtherCAT: 1 master waiting for devices.

           [   54.143837@0] ec_generic: EtherCAT master generic Ethernet device 
module 1.5.2 unknown

           [   54.146156@0] EtherCAT: Accepting 00:1E:06:C2:B1:B6 as main 
device for master 0.

           [   54.153610@0] ec_generic: Binding socket to interface 2 (eth0).

           [   54.236637@0] EtherCAT 0: Starting EtherCAT-IDLE thread.

           [   54.236761@0] EtherCAT 0: Link state of ecm0 changed to UP.

           [   54.246617@1] EtherCAT 0: 1 slave(s) responding on main device.

           [   54.248103@1] EtherCAT 0: Slave states on main device: INIT.

           [   54.253576@1] EtherCAT 0: Scanning bus.

           [   54.308988@1] EtherCAT 0: Bus scanning completed in 60 ms.

           [   54.309026@1] EtherCAT 0: Using slave 0 as DC reference clock.

           [   54.336653@0] EtherCAT 0: Slave states on main device: PREOP.

 

The attachment coe_delete.txt is the entire EtherLab log executed with the 
modified xml.

 

It is still not changed to OP state.

           EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state 
change (PREOP + ERROR).

           EtherCAT ERROR 0-0: AL status message 0x001D: "Invalid output 
configuration".

 

I think it seems to be a new problem with my existing one.

 

I see 
http://lists.etherlab.org/pipermail/etherlab-users/attachments/20120413/b83b76d4/attachment.c

Do I need this extra programming to change to the OP state?

 

Best regards,

Kwon

root@odroid:~# cat ethercat_start
modprobe ec_master main_devices=00:1e:06:c2:b1:b6
modprobe ec_generic
root@odroid:~#
root@odroid:~# ./ethercat_start
[   54.128206@1] EtherCAT: Master driver 1.5.2 unknown
[   54.128482@1] EtherCAT: 1 master waiting for devices.
[   54.143837@0] ec_generic: EtherCAT master generic Ethernet device module 
1.5.2 unknown
[   54.146156@0] EtherCAT: Accepting 00:1E:06:C2:B1:B6 as main device for 
master 0.
[   54.153610@0] ec_generic: Binding socket to interface 2 (eth0).
[   54.236637@0] EtherCAT 0: Starting EtherCAT-IDLE thread.
[   54.236761@0] EtherCAT 0: Link state of ecm0 changed to UP.
[   54.246617@1] EtherCAT 0: 1 slave(s) responding on main device.
[   54.248103@1] EtherCAT 0: Slave states on main device: INIT.
[   54.253576@1] EtherCAT 0: Scanning bus.
root@odroid:~# [   54.308988@1] EtherCAT 0: Bus scanning completed in 60 ms.
[   54.309026@1] EtherCAT 0: Using slave 0 as DC reference clock.
[   54.336653@0] EtherCAT 0: Slave states on main device: PREOP.

root@odroid:~#
root@odroid:~# ethercat debug 1
[   60.579031@2] EtherCAT 0: Master debug level set to 1.
root@odroid:~#
root@odroid:~# ethercat rescan
root@odroid:~# [   64.956691@2] EtherCAT DEBUG 0: Sending broadcast-write to 
measure transmission delays on main link.
[   64.960241@2] EtherCAT DEBUG 0: 1 slaves responded to delay measuring on 
main link.
[   64.967944@2] EtherCAT 0: Scanning bus.
[   64.971652@2] EtherCAT DEBUG 0: Scanning slave 0 on main link.
[   64.977857@2] EtherCAT DEBUG 0-0: Slave has the System Time register.
[   65.034596@2] EtherCAT 0: Bus scanning completed in 70 ms.
[   65.034634@2] EtherCAT 0: Using slave 0 as DC reference clock.
[   65.040301@2] EtherCAT DEBUG 0-0: 
ec_slave_calc_transmission_delays_rec(delay = 0 ns)
[   65.048106@2] EtherCAT DEBUG 0: No app_time received up to now.
[   65.066575@0] EtherCAT DEBUG 0-0: Changing state from PREOP to PREOP 
(forced).
[   65.068160@0] EtherCAT DEBUG 0-0: Configuring...
[   65.073379@0] EtherCAT DEBUG 0-0: Now in INIT.
[   65.077258@0] EtherCAT DEBUG 0-0: Clearing FMMU configurations...
[   65.083532@0] EtherCAT DEBUG 0-0: Clearing sync manager configurations...
[   65.090165@0] EtherCAT DEBUG 0-0: Clearing DC assignment...
[   65.095672@0] EtherCAT DEBUG 0-0: Configuring mailbox sync managers...
[   65.102167@0] EtherCAT DEBUG 0-0: SM0: Addr 0x1000, Size 128, Ctrl 0x26, En 1
[   65.109297@0] EtherCAT DEBUG 0-0: SM1: Addr 0x1080, Size 128, Ctrl 0x22, En 1
[   65.117896@0] EtherCAT DEBUG 0-0: Now in PREOP.
[   65.120870@0] EtherCAT DEBUG 0-0: Finished configuration.
[   65.126267@0] EtherCAT DEBUG 0-0: Ready for requests.

root@odroid:~#
root@odroid:~#
root@odroid:~# ethercat states INIT
[  993.312272@1] EtherCAT DEBUG 0-0: Changing state from PREOP to INIT.
[  993.313011@1] EtherCAT DEBUG 0-0: Configuring...
[  993.318521@1] EtherCAT DEBUG 0-0: Now in INIT.
[  993.322024@1] EtherCAT DEBUG 0-0: Clearing FMMU configurations...
[  993.328211@1] EtherCAT DEBUG 0-0: Clearing sync manager configurations...
[  993.334986@1] EtherCAT DEBUG 0-0: Clearing DC assignment...
[  993.340490@1] EtherCAT DEBUG 0-0: Finished configuration.
[  993.352228@1] EtherCAT 0: Slave states on main device: INIT.
root@odroid:~#
root@odroid:~#
root@odroid:~# ethercat states PREOP
root@odroid:~# [  996.002257@2] EtherCAT DEBUG 0-0: Changing state from INIT to 
PREOP.
[  996.005748@2] EtherCAT DEBUG 0-0: Configuring...
[  996.010485@2] EtherCAT DEBUG 0-0: Now in INIT.
[  996.014821@2] EtherCAT DEBUG 0-0: Clearing FMMU configurations...
[  996.020931@2] EtherCAT DEBUG 0-0: Clearing sync manager configurations...
[  996.027722@2] EtherCAT DEBUG 0-0: Clearing DC assignment...
[  996.033294@2] EtherCAT DEBUG 0-0: Configuring mailbox sync managers...
[  996.039704@2] EtherCAT DEBUG 0-0: SM0: Addr 0x1000, Size 128, Ctrl 0x26, En 1
[  996.046912@2] EtherCAT DEBUG 0-0: SM1: Addr 0x1080, Size 128, Ctrl 0x22, En 1
[  996.057612@2] EtherCAT DEBUG 0-0: Now in PREOP.
[  996.058458@2] EtherCAT DEBUG 0-0: Finished configuration.
[  996.072214@2] EtherCAT 0: Slave states on main device: PREOP.

root@odroid:~#
root@odroid:~# ethercat states SAFEOP
root@odroid:~# [  999.162230@0] EtherCAT DEBUG 0-0: Changing state from PREOP 
to SAFEOP.
[  999.165610@0] EtherCAT DEBUG 0-0: Configuring...
[  999.171719@0] EtherCAT DEBUG 0-0: Now in INIT.
[  999.174700@0] EtherCAT DEBUG 0-0: Clearing FMMU configurations...
[  999.181085@0] EtherCAT DEBUG 0-0: Clearing sync manager configurations...
[  999.187787@0] EtherCAT DEBUG 0-0: Clearing DC assignment...
[  999.193185@0] EtherCAT DEBUG 0-0: Configuring mailbox sync managers...
[  999.199566@0] EtherCAT DEBUG 0-0: SM0: Addr 0x1000, Size 128, Ctrl 0x26, En 1
[  999.206732@0] EtherCAT DEBUG 0-0: SM1: Addr 0x1080, Size 128, Ctrl 0x22, En 1
[  999.217365@0] EtherCAT DEBUG 0-0: Now in PREOP.
[  999.218324@0] EtherCAT DEBUG 0-0: SM2: Addr 0x1100, Size 128, Ctrl 0x24, En 1
[  999.225588@0] EtherCAT DEBUG 0-0: SM3: Addr 0x1180, Size 128, Ctrl 0x20, En 1
[  999.233884@0] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused 
state change (PREOP + ERROR).
[  999.242230@0] EtherCAT ERROR 0-0: AL status message 0x001D: "Invalid output 
configuration".
[  999.250985@0] EtherCAT 0-0: Acknowledged state PREOP.

root@odroid:~#
root@odroid:~# ethercat cstruct
/* Master 0, Slave 0, "evb9252_dig"
 * Vendor ID:       0x00001337
 * Product code:    0x000004d2
 * Revision number: 0x00000000
 */

ec_pdo_entry_info_t slave_0_pdo_entries[] = {
    {0x7000, 0x01, 8}, /* LED0 */
    {0x7000, 0x02, 8}, /* LED1 */
    {0x6000, 0x01, 8}, /* Button1 */
};

ec_pdo_info_t slave_0_pdos[] = {
    {0x1600, 2, slave_0_pdo_entries + 0}, /* LEDs */
    {0x1a00, 1, slave_0_pdo_entries + 2}, /* Buttons */
};

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, 1, slave_0_pdos + 1, EC_WD_DISABLE},
    {0xff}
};
_______________________________________________
etherlab-dev mailing list
etherlab-dev@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-dev

Reply via email to