Re: [etherlab-users] Domain offset overlap SOLVED
Folks, Thanks for all the suggestions. I finally figured out the issue. In my code am building all the PDOs, entries and getting domain offsets all in one big loop such that I am making calls to ecru_slave_config_reg_pdo_entry before I have made all the calls to ecrt_slave_config_pdo_assign_add(), ecrt_slave_config_pdo_mapping_add, etc. What I found is that I need to have all of the PDOs and PDO entries defined before I make any calls to ecrt_slave_config_reg_pdo_entry(). Best regards, Steven From: "ronaldo.merc...@diamond.ac.uk<mailto:ronaldo.merc...@diamond.ac.uk>" mailto:ronaldo.merc...@diamond.ac.uk>> Date: Thursday, April 10, 2014 11:44 AM To: "ronaldo.merc...@diamond.ac.uk<mailto:ronaldo.merc...@diamond.ac.uk>" mailto:ronaldo.merc...@diamond.ac.uk>>, Steven Hartmann mailto:shartm...@militho.com>>, Etherlab Users mailto:etherlab-users@etherlab.org>> Subject: RE: Domain offset overlap One further question, when the master is running, do all your slaves go to the “OP” state? Ronaldo From: ronaldo.merc...@diamond.ac.uk<mailto:ronaldo.merc...@diamond.ac.uk> [mailto:ronaldo.merc...@diamond.ac.uk] Sent: 10 April 2014 16:54 To: shartm...@militho.com<mailto:shartm...@militho.com>; etherlab-users@etherlab.org<mailto:etherlab-users@etherlab.org> Subject: Re: [etherlab-users] Domain offset overlap Hello Steve, Could you show how you generate the domains (*dptr)->Domain? Have you tried using one domain only? Regards, Ronaldo From: Steve Hartmann [mailto:shartm...@militho.com] Sent: 09 April 2014 20:41 To: Etherlab Users Subject: [etherlab-users] Domain offset overlap 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 -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] Domain offset overlap
One further question, when the master is running, do all your slaves go to the "OP" state? Ronaldo From: ronaldo.merc...@diamond.ac.uk [mailto:ronaldo.merc...@diamond.ac.uk] Sent: 10 April 2014 16:54 To: shartm...@militho.com; etherlab-users@etherlab.org Subject: Re: [etherlab-users] Domain offset overlap Hello Steve, Could you show how you generate the domains (*dptr)->Domain? Have you tried using one domain only? Regards, Ronaldo From: Steve Hartmann [mailto:shartm...@militho.com] Sent: 09 April 2014 20:41 To: Etherlab Users Subject: [etherlab-users] Domain offset overlap 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 -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] Domain offset overlap
Hello Steve, Could you show how you generate the domains (*dptr)->Domain? Have you tried using one domain only? Regards, Ronaldo From: Steve Hartmann [mailto:shartm...@militho.com] Sent: 09 April 2014 20:41 To: Etherlab Users Subject: [etherlab-users] Domain offset overlap 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 -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] Domain offset overlap
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 mailto:dave.p...@gleeble.com>> Date: Wednesday, April 9, 2014 5:07 PM To: Steven Hartmann <mailto:shartm...@militho.com>>, Etherlab Users mailto:etherlab-users@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 mailto:dave.p...@gleeble.com>> Date: Wednesday, April 9, 2014 2:45 PM To: Etherlab Users <mailto:etherlab-users@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-requ...@etherlab.org wrote: Message: 1 Date: Wed, 9 Apr 2014 19:41:29 + From: Steve Hartmann To: Etherlab Users Subject: [etherlab-users] Domain offset overlap Message-ID: 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 | <>___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] Domain offset overlap
Hi Gaven, So, the reason I started down this road is because it does not work for the most part. I can get the DO channels to work, but nothing else seems to work. So, if an input and and output PDO have the same offset into the process data image that I grabbing data from and poking data into, does that mean I should always process the inputs before the outputs? Thanks, Steven From: Gavin Lambert mailto:gav...@compacsort.com>> Date: Wednesday, April 9, 2014 6:34 PM To: Steven Hartmann mailto:shartm...@militho.com>>, Etherlab Users mailto:etherlab-users@etherlab.org>> Subject: RE: [etherlab-users] Domain offset overlap Just don’t worry about it, and use the offsets returned from reg_pdo_entry to read/write the data. The master library will do the right things to get that data to the slaves and back. ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] Domain offset overlap
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 mailto:dave.p...@gleeble.com>> Date: Wednesday, April 9, 2014 5:07 PM To: Steven Hartmann mailto:shartm...@militho.com>>, Etherlab Users mailto:etherlab-users@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 mailto:dave.p...@gleeble.com>> Date: Wednesday, April 9, 2014 2:45 PM To: Etherlab Users mailto:etherlab-users@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-requ...@etherlab.org<mailto:etherlab-users-requ...@etherlab.org> wrote: Message: 1 Date: Wed, 9 Apr 2014 19:41:29 + From: Steve Hartmann <mailto:shartm...@militho.com> To: Etherlab Users <mailto:etherlab-users@etherlab.org> Subject: [etherlab-users] Domain offset overlap Message-ID: <mailto:cf6b0c97.f827%shartm...@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 | ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] Domain offset overlap
Hi Steve, Typically you don't need to worry about data overlaps at all. I'm not sure if the Etherlab master generates them in the first place (though your XML output suggests that it does), but even if it does it should only do so in cases when it is "safe". (In particular, if you have a single slave with inputs and outputs, or you have an output-only slave followed by an input-only slave, then it's possible to use the same physical memory in the EtherCAT packet to store both - once the output data is "used" by a slave that space in the packet is free to have input data filled in afterwards.) Regarding your confusion about ecrt_slave_config_reg_pdo_entry reporting values higher than ecrt_domain_size, this is because they are reporting different information. The former tells you where to read or write the values in master-internal memory to have them copied to the right place in the EtherCAT packet. The latter tells you the size of the data in the EtherCAT packet itself. Thus the former refers to the non-overlapped data and the latter refers to the overlapped data. Just don't worry about it, and use the offsets returned from reg_pdo_entry to read/write the data. The master library will do the right things to get that data to the slaves and back. Regards, Gavin Lambert From: etherlab-users-boun...@etherlab.org [mailto:etherlab-users-boun...@etherlab.org] On Behalf Of Steve Hartmann Sent: Thursday, 10 April 2014 09:52 To: etherlab-users@etherlab.org Subject: Re: [etherlab-users] Domain offset overlap Another confusing thing I see is ecrt_slave_config_ret_pdo_entry() reports offsets as large as 10, but when I call ecrt_domain_size(), it reports a size of 7. Since the PD buffer is a pointer to uint8_t, I am assuming the size reported is in bytes. Thanks, Steven From: Steven Hartmann Date: Wednesday, April 9, 2014 2:49 PM To: Dave Page , Etherlab Users Subject: Re: [etherlab-users] Domain offset overlap 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 Date: Wednesday, April 9, 2014 2:45 PM To: Etherlab Users 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-requ...@etherlab.org wrote: Message: 1 Date: Wed, 9 Apr 2014 19:41:29 + From: Steve Hartmann <mailto:shartm...@militho.com> To: Etherlab Users <mailto:etherlab-users@etherlab.org> Subject: [etherlab-users] Domain offset overlap Message-ID: <mailto:cf6b0c97.f827%25shartm...@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 | ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] Domain offset overlap
It also returns an error if something does not byte-align and you provide NULL for the bit_position argument. So you shouldn't see any overlapping offsets as a result of this unless you're throwing away data. From: etherlab-users-boun...@etherlab.org [mailto:etherlab-users-boun...@etherlab.org] On Behalf Of Dave Page Sent: Thursday, 10 April 2014 10:07 To: Steve Hartmann; etherlab-users@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 Date: Wednesday, April 9, 2014 2:45 PM To: Etherlab Users 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-requ...@etherlab.org wrote: Message: 1 Date: Wed, 9 Apr 2014 19:41:29 + From: Steve Hartmann <mailto:shartm...@militho.com> To: Etherlab Users <mailto:etherlab-users@etherlab.org> Subject: [etherlab-users] Domain offset overlap Message-ID: <mailto:cf6b0c97.f827%25shartm...@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 | ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
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 mailto:dave.p...@gleeble.com>> Date: Wednesday, April 9, 2014 2:45 PM To: Etherlab Users <mailto:etherlab-users@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-requ...@etherlab.org wrote: Message: 1 Date: Wed, 9 Apr 2014 19:41:29 + From: Steve Hartmann To: Etherlab Users Subject: [etherlab-users] Domain offset overlap Message-ID: 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 | ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] Domain offset overlap
Another confusing thing I see is ecrt_slave_config_ret_pdo_entry() reports offsets as large as 10, but when I call ecrt_domain_size(), it reports a size of 7. Since the PD buffer is a pointer to uint8_t, I am assuming the size reported is in bytes. Thanks, Steven From: Steven Hartmann mailto:shartm...@militho.com>> Date: Wednesday, April 9, 2014 2:49 PM To: Dave Page mailto:dave.p...@gleeble.com>>, Etherlab Users mailto:etherlab-users@etherlab.org>> Subject: Re: [etherlab-users] Domain offset overlap 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 mailto:dave.p...@gleeble.com>> Date: Wednesday, April 9, 2014 2:45 PM To: Etherlab Users mailto:etherlab-users@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-requ...@etherlab.org<mailto:etherlab-users-requ...@etherlab.org> wrote: Message: 1 Date: Wed, 9 Apr 2014 19:41:29 + From: Steve Hartmann <mailto:shartm...@militho.com> To: Etherlab Users <mailto:etherlab-users@etherlab.org> Subject: [etherlab-users] Domain offset overlap Message-ID: <mailto:cf6b0c97.f827%shartm...@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 | ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
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-requ...@etherlab.org wrote: Message: 1 Date: Wed, 9 Apr 2014 19:41:29 + From: Steve Hartmann To: Etherlab Users Subject: [etherlab-users] Domain offset overlap Message-ID: 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 | ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
Re: [etherlab-users] Domain offset overlap
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 mailto:dave.p...@gleeble.com>> Date: Wednesday, April 9, 2014 2:45 PM To: Etherlab Users mailto:etherlab-users@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-requ...@etherlab.org<mailto:etherlab-users-requ...@etherlab.org> wrote: Message: 1 Date: Wed, 9 Apr 2014 19:41:29 + From: Steve Hartmann <mailto:shartm...@militho.com> To: Etherlab Users <mailto:etherlab-users@etherlab.org> Subject: [etherlab-users] Domain offset overlap Message-ID: <mailto:cf6b0c97.f827%shartm...@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 | ___ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users
[etherlab-users] Domain offset overlap
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 2 EK1101 #x1a00 ID #x6000 1 16 ID UINT 2 EL1819 #x1a00 Channel 1 #x6000 1 1 Input BOOL #x1a01 Channel 2 #x6010 1 1 Input BOOL #x1a02 Channel 3 #x6020 1 1 Input BOOL #x1a03 Channel 4 #x6030 1 1 Input BOOL #x1a04 Channel 5 #x6040 1 1 Input BOOL #x1a05 Channel 6 #x6050 1 1 Input BOOL #x1a06 Channel 7 #x6060 1 1 Input BOOL #x1a07 Channel 8 #x6070 1 1 Input BOOL #x1a08 Channel 9 #x6080 1 1 Input BOOL #x1a09 Channel 10 #x6090 1 1 Input BOOL #x1a0a Channel 11 #x60a0 1 1 Input BOOL #x1a0b Channel 12 #x60b0 1 1 Input BOOL #x1a0c Channel 13 #x60c0 1 1 Input BOOL #x1a0d Channel 14 #x60d0 1 1 Input BOOL #x1a0e Channel 15 #x60e0 1 1 Input BOOL #x1a0f Channel 16 #x60f0 1 1 Input BOOL 2 EL2024 #x1600 Channel 1 #x7000 1 1 Output BOOL #x1601 Channel 2 #x7010 1 1 Output BOOL #x1602 Channel 3 #x7020 1 1 Output BOOL #x1603 Channel 4 #x7030 1 1 Output BOOL 2 EL4132 #x1600 RxPDO 01 mapping #x3001 1 16 Output