<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to SMC_NcInterpreter g code processing takes a long time.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3de9e02e20/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3de9e02e20/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/3de9e02e20/</id><updated>2023-06-02T11:16:04.507000Z</updated><subtitle>Recent posts to SMC_NcInterpreter g code processing takes a long time.</subtitle><entry><title>SMC_NcInterpreter g code processing takes a long time.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3de9e02e20/?limit=25#767d" rel="alternate"/><published>2023-06-02T11:16:04.507000Z</published><updated>2023-06-02T11:16:04.507000Z</updated><author><name>ByCNC</name><uri>https://forge.codesys.com/u/huzeyfe/</uri></author><id>https://forge.codesys.comd984206842fa5fc73f671a880e5fbd85e12dad96</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello KB,&lt;/p&gt;
&lt;p&gt;You can find the optimum value of these values by trial and error. Just so many tries!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SMC_NcInterpreter g code processing takes a long time.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3de9e02e20/?limit=25#6b2d" rel="alternate"/><published>2023-06-02T11:16:02.469000Z</published><updated>2023-06-02T11:16:02.469000Z</updated><author><name>ByCNC</name><uri>https://forge.codesys.com/u/huzeyfe/</uri></author><id>https://forge.codesys.com082c8680ade2a9c1058e7856b42779f71d1d1288</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello KB,&lt;/p&gt;
&lt;p&gt;You can find the optimum value of these values by trial and error. Just so many tries!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SMC_NcInterpreter g code processing takes a long time.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3de9e02e20/?limit=25#3f49/fa96" rel="alternate"/><published>2023-06-02T08:54:37.271000Z</published><updated>2023-06-02T08:54:37.271000Z</updated><author><name>kb-tek</name><uri>https://forge.codesys.com/u/kb-tek/</uri></author><id>https://forge.codesys.com95a738a3ae33d90e711c12ca4aec161c4c2ad004</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you very much that's working really great !&lt;/p&gt;
&lt;p&gt;Only one question : why dividing by 600 ?   shouldn't be 1000 to convert nanoseconds to microseconds ?&lt;/p&gt;
&lt;p&gt;And so, how do you determine the 200us for the while loop ?&lt;br/&gt;
Just by testing your application to be fast enough to Interprete Gcode while not blocking the rest of your code ?&lt;/p&gt;
&lt;p&gt;Thanks again for your help, you saved my day :)&lt;/p&gt;
&lt;p&gt;K.B.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SMC_NcInterpreter g code processing takes a long time.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3de9e02e20/?limit=25#3f49/27b0" rel="alternate"/><published>2023-06-02T08:54:07.489000Z</published><updated>2023-06-02T08:54:07.489000Z</updated><author><name>kb-tek</name><uri>https://forge.codesys.com/u/kb-tek/</uri></author><id>https://forge.codesys.com873fbd8aa9c820f3ffd09b69491c94cb712772f4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you very much that's working really great !&lt;/p&gt;
&lt;p&gt;Only one question : why dividing by 600 ?   shouldn't be 1000 to convert nanoseconds to microseconds ?&lt;/p&gt;
&lt;p&gt;And so, how do you determine the 200us for the while loop ?&lt;br/&gt;
Just by testing your application to be fast enough to Interprete Gcode while not blocking the rest of your code ?&lt;/p&gt;
&lt;p&gt;Thanks again for your help, you saved my day :)&lt;/p&gt;
&lt;p&gt;K.B.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SMC_NcInterpreter g code processing takes a long time.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3de9e02e20/?limit=25#3f49" rel="alternate"/><published>2023-06-01T14:48:58.678000Z</published><updated>2023-06-01T14:48:58.678000Z</updated><author><name>ByCNC</name><uri>https://forge.codesys.com/u/huzeyfe/</uri></author><id>https://forge.codesys.com4fd92a3a747aa535c01746c503c1709313e22307</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The solution is;&lt;/p&gt;
&lt;p&gt;VAR_TEMP&lt;br/&gt;
    timeBefore      : SYSTIME;&lt;br/&gt;
    timeAfter       : SYSTIME;&lt;br/&gt;
    udiDuration_us  : UDINT;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;SysTimeGetNS(timeBefore);&lt;br/&gt;
