Hello,

I was trying to configure a Beckhoff module (EL3356-0010) for load cell, and part of the configuration XML I get is this:

         <RxPdo Sm="2" Fixed="1" Mandatory="1">
           <Index>#x1600</Index>
           <Name>RMB RxPDO-Map Control</Name>
....
           <Entry>
             <Index>#x7000</Index>
             <SubIndex>5</SubIndex>
             <BitLen>1</BitLen>
             <Name></Name>
             <DataType>BOOL</DataType>
           </Entry>
           <Entry>
             <Index>#x0000</Index>
             <BitLen>11</BitLen>
           </Entry>
         </RxPdo>
         <TxPdo Sm="3" Fixed="1" Mandatory="1">
           <Index>#x1a00</Index>
           <Name>RMB TxPDO-Map Status</Name>
           <Entry>
             <Index>#x0000</Index>
             <BitLen>1</BitLen>
           </Entry>
           <Entry>
             <Index>#x6000</Index>
             <SubIndex>2</SubIndex>
             <BitLen>1</BitLen>
             <Name></Name>
             <DataType>BOOL</DataType>
           </Entry>
           <Entry>
             <Index>#x0000</Index>
             <BitLen>1</BitLen>
           </Entry>
           <Entry>
             <Index>#x6000</Index>
             <SubIndex>4</SubIndex>
             <BitLen>1</BitLen>
             <Name></Name>
             <DataType>BOOL</DataType>
           </Entry>
           <Entry>
             <Index>#x0000</Index>
             <BitLen>2</BitLen>
           </Entry>
           <Entry>
             <Index>#x6000</Index>
             <SubIndex>7</SubIndex>
             <BitLen>1</BitLen>
             <Name></Name>
             <DataType>BOOL</DataType>
           </Entry>
...

As you can see there are several PDO-Entry with 0x0 index, they are simply GAPs in the data array. The problem comes when I try to set the PDO's, master does not correctly calculate offsets because in the function ecrt_domain_reg_pdo_entry_list, the loop exit condition while going through the ec_pdo_entry_reg_t list is "reg-> index", so it stops the loop when it finds the first one of these GAPs, so NOT having gone through all the records.

int ecrt_domain_reg_pdo_entry_list(ec_domain_t *domain,
        const ec_pdo_entry_reg_t *regs)
{
...
EC_MASTER_DBG(domain->master, 1, "ecrt_domain_reg_pdo_entry_list("
            "domain = 0x%p, regs = 0x%p)\n", domain, regs);

    for (reg = regs; reg->index; reg++) {
        sc = ecrt_master_slave_config_err(domain->master, reg->alias,
                reg->position, reg->vendor_id, reg->product_code);
...

    return 0;
}

In my case, changing the GAP index to 0x1 works, but is this finish condition correct? How do you deal with these GAPs in the list?

Thank you very much.

--
Jordi Blanch Carles
Unidad de Ensayo y Control

ENCOPIM S.L.
Carretera de Ripollet a Santiga, 104.
P.I. Els Pinetons
E-08291 RIPOLLET (Barcelona)
Tel: (+34) 935 94 23 47
Fax: (+34) 935 94 64 15

==========================================================
La información contenida en la presente transmisión es confidencial y su uso únicamente está permitido a su(s) destinatario(s). Si Ud. no es la persona destinataria de la presente transmisión, rogamos nos lo comunique de manera inmediata por teléfono (+34 935 942 347) y destruya cualquier copia de la misma (tanto digitales como en papel).

The information contained in this transmission is confidential and is intended only for the use of the addressee(s). If you are not the designated recipient of this transmission, please advise us immediately by telephone (+34 935 942 347) and destroy any copies (digital and paper).
======================================================

_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to