Hi, All. This topic has been discussed 2011 in http://lists.etherlab.org/mailman/confirm/etherlab-users/8d9c3cbacf4b2448f9c81358c4429d4743b882ec but I still meet many problems. 1. When I use ecrt_slave_config_idn(), the code all has been execute correctly,but I can't sniff any SoE fragment with Wireshark. 2.When I replace ecrt_slave_config_idn() with ecrt_master_write_idn(), the SoE fragments are sent to slave correctly but idn 'P-0-150'. idn 'P-0-150' is 228 bytes, the master just sent the first 118 bytes, and lose the left 110 bytes. 3.When I change the configration of SM, it also doesnot work. my code is as follows: /**************************************************/ #include "ecrt.h" ... static ec_master_t master = NULL; static ec_domain_t domain1 = NULL; ... //1.IDN15--user define static uint8_t idn_15[]={ 0x07,0x00 }; //2.IDN16--AT List ... int main(int argc, char **argv) { ec_slave_config_t *sc; ... master = ecrt_request_master(0); if (!master) return -1; domain1 = ecrt_master_create_domain(master); if (!domain) return -1; if (!(sc = ecrt_master_slave_config(master, 0, 0, 0x00000002, 0x13ed6012))) { fprintf(stderr,"Failed to get slave configuration.\n"); return -1; } ecrt_slave_config_idn(sc, 0, 15, EC_AL_STATE_PREOP, idn_15, 2); ... if (ecrt_slave_config_pdos(sc, EC_END, AX5101_syncs)) return -1; if (ecrt_domain_reg_pdo_entry_list(domain1, domain1_regs)) return -1; if (ecrt_master_activate(master)) return -1; if (!(domain1_pd = ecrt_domain_data(domain1))) return -1; ecrt_release_master(master); }
_______________________________________________ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users