udiDuration_us := 0;&lt;/p&gt;
&lt;p&gt;WHILE udiDuration_us &amp;lt; 200 DO&lt;/p&gt;
&lt;p&gt;//SMC_ReadNcFile2&lt;br/&gt;
fbReadFile(bExecute:=b01dExecute,&lt;br/&gt;
    bAbort:=gCNC.bCycleStop,&lt;br/&gt;
    sFileName:=strFileName, &lt;br/&gt;
    pvl:=ADR(gConsts.stVarList));&lt;/p&gt;
&lt;p&gt;//SMC_NcInterpreter.&lt;br/&gt;
fbInterpreter(Sentences := fbReadFile.sentences,&lt;br/&gt;
    bExecute :=,&lt;br/&gt;
    bAbort := ,&lt;br/&gt;
    nSizeOutQueue := SIZEOF(astGeoBuffer),&lt;br/&gt;
    pbyBufferOutQueue := ADR(astGeoBuffer));&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;SysTimeGetNS(timeAfter) ;&lt;/span&gt;
&lt;span class="err"&gt;udiDuration_us := (ULINT_TO_UDINT(timeAfter-timeBefore)) / 600 ;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;END_WHILE&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SMC_NcInterpreter g code processing takes a long time.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3de9e02e20/?limit=25#fccd/eb0e" rel="alternate"/><published>2023-06-01T14:31:47.430000Z</published><updated>2023-06-01T14:31:47.430000Z</updated><author><name>kb-tek</name><uri>https://forge.codesys.com/u/kb-tek/</uri></author><id>https://forge.codesys.comb97285eb6a9719e9b1333ceb1407e3f606cb0ecd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello !&lt;/p&gt;
&lt;p&gt;I'm currently facing exactly the same problem you describe!&lt;/p&gt;
&lt;p&gt;Did you find a solution to speed up the Interpreter, or to start the Interpolator before the Interpreter finish ?&lt;/p&gt;
&lt;p&gt;Thank you very much,&lt;/p&gt;
&lt;p&gt;K.B.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SMC_NcInterpreter g code processing takes a long time.</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/3de9e02e20/?limit=25#fccd" rel="alternate"/><published>2023-02-21T05:43:36.810000Z</published><updated>2023-02-21T05:43:36.810000Z</updated><author><name>ByCNC</name><uri>https://forge.codesys.com/u/huzeyfe/</uri></author><id>https://forge.codesys.coma94f55a5017eccf905737ed34b51f15c69a8344a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;İyi iş çocuklar.&lt;/p&gt;
&lt;p&gt;3 eksen makinemde g code enterpolasyon yöntemi ile işlem yapıyorum. Sorun şu ki, işlediğim g kod satırları çoğaldıkça bekleme süresi oldukça artıyor. Bu istenmeyen bir durumdur. Örneğin 30 bin satırlık g code dosyasını "SMC_NcInterpreter" bloğu ile okumaya başladığımda satırları tek tek diziye atıyor ve hepsini atınca başlıyor. Tüm satırları okumadan enterpolatörü tetiklemeye çalıştım ama işe yaramadı.&lt;br/&gt;
Ve 30.000 satır aslında düşük bir sayıdır. Çalıştırılacak yüzbinlerce kod var. Bunu Nasıl Çözebilirim. Bazılarının aklına kodu bölüp gönderme fikri gelse de mantıklı gelmedi.&lt;/p&gt;
&lt;p&gt;Herhangi bir fikri olan var mı?&lt;/p&gt;
&lt;p&gt;Teşekkür ederim.&lt;/p&gt;
&lt;p&gt;cnc ile&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>