<div class="gmail_quote"><div>Hi Florian: <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yes. As explained in the thread, the slave synchronizes its outputs to<br>
its inputs (from the process data point of view). So you have to<br>
send the inputs, too. Please register an input PDO entry (for example<br>
the control word), and you're done.<br>
</blockquote></div><br>I followed your instructions, and it works. <br><br>However, today, I received a few more BeckHoff EL5101 modules. The "product code" and "Revision No" are the same as the previous one, but the Pdos are different by default. <br>
<br>I changed declaration values in my application to suit these new data. I can't even get these new modules to switch into "OP" mode. I try a few different ways to declare PDOs, no luck. So now, I wonder if you can give me some advice on this new type EL5101.<br>
<br>I use the master which is produced from ethercat-1.4.0-rc3.<br><br><br>Below are the xml output from one of the new modules.<br><br>-bash-3.2# ethercat xml -p 1<br><?xml version="1.0" ?><br> <EtherCATInfo><br>
<!-- Slave 1 --><br> <Vendor><br> <Id>2</Id><br> </Vendor><br> <Descriptions><br> <Devices><br> <Device><br> <Type ProductCode="#x13ed3052" RevisionNo="#x03fb0000">EL5101</Type><br>
<Name><![CDATA[EL5101 1K. Inc. Encoder 5V]]></Name><br> <Sm Enable="1" StartAddress="6144" ControlByte="38" DefaultSize="48" /><br> <Sm Enable="1" StartAddress="6272" ControlByte="34" DefaultSize="48" /><br>
<Sm Enable="1" StartAddress="4096" ControlByte="36" DefaultSize="3" /><br> <Sm Enable="1" StartAddress="4352" ControlByte="32" DefaultSize="5" /><br>
<RxPdo Sm="2" Fixed="1" Mandatory="1"><br> <Index>#x1600</Index><br> <Name>RxPDO-Map Outputs</Name><br> <Entry><br>
<Index>#x0108</Index><br> <SubIndex>0</SubIndex><br> <BitLen>0</BitLen><br> <Name></Name><br> <DataType>UINT0</DataType><br>
</Entry><br> <Entry><br> <Index>#x0210</Index><br> <SubIndex>112</SubIndex><br> <BitLen>0</BitLen><br> <Name></Name><br>
<DataType>UINT0</DataType><br> </Entry><br> </RxPdo><br> <TxPdo Sm="3" Fixed="1" Mandatory="1"><br> <Index>#x1a00</Index><br>
<Name>TxPDO-Map Inputs</Name><br> <Entry><br> <Index>#x0108</Index><br> <SubIndex>0</SubIndex><br> <BitLen>0</BitLen><br>
<Name></Name><br> <DataType>UINT0</DataType><br> </Entry><br> <Entry><br> <Index>#x0210</Index><br> <SubIndex>96</SubIndex><br>
<BitLen>0</BitLen><br> <Name></Name><br> <DataType>UINT0</DataType><br> </Entry><br> <Entry><br> <Index>#x0310</Index><br>
<SubIndex>96</SubIndex><br> <BitLen>0</BitLen><br> <Name></Name><br> <DataType>UINT0</DataType><br> </Entry><br>
</TxPdo><br> </Device><br> </Devices><br> </Descriptions><br></EtherCATInfo><br>-bash-3.2# <br><br><br>Below are the dmesg output:<br><br>[ 49.056504] ec_md_ethercat v1.02e: Starting...<br>
[ 49.056596] EtherCAT: Requesting master 0...<br>[ 49.056688] EtherCAT DEBUG: IDLE -> OPERATION.<br>[ 49.056693] EtherCAT: Successfully requested master 0.<br>[ 49.056791] EtherCAT DEBUG: ecrt_master_callbacks(master = 0xdd9d8800, request_cb = 0xe007635f, release_cb = 0xe007634e, cb_data = 0x0)<br>
[ 49.056797] ec_md_ethercat v1.02e: Registering domain...<br>[ 49.056892] EtherCAT DEBUG: ecrt_master_create_domain(master = 0xdd9d8800)<br>[ 49.056896] EtherCAT DEBUG: Created domain 0.<br>[ 49.056900] ec_md_ethercat v1.02e: Registering Pdo entries...<br>
[ 49.056996] EtherCAT DEBUG: ecrt_domain_reg_pdo_entry_list(domain = 0xdc99a0c0, regs = 0xe0078968)<br>[ 49.057003] EtherCAT DEBUG: ecrt_master_slave_config(master = 0xdd9d8800, alias = 1, position = 0, vendor_id = 0x2, product_code = 0x13ed3052)<br>
[ 49.057010] EtherCAT DEBUG: Creating slave configuration for 1:0, 0x00000002/0x13ED3052.<br>[ 49.057017] EtherCAT DEBUG: Attached slave 1 to config 1:0.<br>[ 49.057029] EtherCAT DEBUG: ecrt_slave_config_reg_pdo_entry(sc = 0xdda4c400, index = 0x0108, subindex = 0x00, domain = 0xdc99a0c0, bit_position = 0x0)<br>
[ 49.057037] EtherCAT DEBUG: Domain 0: Added 0 bytes, total 0.<br>[ 49.057040] ec_md_ethercat v1.02e: Activating master...<br>[ 49.057138] EtherCAT DEBUG: ecrt_master_activate(master = 0xdd9d8800)<br>[ 49.057143] EtherCAT: Domain0: Logical address 0x00000000, 0 byte, expected working counter 0.<br>
[ 49.057262] EtherCAT DEBUG: Stopping master thread.<br>[ 49.057278] EtherCAT DEBUG: Master IDLE thread exiting...<br>[ 49.057306] EtherCAT: Master thread exited.<br>[ 49.057400] EtherCAT DEBUG: FSM datagram is dd9d8ac4.<br>
[ 49.057404] EtherCAT: Starting EtherCAT-OP thread.<br>[ 49.057592] ec_md_ethercat v1.02e: Starting cyclic sample thread...<br>[ 49.057706] ec_md_ethercat v1.02e: RT timer started with 1193/1193 ticks.<br>[ 49.057812] ec_md_ethercat v1.02e: Initialized.<br>
[ 49.057965] EtherCAT DEBUG: Operation thread running.<br>[ 49.058745] ec_md_ethercat v1.02e: 2 slave(s).<br>[ 49.058850] ec_md_ethercat v1.02e: AL states: 0x02.<br>[ 49.058943] ec_md_ethercat v1.02e: Link is up.<br>
[ 49.059038] <br>[ 49.059039] LXRT CHANGED MODE (TRAP), PID = 1171, VEC = 14, SIGNO = 11.<br>[ 49.059275] BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000<br>[ 49.059461] printing eip: e0076740 *pde = 00000000 <br>
[ 49.059679] Oops: 0000 [#1] <br>[ 49.059834] Modules linked in: ec_md_ethercat(F) rtai_sem rtai_shm rtai_fifos rtai_usi rtai_lxrt rtai_hal rtai_smi ec_8139too ec_master<br>[ 49.060643] <br>[ 49.060726] Pid: 1171, comm: U:HARD:0:11 Tainted: GF (2.6.24.4 #2)<br>
[ 49.060829] EIP: 0060:[<e0076740>] EFLAGS: 00010246 CPU: 0<br>[ 49.060934] EIP is at run+0x131/0x215 [ec_md_ethercat]<br>[ 49.061028] EAX: 00000000 EBX: 00000000 ECX: 00000001 EDX: 003d09ad<br>[ 49.061125] ESI: 00000000 EDI: e0078968 EBP: 00000000 ESP: dca33fb4<br>
[ 49.061224] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068<br>[ 49.061321] Process U:HARD:0:11 (pid: 1171, ti=dca32000 task=dca55020 task.ti=dca32000)<0><br>[ 49.061424] I-pipe domain Linux<br>[ 49.061575] Stack: e0078600 e0078180 00000000 00000000 e007fd87 e0092a00 e0086501 00000000 <br>
[ 49.062252] 0000000b 00001f80 e007fc74 00000000 c0104087 00000000 00000000 00000000 <br>[ 49.062927] 00000000 04808100 0000c000 <br>[ 49.063266] Call Trace:<br>[ 49.063432] [<e007fd87>] kthread_fun+0x113/0x181 [rtai_lxrt]<br>
[ 49.063643] [<e007fc74>] kthread_fun+0x0/0x181 [rtai_lxrt]<br>[ 49.063827] [<c0104087>] kernel_thread_helper+0x7/0x10<br>[ 49.063989] =======================<br>[ 49.064079] Code: 8b 04 9d 48 86 07 e0 0f b7 54 06 04 a1 10 81 07 e0 89 94 88 a4 00 00 00 eb 7e 3d 52 30 ed 13 75 19 8b 04 9d 48 86 07 e0 0f b7 0f <0f> b7 14 06 a1 0c 81 07 e0 89 54 88 04 eb 5e 3d 52 30 c0 0f 75 <br>
[ 49.068204] EIP: [<e0076740>] run+0x131/0x215 [ec_md_ethercat] SS:ESP 0068:dca33fb4<br>[ 49.068479] ---[ end trace 5fd177be24834f31 ]---<br>[ 58.191414] EtherCAT DEBUG: File opened.<br>[ 58.191540] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0x8030a400 (0x0), arg = 0xbfac2d88)<br>
[ 58.191670] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0xc130a401 (0x1), arg = 0xbfac2db8)<br>[ 58.191800] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0xc130a401 (0x1), arg = 0xbfac2db8)<br>[ 58.191942] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0x8030a400 (0x0), arg = 0xbfac2d3c)<br>
[ 58.192066] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0xc130a401 (0x1), arg = 0xbfac2db8)<br>[ 58.192249] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0xc130a401 (0x1), arg = 0xbfac2db8)<br>[ 58.192943] EtherCAT DEBUG: File closed.<br>
-bash-3.2# <br><br><br clear="all">Thanks in advance.<br> <br>Jason Xu<br>from New Zealand<br>