[etherlab-users] problem in using new BeckHoff encoder EL5101 RevisionNo='0x03fb0000'

Jason Xu jason at motiondesign.co.nz
Fri Jul 10 05:02:33 CEST 2009


Hi Florian:

Yes. As explained in the thread, the slave synchronizes its outputs to
> its inputs (from the process data point of view). So you have to
> send the inputs, too. Please register an input PDO entry (for example
> the control word), and you're done.
>

I followed your instructions, and it works.

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.

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.

I use the master which is produced from ethercat-1.4.0-rc3.


Below are the xml output from one of the new modules.

-bash-3.2# ethercat xml -p 1
<?xml version="1.0" ?>
  <EtherCATInfo>
    <!-- Slave 1 -->
    <Vendor>
      <Id>2</Id>
    </Vendor>
    <Descriptions>
      <Devices>
        <Device>
          <Type ProductCode="#x13ed3052"
RevisionNo="#x03fb0000">EL5101</Type>
          <Name><![CDATA[EL5101 1K. Inc. Encoder 5V]]></Name>
          <Sm Enable="1" StartAddress="6144" ControlByte="38"
DefaultSize="48" />
          <Sm Enable="1" StartAddress="6272" ControlByte="34"
DefaultSize="48" />
          <Sm Enable="1" StartAddress="4096" ControlByte="36"
DefaultSize="3" />
          <Sm Enable="1" StartAddress="4352" ControlByte="32"
DefaultSize="5" />
          <RxPdo Sm="2" Fixed="1" Mandatory="1">
            <Index>#x1600</Index>
            <Name>RxPDO-Map Outputs</Name>
            <Entry>
              <Index>#x0108</Index>
              <SubIndex>0</SubIndex>
              <BitLen>0</BitLen>
              <Name></Name>
              <DataType>UINT0</DataType>
            </Entry>
            <Entry>
              <Index>#x0210</Index>
              <SubIndex>112</SubIndex>
              <BitLen>0</BitLen>
              <Name></Name>
              <DataType>UINT0</DataType>
            </Entry>
          </RxPdo>
          <TxPdo Sm="3" Fixed="1" Mandatory="1">
            <Index>#x1a00</Index>
            <Name>TxPDO-Map Inputs</Name>
            <Entry>
              <Index>#x0108</Index>
              <SubIndex>0</SubIndex>
              <BitLen>0</BitLen>
              <Name></Name>
              <DataType>UINT0</DataType>
            </Entry>
            <Entry>
              <Index>#x0210</Index>
              <SubIndex>96</SubIndex>
              <BitLen>0</BitLen>
              <Name></Name>
              <DataType>UINT0</DataType>
            </Entry>
            <Entry>
              <Index>#x0310</Index>
              <SubIndex>96</SubIndex>
              <BitLen>0</BitLen>
              <Name></Name>
              <DataType>UINT0</DataType>
            </Entry>
          </TxPdo>
        </Device>
     </Devices>
  </Descriptions>
</EtherCATInfo>
-bash-3.2#


Below are the dmesg output:

