<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Dynamic path</title><link href="https://forge.codesys.com/forge/talk/Motion/thread/e4e5f54aff/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Motion/thread/e4e5f54aff/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Motion/thread/e4e5f54aff/</id><updated>2020-02-27T18:42:08.891000Z</updated><subtitle>Recent posts to Dynamic path</subtitle><entry><title>Dynamic path</title><link href="https://forge.codesys.com/forge/talk/Motion/thread/e4e5f54aff/?limit=25#2f8e" rel="alternate"/><published>2020-02-27T18:42:08.891000Z</published><updated>2020-02-27T18:42:08.891000Z</updated><author><name>fahansen</name><uri>https://forge.codesys.com/u/fahansen/</uri></author><id>https://forge.codesys.comd3f1fac0af34e44a1503062a731017389c93bff5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Using the Dynamic Path as example, i need to calculate the points XYZ and execute then when finish recalculate new points and execute.&lt;br/&gt;
The problem is recalculate and refreshing the buffer with the new values.&lt;/p&gt;
&lt;p&gt;How can restart the pointer / SMC_QUEUE to initial values so can refill the table with the new points??&lt;/p&gt;
&lt;p&gt;Im doing the follow steps after execute once, and the BUF not show the new values.&lt;br/&gt;
&lt;strong&gt;STEP 1:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;WHILE  queueCount &amp;gt; 0 DO&lt;br/&gt;
  queueCount := SMC_GetCount(poq:=ADR(QUEUE));            &lt;br/&gt;
  SMC_DeleteObj(poq:=ADR(QUEUE), queueCount-1);   &lt;br/&gt;
END_WHILE &lt;br/&gt;
...&lt;br/&gt;
n:=0;&lt;br/&gt;
QUEUE.bEndOfList := FALSE;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;STEP 2&lt;/strong&gt;:&lt;br/&gt;
  WHILE NOT QUEUE.bFull DO                  // when the Queue is full, wait until it has been processed by the following FBs&lt;br/&gt;
  n := n + 1;&lt;br/&gt;
  GEO.iSourceLine_No := n;&lt;br/&gt;
  GEO.piStartPos := GEO.piDestPos;      // copy last destination              &lt;br/&gt;
  IF n = 1 THEN&lt;br/&gt;
    GEO.piStartPos.dX := Eixo_X.fSetPosition;       // copy current position&lt;br/&gt;
    GEO.piStartPos.dY := Eixo_Y.fSetPosition;       // copy current position&lt;br/&gt;
   GEO.piStartPos.dZ := Eixo_Z.fSetPosition;        // copy current position&lt;br/&gt;
  END_IF        &lt;/p&gt;
&lt;p&gt;GEO.iMoveType := LIN;                 // generate linear movement &lt;br/&gt;
  GEO.iObjNo := GEO.iObjNo + 1;         // calculate number &lt;br/&gt;
  GEO.piDestPos.dX := PVL.tabValores&lt;span&gt;[n-1,1]&lt;/span&gt;;                // generate position&lt;br/&gt;
  GEO.piDestPos.dY := PVL.tabValores&lt;span&gt;[n-1,2]&lt;/span&gt;;                // generate position&lt;br/&gt;
  GEO.piDestPos.dZ := PVL.tabValores&lt;span&gt;[n-1,3]&lt;/span&gt;;                // generate position &lt;/p&gt;
&lt;p&gt;SMC_CalcLengthGeo(pg := ADR(GEO));        // calculate length of object with the help of the standard function&lt;br/&gt;
  SMC_AppendObj(poq:=ADR(QUEUE), pgi:=ADR(GEO));    //append object to que&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>