<p>Hi,</p><p>I'm having trouble in using master to connect a MDP(Modular device profile) slaves. I had read almost all MDP documents from Beckoff, and I found that there are three types device: module device, modular device, and fieldbus gateway. The latter two need dynamic configuration at PREOP state. Our slave is the second type, it is a modular device. I can find much info about it. I am not sure the problem is config error or something else. The result is slave can't transmit to OP state, I don't how to get it work now.</p><p>Any ideas are welcome and I'll gladly provide any additional information needed. <br/></p><p><br/></p><p><br/></p><p>ethercat debug 1 info as follow:</p><p><br/></p><p>[ 4067.512911] EtherCAT: Requesting master 0...<br/>[ 4067.512914] EtherCAT DEBUG 0: IDLE -> OPERATION.<br/>[ 4067.512915] EtherCAT: Successfully requested master 0.<br/>[ 4067.512989] EtherCAT DEBUG 0: ecrt_master_create_domain(master = 0xf3c2c000)<br/>[ 4067.512991] EtherCAT DEBUG 0: Created domain 0.<br/>[ 4067.512993] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3c2c000, alias = 0, position = 0, vendor_id = 0xe0000002, product_code = 0x00000001)<br/>[ 4067.512995] EtherCAT DEBUG 0: Creating slave configuration for 0:0, 0xE0000002/0x00000001.<br/>[ 4067.512997] EtherCAT DEBUG 0 0:0: Attached slave 0.<br/>[ 4067.513093] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sync_manager(sc = 0xf015b000, sync_index = 0, dir = 1, watchdog_mode = 1)<br/>[ 4067.513098] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sync_manager(sc = 0xf015b000, sync_index = 1, dir = 2, watchdog_mode = 1)<br/>[ 4067.513101] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sync_manager(sc = 0xf015b000, sync_index = 2, dir = 1, watchdog_mode = 1)<br/>[ 4067.513104] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_assign_clear(sc = 0xf015b000, sync_index = 2)<br/>[ 4067.513108] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_assign_add(sc = 0xf015b000, sync_index = 2, pdo_index = 0x1600)<br/>[ 4067.513110] EtherCAT DEBUG 0 0:0: Loading default mapping for PDO 0x1600.<br/>[ 4067.513111] EtherCAT DEBUG 0 0:0: Found PDO name "Slave-1 Output Mapping".<br/>[ 4067.513115] EtherCAT DEBUG 0 0:0: Entry 0x7001:01.<br/>[ 4067.513116] EtherCAT DEBUG 0 0:0: Entry 0x7001:02.<br/>[ 4067.513117] EtherCAT DEBUG 0 0:0: Entry 0x7001:03.<br/>[ 4067.513119] EtherCAT DEBUG 0 0:0: Entry 0x7001:04.<br/>[ 4067.513122] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_mapping_clear(sc = 0xf015b000, pdo_index = 0x1600)<br/>[ 4067.513126] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_mapping_add(sc = 0xf015b000, pdo_index = 0x1600, entry_index = 0x7001, entry_subindex = 0x01, entry_bit_length = 16)<br/>[ 4067.513129] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_mapping_add(sc = 0xf015b000, pdo_index = 0x1600, entry_index = 0x7001, entry_subindex = 0x02, entry_bit_length = 16)<br/>[ 4067.513133] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_mapping_add(sc = 0xf015b000, pdo_index = 0x1600, entry_index = 0x7001, entry_subindex = 0x03, entry_bit_length = 16)<br/>[ 4067.513135] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_mapping_add(sc = 0xf015b000, pdo_index = 0x1600, entry_index = 0x7001, entry_subindex = 0x04, entry_bit_length = 16)<br/>[ 4067.513138] EtherCAT DEBUG 0 0:0: ecrt_slave_config_sync_manager(sc = 0xf015b000, sync_index = 3, dir = 2, watchdog_mode = 1)<br/>[ 4067.513141] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_assign_clear(sc = 0xf015b000, sync_index = 3)<br/>[ 4067.513144] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_assign_add(sc = 0xf015b000, sync_index = 3, pdo_index = 0x1A00)<br/>[ 4067.513146] EtherCAT DEBUG 0 0:0: Loading default mapping for PDO 0x1A00.<br/>[ 4067.513148] EtherCAT DEBUG 0 0:0: Found PDO name "Slave-1 Input Mapping".<br/>[ 4067.513150] EtherCAT DEBUG 0 0:0: Entry 0x6002:01.<br/>[ 4067.513152] EtherCAT DEBUG 0 0:0: Entry 0x6002:02.<br/>[ 4067.513153] EtherCAT DEBUG 0 0:0: Entry 0x6002:03.<br/>[ 4067.513156] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_mapping_clear(sc = 0xf015b000, pdo_index = 0x1A00)<br/>[ 4067.513160] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_mapping_add(sc = 0xf015b000, pdo_index = 0x1A00, entry_index = 0x6002, entry_subindex = 0x01, entry_bit_length = 1)<br/>[ 4067.513163] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_mapping_add(sc = 0xf015b000, pdo_index = 0x1A00, entry_index = 0x6002, entry_subindex = 0x02, entry_bit_length = 1)<br/>[ 4067.513166] EtherCAT DEBUG 0 0:0: ecrt_slave_config_pdo_mapping_add(sc = 0xf015b000, pdo_index = 0x1A00, entry_index = 0x6002, entry_subindex = 0x03, entry_bit_length = 14)<br/>[ 4067.513170] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3c2c000, alias = 0, position = 0, vendor_id = 0xe0000002, product_code = 0x00000001)<br/>[ 4067.513174] EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf015b000, index = 0x7001, subindex = 0x01, domain = 0xf3e5b200, bit_position = 0xefdf7e78)<br/>[ 4067.513177] EtherCAT DEBUG 0: Domain 0: Added 8 bytes, total 8.<br/>[ 4067.513180] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3c2c000, alias = 0, position = 0, vendor_id = 0xe0000002, product_code = 0x00000001)<br/>[ 4067.513184] EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf015b000, index = 0x7001, subindex = 0x02, domain = 0xf3e5b200, bit_position = 0xefdf7e78)<br/>[ 4067.513187] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3c2c000, alias = 0, position = 0, vendor_id = 0xe0000002, product_code = 0x00000001)<br/>[ 4067.513191] EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf015b000, index = 0x7001, subindex = 0x03, domain = 0xf3e5b200, bit_position = 0xefdf7e78)<br/>[ 4067.513195] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3c2c000, alias = 0, position = 0, vendor_id = 0xe0000002, product_code = 0x00000001)<br/>[ 4067.513198] EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf015b000, index = 0x7001, subindex = 0x04, domain = 0xf3e5b200, bit_position = 0xefdf7e78)<br/>[ 4067.513202] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3c2c000, alias = 0, position = 0, vendor_id = 0xe0000002, product_code = 0x00000001)<br/>[ 4067.513205] EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf015b000, index = 0x6002, subindex = 0x01, domain = 0xf3e5b200, bit_position = 0xefdf7e78)<br/>[ 4067.513207] EtherCAT DEBUG 0: Domain 0: Added 2 bytes, total 10.<br/>[ 4067.513210] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3c2c000, alias = 0, position = 0, vendor_id = 0xe0000002, product_code = 0x00000001)<br/>[ 4067.513215] EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf015b000, index = 0x6002, subindex = 0x02, domain = 0xf3e5b200, bit_position = 0xefdf7e78)<br/>[ 4067.513218] EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3c2c000, alias = 0, position = 0, vendor_id = 0xe0000002, product_code = 0x00000001)<br/>[ 4067.513222] EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf015b000, index = 0x6002, subindex = 0x03, domain = 0xf3e5b200, bit_position = 0xefdf7e78)<br/>[ 4067.513227] EtherCAT DEBUG 0 0:0: ecrt_slave_config_dc(sc = 0xf015b000, assign_activate = 0x0000, sync0_cycle = 2000000, sync0_shift = 0, sync1_cycle = 0, sync1_shift = 0<br/>[ 4067.513231] EtherCAT DEBUG 0 0:0: ecrt_slave_config_watchdog(sc = 0xf015b000, divider = 2498, intervals = 1000)<br/>[ 4067.513330] EtherCAT DEBUG 0: ecrt_domain_external_memory(domain = 0xf3e5b200, mem = 0xfaf2b000)<br/>[ 4067.513333] EtherCAT DEBUG 0: ecrt_master_callbacks(master = 0xf3c2c000, send_cb = 0xf966b960, receive_cb = 0xf966a0a0, cb_data = 0xf3c2c000)<br/>[ 4067.513335] EtherCAT DEBUG 0: ecrt_master_activate(master = 0xf3c2c000)<br/>[ 4067.513338] EtherCAT DEBUG 0: Adding datagram pair with expected WC 3.<br/>[ 4067.513341] EtherCAT 0: Domain0: Logical address 0x00000000, 10 byte, expected working counter 3.<br/>[ 4067.513343] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 10 byte, type LRW.<br/>[ 4067.513344] EtherCAT DEBUG 0: Stopping master thread.<br/>[ 4067.513355] EtherCAT DEBUG 0: Master IDLE thread exiting...<br/>[ 4067.513383] EtherCAT 0: Master thread exited.<br/>[ 4067.513386] EtherCAT DEBUG 0: FSM datagram is f3c2c424.<br/>[ 4067.513388] EtherCAT 0: Starting EtherCAT-OP thread.<br/>[ 4067.513425] EtherCAT DEBUG 0: Operation thread running with fsm interval = 1000 us, max data size=11250<br/>[ 4067.513429] EtherCAT WARNING 0: 228 datagrams UNMATCHED!<br/>[ 4067.513431] EtherCAT DEBUG 0: mmap()<br/>[ 4067.513437] EtherCAT DEBUG 0: Vma fault, virtual_address = aeb04000, offset = 0, page = f7689d08<br/>[ 4077.364298] EtherCAT DEBUG 0: Datagram efe2598c already queued (skipping).<br/>[ 4077.364308] EtherCAT DEBUG 0: UNMATCHED datagram:<br/>[ 4077.364309] EtherCAT DEBUG: <br/>[ 4077.364311] 0C <br/>[ 4077.364311] 8F <br/>[ 4077.364312] 00 <br/>[ 4077.364312] 00 <br/>[ 4077.364313] 00 <br/>[ 4077.364313] 00 <br/>[ 4077.364314] 0A <br/>[ 4077.364314] 00 <br/>[ 4077.364314] 00 <br/>[ 4077.364315] 00 <br/>[ 4077.364315] 00 <br/>[ 4077.364316] 00 <br/>[ 4077.364316] 00 <br/>[ 4077.364317] 00 <br/>[ 4077.364317] 00 <br/>[ 4077.364317] 00 <br/><br/>[ 4077.364318] EtherCAT DEBUG: <br/>[ 4077.364319] 00 <br/>[ 4077.364319] 00 <br/>[ 4077.364320] 00 <br/>[ 4077.364320] 00 <br/>[ 4077.364321] 00 <br/>[ 4077.364321] 00 <br/><br/>[ 4077.364326] EtherCAT DEBUG 0: Datagram efe2598c already queued (skipping).<br/>[ 4077.365026] EtherCAT DEBUG 0: Configuration changed (aborting state check).<br/>[ 4077.365028] EtherCAT DEBUG 0: Requesting OP...<br/>[ 4077.365861] EtherCAT DEBUG 0: UNMATCHED datagram:<br/>[ 4077.365862] EtherCAT DEBUG: <br/>[ 4077.365863] 0C <br/>[ 4077.365864] 90 <br/>[ 4077.365864] 00 <br/>[ 4077.365865] 00 <br/>[ 4077.365865] 00 <br/>[ 4077.365866] 00 <br/>[ 4077.365866] 0A <br/>[ 4077.365867] 00 <br/>[ 4077.365867] 00 <br/>[ 4077.365867] 00 <br/>[ 4077.365868] 00 <br/>[ 4077.365868] 00 <br/>[ 4077.365869] 00 <br/>[ 4077.365869] 00 <br/>[ 4077.365870] 00 <br/>[ 4077.365870] 00 <br/><br/>[ 4077.365871] EtherCAT DEBUG: <br/>[ 4077.365872] 00 <br/>[ 4077.365872] 00 <br/>[ 4077.365872] 00 <br/>[ 4077.365873] 00 <br/>[ 4077.365873] 00 <br/>[ 4077.365874] 00 <br/><br/>[ 4077.375082] EtherCAT DEBUG 0-0: Changing state from PREOP to OP.<br/>[ 4077.375088] EtherCAT DEBUG 0-0: Configuring...<br/>[ 4077.379860] EtherCAT DEBUG 0-0: Now in INIT.<br/>[ 4077.379862] EtherCAT DEBUG 0-0: Clearing FMMU configurations...<br/>[ 4077.381858] EtherCAT DEBUG 0-0: Clearing sync manager configurations...<br/>[ 4077.383858] EtherCAT DEBUG 0-0: Configuring mailbox sync managers...<br/>[ 4077.383862] EtherCAT DEBUG 0-0: SM0: Addr 0x1000, Size 529, Ctrl 0x26, En 1<br/>[ 4077.383864] EtherCAT DEBUG 0-0: SM1: Addr 0x1500, Size 529, Ctrl 0x22, En 1<br/>[ 4077.389860] EtherCAT DEBUG 0-0: Now in PREOP.<br/>[ 4077.389872] EtherCAT DEBUG 0-0: Setting watchdog divider to 2498.<br/>[ 4077.393869] EtherCAT DEBUG 0-0: Setting process data watchdog intervals to 1000.<br/>[ 4077.395864] EtherCAT DEBUG 0-0: SM2: Addr 0x1A00, Size 8, Ctrl 0x64, En 1<br/>[ 4077.395868] EtherCAT DEBUG 0-0: SM3: Addr 0x1E00, Size 2, Ctrl 0x60, En 1<br/>[ 4077.397860] EtherCAT DEBUG 0 0:0: FMMU: LogAddr 0x00000000, Size 8, PhysAddr 0x1A00, SM2, Dir out<br/>[ 4077.397863] EtherCAT DEBUG 0 0:0: FMMU: LogAddr 0x00000008, Size 2, PhysAddr 0x1E00, SM3, Dir in<br/>[ 4077.403870] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).<br/>[ 4077.405860] EtherCAT ERROR 0-0: AL status message 0x0001: "Unspecified error".<br/>[ 4077.409858] EtherCAT 0-0: Acknowledged state PREOP.<br/>[ 4077.518026] EtherCAT WARNING 0: 2 datagrams UNMATCHED!<br/>[ 4078.365865] EtherCAT WARNING: Datagram efe2598c (domain0-0-main) was SKIPPED 2 times.<br/><br/><br/><br/><br/><br/></p><div style="margin:20px 0;"><br/></div><br/><br/><br/><div><a href="https://a.app.qq.com/o/simple.jsp?pkgname=com.sohu.mail.client.cordova"><img border="0" src="//ad.mail.sohu.com/mail/images/score_ad_foot1_750x79.png"/> </a></div>
<br/><br/><br/>