[   49.056504] ec_md_ethercat v1.02e: Starting...
[   49.056596] EtherCAT: Requesting master 0...
[   49.056688] EtherCAT DEBUG: IDLE -> OPERATION.
[   49.056693] EtherCAT: Successfully requested master 0.
[   49.056791] EtherCAT DEBUG: ecrt_master_callbacks(master = 0xdd9d8800,
request_cb = 0xe007635f,  release_cb = 0xe007634e, cb_data = 0x0)
[   49.056797] ec_md_ethercat v1.02e: Registering domain...
[   49.056892] EtherCAT DEBUG: ecrt_master_create_domain(master =
0xdd9d8800)
[   49.056896] EtherCAT DEBUG: Created domain 0.
[   49.056900] ec_md_ethercat v1.02e: Registering Pdo entries...
[   49.056996] EtherCAT DEBUG: ecrt_domain_reg_pdo_entry_list(domain =
0xdc99a0c0, regs = 0xe0078968)
[   49.057003] EtherCAT DEBUG: ecrt_master_slave_config(master = 0xdd9d8800,
alias = 1, position = 0, vendor_id = 0x2, product_code = 0x13ed3052)
[   49.057010] EtherCAT DEBUG: Creating slave configuration for 1:0,
0x00000002/0x13ED3052.
[   49.057017] EtherCAT DEBUG: Attached slave 1 to config 1:0.
[   49.057029] EtherCAT DEBUG: ecrt_slave_config_reg_pdo_entry(sc =
0xdda4c400, index = 0x0108, subindex = 0x00, domain = 0xdc99a0c0,
bit_position = 0x0)
[   49.057037] EtherCAT DEBUG: Domain 0: Added 0 bytes, total 0.
[   49.057040] ec_md_ethercat v1.02e: Activating master...
[   49.057138] EtherCAT DEBUG: ecrt_master_activate(master = 0xdd9d8800)
[   49.057143] EtherCAT: Domain0: Logical address 0x00000000, 0 byte,
expected working counter 0.
[   49.057262] EtherCAT DEBUG: Stopping master thread.
[   49.057278] EtherCAT DEBUG: Master IDLE thread exiting...
[   49.057306] EtherCAT: Master thread exited.
[   49.057400] EtherCAT DEBUG: FSM datagram is dd9d8ac4.
[   49.057404] EtherCAT: Starting EtherCAT-OP thread.
[   49.057592] ec_md_ethercat v1.02e: Starting cyclic sample thread...
[   49.057706] ec_md_ethercat v1.02e: RT timer started with 1193/1193 ticks.
[   49.057812] ec_md_ethercat v1.02e: Initialized.
[   49.057965] EtherCAT DEBUG: Operation thread running.
[   49.058745] ec_md_ethercat v1.02e: 2 slave(s).
[   49.058850] ec_md_ethercat v1.02e: AL states: 0x02.
[   49.058943] ec_md_ethercat v1.02e: Link is up.
[   49.059038]
[   49.059039] LXRT CHANGED MODE (TRAP), PID = 1171, VEC = 14, SIGNO = 11.
[   49.059275] BUG: unable to handle kernel NULL pointer dereference at
virtual address 00000000
[   49.059461] printing eip: e0076740 *pde = 00000000
[   49.059679] Oops: 0000 [#1]
[   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
[   49.060643]
[   49.060726] Pid: 1171, comm: U:HARD:0:11 Tainted: GF       (2.6.24.4 #2)
[   49.060829] EIP: 0060:[<e0076740>] EFLAGS: 00010246 CPU: 0
[   49.060934] EIP is at run+0x131/0x215 [ec_md_ethercat]
[   49.061028] EAX: 00000000 EBX: 00000000 ECX: 00000001 EDX: 003d09ad
[   49.061125] ESI: 00000000 EDI: e0078968 EBP: 00000000 ESP: dca33fb4
[   49.061224]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
[   49.061321] Process U:HARD:0:11 (pid: 1171, ti=dca32000 task=dca55020
task.ti=dca32000)<0>
[   49.061424] I-pipe domain Linux
[   49.061575] Stack: e0078600 e0078180 00000000 00000000 e007fd87 e0092a00
e0086501 00000000
[   49.062252]        0000000b 00001f80 e007fc74 00000000 c0104087 00000000
00000000 00000000
[   49.062927]        00000000 04808100 0000c000
[   49.063266] Call Trace:
[   49.063432]  [<e007fd87>] kthread_fun+0x113/0x181 [rtai_lxrt]
[   49.063643]  [<e007fc74>] kthread_fun+0x0/0x181 [rtai_lxrt]
[   49.063827]  [<c0104087>] kernel_thread_helper+0x7/0x10
[   49.063989]  =======================
[   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
[   49.068204] EIP: [<e0076740>] run+0x131/0x215 [ec_md_ethercat] SS:ESP
0068:dca33fb4
[   49.068479] ---[ end trace 5fd177be24834f31 ]---
[   58.191414] EtherCAT DEBUG: File opened.
[   58.191540] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0x8030a400
(0x0), arg = 0xbfac2d88)
[   58.191670] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0xc130a401
(0x1), arg = 0xbfac2db8)
[   58.191800] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0xc130a401
(0x1), arg = 0xbfac2db8)
[   58.191942] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0x8030a400
(0x0), arg = 0xbfac2d3c)
[   58.192066] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0xc130a401
(0x1), arg = 0xbfac2db8)
[   58.192249] EtherCAT DEBUG: ioctl(filp = 0xddab0100, cmd = 0xc130a401
(0x1), arg = 0xbfac2db8)
[   58.192943] EtherCAT DEBUG: File closed.
-bash-3.2#


Thanks in advance.

Jason Xu
from New Zealand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20090710/79603d0d/attachment-0003.htm>


More information about the Etherlab-users mailing list