<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi, All.</div>
<div>This topic has been discussed 2011 in</div>
<div><a href="http://lists.etherlab.org/mailman/confirm/etherlab-users/8d9c3cbacf4b2448f9c81358c4429d4743b882ec">http://lists.etherlab.org/mailman/confirm/etherlab-users/8d9c3cbacf4b2448f9c81358c4429d4743b882ec</a></div>
<div>but I still meet many problems.</div>
<div>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.</div>
<div> </div>
<div>
<div>2.When I replace ecrt_slave_config_idn() with ecrt_master_write_idn(), the SoE fragments are sent to slave correctly</div>
<div>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.</div>
<div> </div>
<div>3.When I change the configration of SM, it also doesnot work.</div>
<div> </div></div>
<div>my code is as follows:</div>
<div>/**************************************************/</div>
<div>#include "ecrt.h"</div>
<div>...</div>
<div>static ec_master_t master = NULL;</div>
<div>static ec_domain_t domain1 = NULL;</div>
<div>...</div>
<div>//1.IDN15--user define</div>
<div>static uint8_t idn_15[]={</div>
<div>    0x07,0x00</div>
<div>    };</div>
<div>//2.IDN16--AT List</div>
<div>...</div>
<div>int main(int argc, char **argv) {</div>
<div>    ec_slave_config_t *sc;</div>
<div>    ...</div>
<div>    master = ecrt_request_master(0);</div>
<div>    if (!master) return -1;</div>
<div>    domain1 = ecrt_master_create_domain(master);</div>
<div>    if (!domain) return -1;</div>
<div>    if (!(sc = ecrt_master_slave_config(master, 0, 0, 0x00000002, 0x13ed6012))) {</div>
<div>        fprintf(stderr,"Failed to get slave configuration.\n");</div>
<div>        return -1;</div>
<div>    }</div>
<div>    ecrt_slave_config_idn(sc, 0, 15, EC_AL_STATE_PREOP, idn_15, 2);</div>
<div>    ...</div>
<div>    if (ecrt_slave_config_pdos(sc, EC_END, AX5101_syncs))  return -1;</div>
<div>    if (ecrt_domain_reg_pdo_entry_list(domain1, domain1_regs)) return -1;</div>
<div>    if (ecrt_master_activate(master)) return -1;</div>
<div>    if (!(domain1_pd = ecrt_domain_data(domain1))) return -1;</div>
<div>    ecrt_release_master(master);</div>
<div>}</div>
<div> </div>
<div> </div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"><div id="netease_mail_footer"><div style="border-top:#CCCCCC 1px solid;padding:10px 5px;font-size:12px;color:#777777;line-height:22px">来自 <b style="color:#CC3300">网易</b><b style="color:#333333">手机号码邮箱</b> -- 有手机就有网易手机号码邮箱,<a id="mobile_set" sys="1" log=1 logid="free_sms_20120504" href="http://shouji.163.com" target="_blank" style="color:#3366FF;text-decoration:none">了解详情></a></div></div>
</span></span>