[etherlab-dev] EtherCAT bridge

Henry Bausley hbausley at deltatau.com
Fri Dec 10 17:01:32 CET 2010


Here is a setup I tested on the primary side.  I was able to see this
reflected on the secondary.

/* Master 0, Slave 4, "EL6692"
 * Vendor ID:       0x00000002
 * Product code:    0x1a243052
 * Revision number: 0x00100000
 */

ec_pdo_entry_info_t slave_4_pdo_entries[] = {
    {0x7000, 0x00, 32},
    {0x7000, 0x01, 32},
    {0x6000, 0x00, 32},
    {0x6000, 0x01, 32},
};

ec_pdo_info_t slave_4_pdos[] = {
    {0x1600, 2, slave_4_pdo_entries + 0}, /* RxPDO-Map */
    {0x1a00, 2, slave_4_pdo_entries + 2}, /* TxPDO-Map */
};

ec_sync_info_t slave_4_syncs[] = {
    {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
    {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
    {2, EC_DIR_OUTPUT, 1, slave_4_pdos + 0, EC_WD_DISABLE},
    {3, EC_DIR_INPUT, 1, slave_4_pdos + 1, EC_WD_DISABLE},
    {0xff}
};



On Fri, 2010-12-10 at 14:11 +0100, Anders Bach Madsen wrote:
> Thank you for your answer. We have this setup now (except that our
> secondary master is a BH Windows Twincat machine). Can anyone show me
> I can create custom PDO’s on a bridge that I can set from my primary
> side, so that the master on the secondary side can read them. I am a
> little confused on how to create the pdo entries for the bridge slave.
> The structs returned from ethercat cstruct are like follows:
> 
>  
> 
> /* Master 0, Slave 1, "EL6692"
> 
>  * Vendor ID:       0x00000002
> 
>  * Product code:    0x1a243052
> 
>  * Revision number: 0x00100000
> 
>  */
> 
>  
> 
> ec_pdo_entry_info_t slave_1_pdo_entries[] = {
> 
>     {0x10f4, 0x02, 2}, /* SubIndex 002 */
> 
>     {0x0000, 0x00, 6},
> 
>     {0x0000, 0x00, 3},
> 
>     {0x1800, 0x09, 1}, /* TxPDO toggle */
> 
>     {0x1800, 0x07, 1}, /* TxPDO state */
> 
>     {0x10f4, 0x0e, 1}, /* Control value update toggle */
> 
>     {0x10f4, 0x0f, 1}, /* Time stamp update toggle */
> 
>     {0x10f4, 0x10, 1}, /* External device not connected */
> 
> };
> 
>  
> 
> ec_pdo_info_t slave_1_pdos[] = {
> 
>     {0x1600, 0, NULL}, /* RxPDO-Map */
> 
>     {0x1a01, 8, slave_1_pdo_entries + 0}, /* TxPDO-Map External Sync
> Compact */
> 
>     {0x1a00, 0, NULL}, /* TxPDO-Map */
> 
> };
> 
>  
> 
> ec_sync_info_t slave_1_syncs[] = {
> 
>     {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
> 
>     {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
> 
>     {2, EC_DIR_OUTPUT, 1, slave_1_pdos + 0, EC_WD_DISABLE},
> 
>     {3, EC_DIR_INPUT, 2, slave_1_pdos + 1, EC_WD_DISABLE},
> 
>     {0xff}
> 
> };
> 
>  
> 
> How do I add my own pdo’s? 
> 
> How do I tell which are input and which are output pdo’s?
> 
> How do I map these so that I can write to them in my cyclic_task?
> 
>  
> 
> I hope that somebody can help ;-)
> 
>  
> 
> /Anders
> 
>  
> 
> 
> Fra: Henry Bausley [mailto:hbausley at deltatau.com] 
> Sendt: 8. december 2010 17:04
> Til: Anders Bach Madsen
> Cc: etherlab-dev at etherlab.org
> Emne: Re: [etherlab-dev] EtherCAT bridge
> 
> 
> 
>  
> 
> 
> I have successfully used the EL6692 to communicate between two
> different Linux based Etherlab Ethercat masters.
> 
> The first master is attached via the EBUS and the slave will show up
> as a  EtherCAT Bridge terminal (Primary)
> 
> The second master you attach to the RJ45 connector and that slave will
> show up as the secondary.
> 
> Create PDO mappings at 0x1600 and 0x1a00 and add our own PDOs.
> 
> 
> On Wed, 2010-12-08 at 15:22 +0100, Anders Bach Madsen wrote: 
> 
> Hey
> 
>  
> 
> We have a scenario where we have two master nodes (one Windows based
> BH Twincat and one Linux based Etherlab Ethercat master) with each
> their set of input/outputs. Now we would like to use a bridge (BH
> EL6692) to connect the two system so that one system could send
> information to the other.
> 
>  
> 
> Has anyone successfully used a bridge (like EL6692) to turn one master
> into a client for the other network?
> 
>  
> 
> If so, how should it be connected (both the components and the
> cables)?
> 
>  
> 
> And last but not least, are there any configuration specific things
> that one needs to remember?
> 
>  
> 
> If somebody has done this including the Etherlab Ethercat master code,
> we would really like to know.
> 
>  
> 
> Hope that somebody out there has gotten this to work or knows of a
> different way to accomplish the same thing.
> 
>  
> 
> Best regards / Med venlig hilsen
> 
>  
> 
> Anders Bach Madsen
> 
> PhD Computer Science, Software Developer
> 
> signatur
> 
> Delta 4  
> 
> DK-8382 Hinnerup
> 
> www.rogd.dk
> 
>  
> 
> Tlf:   +45 8764 0884
> 
> Mobil: +45 2225 1331
> 
> Fax:   +45 8764 0844
> 
>  
> 
> 
> 
> 
>          
>         _______________________________________________
>         etherlab-dev mailing list
>         etherlab-dev at etherlab.org
>         http://lists.etherlab.org/mailman/listinfo/etherlab-dev
> 
> _______________________________________________
> etherlab-dev mailing list
> etherlab-dev at etherlab.org
> http://lists.etherlab.org/mailman/listinfo/etherlab-dev

**********************************************************
Outbound scan for Spam or Virus by Barracuda at Delta Tau
**********************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-dev/attachments/20101210/1f242f76/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 7601 bytes
Desc: image001.png
URL: <http://lists.etherlab.org/pipermail/etherlab-dev/attachments/20101210/1f242f76/attachment.png>


More information about the etherlab-dev mailing list