<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:navy;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:21.0cm 842.0pt;
        margin:2.0cm 2.0cm 2.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1740857133;
        mso-list-type:hybrid;
        mso-list-template-ids:-344398758 336134159 336134169 336134171 336134159 336134169 336134171 336134159 336134169 336134171;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-NZ link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>For some odd reason I didn’t receive the message below, only the replies.  But in any case:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I haven’t tested this myself, but I think you can still use it as read/write from a single domain.  Remember that the EtherCAT main loop consists of:<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>       </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Read previously received incoming packet.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>       </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Do any cyclic processing.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>       </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Send new outgoing packet.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>In #2, the memory location in the domain will contain the value read from the device.  You can then update this memory location with the value you want to write to the device.  (I’m not sure whether the input value gets populated strictly at #1 or at some time shortly after #3, but you can write the code such that it doesn’t need to care either way.)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>So if you want to treat them as independent in your application, then simply create two extra variables in your application’s memory; in each cyclic processing loop, copy the domain value into your input application variable and copy your output application variable into the domain value, in that order.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div class=MsoNormal align=center style='text-align:center'><span lang=EN-US><hr size=2 width="100%" align=center></span></div><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:etherlab-users-bounces@etherlab.org">etherlab-users-bounces@etherlab.org</a> [<a href="mailto:etherlab-users-bounces@etherlab.org">mailto:etherlab-users-bounces@etherlab.org</a>] <b>On Behalf Of </b>Thomas Nelson<br><b>Sent:</b> Thursday, 24 January 2013 16:15<br><b>To:</b> <a href="mailto:etherlab-users@etherlab.org">etherlab-users@etherlab.org</a><br><b>Subject:</b> [etherlab-users] Accessing same PDO for both read and write</span><span lang=EN-US><o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>All,<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB>My client has a robotics system using Copley Controls Accelnet Plus drives with a digital input-triggered capture capability that we're trying to use for positioning calibration.  This feature requires the ability to map the same slave CoE object for both read to detect the capture event and write to subsequently rearm the trigger.  Mapping this object to both Tx and Rx PDOs appears to work correctly from the PDO mapping info returned from the master.  However, when I attempt to register the corresponding mapped PDO entries in the domain, I get the same domain offset for both PDOs, preventing the application from managing them independently.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB>The ecrt_slave_config_reg_pdo_entry() function doesn't have an argument to distinguish the direction of the PDO mapping, so is this capability not supported by the master?<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB>We're using the 1.5.0 release.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB>Thanks,<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><div><div><div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'>Tom Nelson<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'>Consulting Engineer<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'>Granite Computer Sciences, LLC<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p> </o:p></span></p></div></div></div><p class=MsoNormal><span lang=EN-GB style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p> </o:p></span></p></div><p class=MsoNormal><span lang=EN-GB style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p> </o:p></span></p></div><p class=MsoNormal><span lang=EN-GB style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'><br><br><br></span><span lang=EN-GB><o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p></div></div></div></body></html>