[etherlab-users] Domain offset overlap

Dave Page dave.page at gleeble.com
Thu Apr 10 05:09:10 CEST 2014


     Not sure. It is not uncommon to have 'gap' or 'pad' data which is 
otherwise unused. As to the overlap, ecrt_slave_config_reg_pdo_entry 
(see master/slave_config.c:739) just scans all the PDOs in order summing 
their lengths until the argument PDO is reached. Thus, the logical 
address allocation must be monotonic.

     Is it possible ecrt_slave_config_reg_pdo_entry is getting called 
ore than once with the same index/subindex unintentionally?

     Perhaps a look at 'ethercat slaves -v' and 'ethercat cstruct' along 
with your source would help. Also, once the PDOs are mapped, the command 
'ethercat domain -v' may offer some useful information.

         - Dave

On 2014-04-09 21:16, Steve Hartmann wrote:
> Hi Dave,
>
> I do use the bit_position argument.  The first slice (16 channel DI) 
> uses offsets 2 & 3, bit positions 0-7 of each.  The second slice is a 
> 4 channel DO and uses Domain offset 3, bits 0-3.  Also,, the third 
> slice (2 channel AO) has an entry at offset 6, 16 bits while the next 
> slice (2 channel AI) also uses offset 6 with an 8-bit entry.
>
> Regards,
>
> Steven
>
> From: Dave Page <dave.page at gleeble.com <mailto:dave.page at gleeble.com>>
> Date: Wednesday, April 9, 2014 5:07 PM
> To: Steven Hartmann <shartmann at militho.com 
> <mailto:shartmann at militho.com>>, Etherlab Users 
> <etherlab-users at etherlab.org <mailto:etherlab-users at etherlab.org>>
> Subject: Re: [etherlab-users] Domain offset overlap
>
> Hi,
>
>     Sorry, I misinterpreted your message.
>
>     ecrt_slave_config_reg_pdo_entry can produce apparently overlapping 
> offsets when the PDO data is not on even bit boundaries (not divisible 
> by 8).
>
>     You may wish to use the unsigned int *bit_position argument to 
> discover the bit offsets of your data.
>
>         Best regards - Dave
>
> On 09-Apr-14 15:49, Steve Hartmann wrote:
>> Hi Dave,
>>
>> Thanks for the reply.  I am not using TwinCAT at all.  Also, please 
>> forgive my ignorance, but what is the "LRW command".
>>
>> I'm not sure how to deal with this with the etherlab stack.  If it 
>> give me a domain offset of 3 for two different slices (one input and 
>> one output), how do I deal with this overlapped data?
>>
>> Thanks,
>>
>> Steven
>>
>>
>> From: Dave Page <dave.page at gleeble.com <mailto:dave.page at gleeble.com>>
>> Date: Wednesday, April 9, 2014 2:45 PM
>> To: Etherlab Users <etherlab-users at etherlab.org 
>> <mailto:etherlab-users at etherlab.org>>
>> Subject: Re: [etherlab-users] Domain offset overlap
>>
>>
>>     In order to reduce process data size, TwinCAT overlaps the RxPDO 
>> and TxPDO for each module, then uses the LRW command to effect the 
>> transfer. So, I believe what you're seeing is normal.
>>
>>         Best regards - Dave Page
>>
>> On 09-Apr-14 15:41, etherlab-users-request at etherlab.org wrote:
>>> Message: 1
>>> Date: Wed, 9 Apr 2014 19:41:29 +0000
>>> From: Steve Hartmann<shartmann at militho.com>
>>> To: Etherlab Users<etherlab-users at etherlab.org>
>>> Subject: [etherlab-users] Domain offset overlap
>>> Message-ID:<CF6B0C97.F827%shartmann at militho.com>
>>> Content-Type: text/plain; charset="us-ascii"
>>>
>>> Hi all,
>>>
>>> I have written some code to parse the generated XML file from "ethercat xml" and use that to configure the ethercat stack.  The problem I am having is the output from ecrt_slave_config_ret_pdo_entry produces overlapped offsets.  I also tried using ecrt_slave_config_reg_pdo_entry_pos with the same results.  This is a very simple test rig that has one each of DO, DI, AO, and AI slices - all beckhoff.  I have attached a file which includes the generated XML file, the code in question, and the log output.  Does anyone know what I am doing wrong?
>>>
>>> Best regards,
>>>
>>> Steven Hartmann
>>
>>
>> -- 
>> ------------------------------------------------------------------------
>> David Page, Chief Embedded Architect
>> Dynamic Systems Inc.
>> PO Box 1234
>> Poestenkill, NY 12140
>> Telephone: +1 (518) 283-5350 | Fax: +1 (518) 283-3160 |
>
>
> -- 
> ------------------------------------------------------------------------
> David Page, Chief Embedded Architect
> Dynamic Systems Inc.
> PO Box 1234
> Poestenkill, NY 12140
> Telephone: +1 (518) 283-5350 | Fax: +1 (518) 283-3160 |

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20140409/357a22b8/attachment-0004.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dave_page.vcf
Type: text/x-vcard
Size: 314 bytes
Desc: not available
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20140409/357a22b8/attachment-0005.vcf>


More information about the Etherlab-users mailing list