<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=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoPlainText">It's something like<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">------<o:p></o:p></p>
<p class="MsoPlainText">t = 0.0 : master receive datagram 0, receive actual position -2<o:p></o:p></p>
<p class="MsoPlainText">t = 0.1 : <b>master send datagram 1 (target position 1)</b><o:p></o:p></p>
<p class="MsoPlainText">t = 0.2 : <b>drive receive datagram 1</b> (actual position -1 returned)<o:p></o:p></p>
<p class="MsoPlainText">t = 0.5 : <b>drive sync 0, target position 1 becomes active</b>, actual position 0 is recorded<o:p></o:p></p>
<p class="MsoPlainText">------<o:p></o:p></p>
<p class="MsoPlainText">t = 0.0 : master receive datagram 1, receive actual position -1<o:p></o:p></p>
<p class="MsoPlainText">t = 1.1 : master send datagram 2<o:p></o:p></p>
<p class="MsoPlainText">t = 1.2 : drive receive datagram 2 (actual position 0 returned)<o:p></o:p></p>
<p class="MsoPlainText">t = 1.5 : drive sync 0, target position 2 becomes active,
<b>actual position 1 is recorded</b><o:p></o:p></p>
<p class="MsoPlainText">------<o:p></o:p></p>
<p class="MsoPlainText">t = 2.0 : master receive datagram 2, receive actual position 0<o:p></o:p></p>
<p class="MsoPlainText">t = 2.1 : master send datagram 3<o:p></o:p></p>
<p class="MsoPlainText">t = 2.2 : drive receive datagram 3<b> (actual position 1 returned)<o:p></o:p></b></p>
<p class="MsoPlainText">t = 2.5 : drive sync 0, target position 3 becomes active, actual position 2 is recorded<o:p></o:p></p>
<p class="MsoPlainText">------<o:p></o:p></p>
<p class="MsoPlainText">t = 3.0 : master receive datagram 3, <b>receive actual position 1</b><o:p></o:p></p>
<p class="MsoPlainText">t = 3.1 : master send datagram 4<o:p></o:p></p>
<p class="MsoPlainText">t = 3.2 : drive receive datagram 4 (actual position 2 returned)<o:p></o:p></p>
<p class="MsoPlainText">t = 3.5 : drive sync 0, target position 4 becomes active, actual position 3 is recorded<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">So you are comparing Target Position 4 with Actual Position 1 which, due to the sync0 time, is around 3 ½ cycles old.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">What you need to do is find the Following Error PDO index, add that to your drive PDO data, and use it.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I use Yaskawa Drives so don't know what the ELMO one is (and you need to log in to get the ESI file so I can't look it up). On the Yaskawa drive it is index 0x60F4:00.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Note: the above assumes that your master is waking at cycle time zero; the slave distributed clocks are nicely synced; you have an appropriate Sync Shift Time (say 500us); and the ecrt_master_send() is called so that the drive receives
its datagram before the sync event.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Regards,<o:p></o:p></p>
<p class="MsoPlainText">Graeme.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><span lang="EN-US" style="mso-fareast-language:EN-NZ">-----Original Message-----<br>
From: etherlab-users [mailto:etherlab-users-bounces@etherlab.org] On Behalf Of Michael Ruder<br>
Sent: Wednesday, 16 May 2018 4:52 AM<br>
To: etherlab-users@etherlab.org<br>
Subject: [etherlab-users] Cyclic Synchronous Position mode</span></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Hello,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I am currently experimenting with the Cyclic Synchronous Position mode of ELMO drives. I am using EtherLab 1.5.2 from the 1.5.2 branch with ec_generic on a PREEMPT RT system (kernel 4.14.28).
<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">If I compare the current position the drive reports in the frame I receive after I send a frame with a new target position, I see a certain offset between this current position and the new target position that I do not understand. If
I divide the offset by the current velocity, I receive a constant time delay of about 3.45 ms (which means 3.45 cycles, as we have<o:p></o:p></p>
<p class="MsoPlainText">1 ms cycle time).<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">From my understanding, the new target position should become active some time after the frame has been received (depending on several 0x1c32 values), while the inputs are sampled at some other moment (depending on serveral 0x1c33 values).
This could explain the 0.45 cycles as being the delay between input sampling and activating the output value.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">However, this still does not explain the 3 cycle delay. One cycle I could understand because I compare the just sent target position with the right afterwards received current position, which is from the previous cycle.
<o:p></o:p></p>
<p class="MsoPlainText">But where do the other 2 come from? I could not find any documentation about a FIFO like buffer in the drives.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Also, for precise synchronisation, I would need to know the 0.45 ms delay not just approximately by measureing it. Unfortunately, all 0x1c32/0x1c33 (index 6 and 9) are 0 for my slaves. Is there some "general" information on those delays?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I am using SYNC0 (with period 1 ms like my cycle). The SYNC0 offset does not affect the above offset, which seems however understandable as all 0x1c3x-delays are relative to the SYNC0 moment. The SYNC0 offset however does of course affect
the real time moment the axis reaches the position.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Thanks for any help,<o:p></o:p></p>
<p class="MsoPlainText">-- <o:p></o:p></p>
<p class="MsoPlainText">. -Michael<o:p></o:p></p>
<p class="MsoPlainText">_______________________________________________<o:p></o:p></p>
<p class="MsoPlainText">etherlab-users mailing list<o:p></o:p></p>
<p class="MsoPlainText"><a href="mailto:etherlab-users@etherlab.org"><span style="color:windowtext;text-decoration:none">etherlab-users@etherlab.org</span></a><o:p></o:p></p>
<p class="MsoPlainText"><a href="http://lists.etherlab.org/mailman/listinfo/etherlab-users"><span style="color:windowtext;text-decoration:none">http://lists.etherlab.org/mailman/listinfo/etherlab-users</span></a><o:p></o:p></p>
</div>
</body>
</html>