<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Manual NC in HSM Post Processor Forum</title>
    <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/10788636#M8721</link>
    <description>&lt;P&gt;It is important to know that buffered Manual NC commands will be output whenever the &lt;U&gt;executeManualNC&lt;/U&gt; command is processed so you must place these calls in the exact location where you want Manual NC commands executed, or in your case where you want the Passthrough text output.&amp;nbsp; To process these commands just before the new operation starts, you should place the &lt;U&gt;executeManual&lt;/U&gt; NC command just prior to where the operation comment is output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;  // Output the operation description
  writeln("");
  executeManualNC();  // &amp;lt;&amp;lt;&amp;lt; executes the Manual NC commands at this location
  if (hasParameter("operation-comment")) {&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likewise, in the &lt;U&gt;onClose&lt;/U&gt; function you should place the call immediately after the call to &lt;U&gt;goHome&lt;/U&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;  // Move to home position
  goHome();
  executeManualNC();  // ADD THIS LINE&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will also want to move the definition of the &lt;U&gt;onPassThrough&lt;/U&gt; function outside of the &lt;U&gt;onClose&lt;/U&gt; function.&amp;nbsp; You shouldn't place a function definition within another function definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function onPassThrough(text) {
  writeBlock(text);
}
  
function onClose() {&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can force out a tool change between operations that use the same tool by using the &lt;STRONG&gt;Force tool change&lt;/STRONG&gt; Manual NC command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bobschultz_0-1638206340789.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/994922i515A16055FF78272/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bobschultz_0-1638206340789.png" alt="bobschultz_0-1638206340789.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Nov 2021 17:20:29 GMT</pubDate>
    <dc:creator>bob.schultz</dc:creator>
    <dc:date>2021-11-29T17:20:29Z</dc:date>
    <item>
      <title>Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9358536#M8710</link>
      <description>&lt;P&gt;Hello. That is the question that arose. How in a postprocessor to move a line with a manual code to another place.&lt;/P&gt;&lt;P&gt;Postprocessor output like this:&lt;/P&gt;&lt;P&gt;N6( D27.5)&lt;BR /&gt;G0 G28 U0.&lt;BR /&gt;G28 W0.&lt;BR /&gt;M60&lt;BR /&gt;G98 G18&lt;BR /&gt;T0909&lt;BR /&gt;(DRILL D27.5-1)&lt;BR /&gt;M8&lt;BR /&gt;G97 S850 M3 P11&lt;BR /&gt;G0 Z7.&lt;BR /&gt;X0.&lt;BR /&gt;G80&lt;BR /&gt;G0 Z2.&lt;BR /&gt;G83 Z-56. R-1. Q10000 F59.5&lt;BR /&gt;G80&lt;BR /&gt;G0 Z7.&lt;BR /&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;EM&gt;M301&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;M9&lt;BR /&gt;G28 U0.&lt;BR /&gt;G28 W0.&lt;BR /&gt;M1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Required like this:&lt;/P&gt;&lt;P&gt;N6( D27.5)&lt;BR /&gt;G0 G28 U0.&lt;BR /&gt;G28 W0.&lt;BR /&gt;M60&lt;BR /&gt;G98 G18&lt;BR /&gt;T0909&lt;BR /&gt;(DRILL D27.5-1)&lt;BR /&gt;M8&lt;BR /&gt;G97 S850 M3 P11&lt;BR /&gt;G0 Z7.&lt;BR /&gt;X0.&lt;BR /&gt;G80&lt;BR /&gt;G0 Z2.&lt;BR /&gt;G83 Z-56. R-1. Q10000 F59.5&lt;BR /&gt;G80&lt;BR /&gt;G0 Z7.&lt;BR /&gt;M9&lt;BR /&gt;G28 U0.&lt;BR /&gt;G28 W0.&lt;BR /&gt;M1&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;EM&gt;M301&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Postprocessor&amp;nbsp;&lt;A href="https://cam.autodesk.com/posts/download.php?name=doosan%20mill-turn%20fanuc" target="_blank" rel="noopener"&gt;doosan_20mill-turn_fanuc&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;A href="https://cam.autodesk.com/posts/download.php?name=samsung%20mill-turn%20fanuc" target="_blank" rel="noopener"&gt;samsung_20mill-turn_fanuc&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 17:41:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9358536#M8710</guid>
      <dc:creator>uladzimiruser</dc:creator>
      <dc:date>2020-03-04T17:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9364105#M8711</link>
      <description>&lt;P&gt;Section&amp;nbsp;&lt;STRONG&gt;5.1.2 Delay Processing of Manual NC Commands&lt;/STRONG&gt;&amp;nbsp; of the&lt;A href="https://cam.autodesk.com/posts/posts/guides/Post%20Processor%20Training%20Guide.pdf" target="_blank" rel="noopener"&gt; Post Processor Training Guide&lt;/A&gt; explains how to delay the output of Manual NC commands (output them in whatever location you want).&amp;nbsp; Please take a look at this document and see if it explains well enough.&amp;nbsp; Feel free to ask questions concerning this logic if necessary.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Mar 2020 00:00:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9364105#M8711</guid>
      <dc:creator>bob.schultz</dc:creator>
      <dc:date>2020-03-07T00:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9364319#M8712</link>
      <description>&lt;P&gt;I found the function itself&lt;/P&gt;&lt;P&gt;(function onPassThrough(text) {&lt;BR /&gt;writeBlock(text);&lt;BR /&gt;}),&lt;/P&gt;&lt;P&gt;but I still can’t understand its logic. When entering at the beginning of the program, this function is in the right place, and if this function is located between processing transitions, it is displayed a little out of place. As far as I understand, is it enough for me to register (executeManualNC) anywhere where I want to see this function?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Mar 2020 08:55:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9364319#M8712</guid>
      <dc:creator>uladzimiruser</dc:creator>
      <dc:date>2020-03-07T08:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9364618#M8713</link>
      <description>&lt;P&gt;You will need to add the following functions to your post first.&amp;nbsp; You can copy and paste this code before the &lt;EM&gt;onSection&lt;/EM&gt; function.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;/**
 Buffer Manual NC commands for processing later
*/
var manualNC = [];
function onManualNC(command, value) {
  manualNC.push({command:command, value:value});
}
/**
 Processes the Manual NC commands
 Pass the desired command to process or leave argument list blank to process all buffered
 commands
*/
function executeManualNC(command) {
  for (var i = 0; i &amp;lt; manualNC.length; ++i) {
    if (!command || (command == manualNC[i].command)) {
      expandManualNC(manualNC[i].command, manualNC[i].value);
    }
  }
  for (var i = 0; i &amp;lt; manualNC.length; ++i) {
    if (!command || (command == manualNC[i].command)) {
      manualNC.splice(i, 1);
    }
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;Now you will add the &lt;EM&gt;executeManual&lt;/EM&gt; call in the location where you want to execute the Manual NC command, in your case the Pass Through command.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;    if (!isFirstSection() &amp;amp;&amp;amp; properties.optionalStop) {
      onCommand(COMMAND_OPTIONAL_STOP);
    }
    
    executeManualNC();  // ADD THIS LINE&lt;/LI-CODE&gt;
&lt;P&gt;The previous section is always ended at the beginning of the &lt;EM&gt;onSection&lt;/EM&gt; function, which is why you are seeing your M-code output in the wrong place.&amp;nbsp; Adding these functions and call allows you to process the Manual NC command anywhere in your program that you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Mar 2020 15:47:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9364618#M8713</guid>
      <dc:creator>bob.schultz</dc:creator>
      <dc:date>2020-03-07T15:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9365146#M8714</link>
      <description>&lt;P&gt;Everything seems to work out. But now there was such a misfortune. Before the introduction of this function, commands written in manual mode at the beginning of the program were displayed correctly.&lt;BR /&gt;1 Attachment 1.nc&lt;BR /&gt;And when adding this function, they were transferred to the very bottom of the program, where I indicated this function.&lt;BR /&gt;2 Attachment .nc&lt;/P&gt;&lt;P&gt;As far as I understand, I now need a function&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp; if (! isFirstSection () &amp;amp;&amp;amp; properties.onPassThrough) {&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onCommand (COMMAND_PASS_THROUGH);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; executeManualNC (); // ADD THIS LINE&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;Move to the beginning of the program?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 07:50:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9365146#M8714</guid>
      <dc:creator>uladzimiruser</dc:creator>
      <dc:date>2020-03-08T07:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9368923#M8715</link>
      <description>&lt;P&gt;You should be able to insert the following code&amp;nbsp;at the top of the &lt;EM&gt;onSection&lt;/EM&gt; function to execute the Manual NC commands placed before the first operation.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function onSection() {
  
  if (isFirstSection()) {
    executeManualNC();
  }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 12:24:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9368923#M8715</guid>
      <dc:creator>bob.schultz</dc:creator>
      <dc:date>2020-03-10T12:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9576980#M8716</link>
      <description>&lt;P&gt;I have essentially the same problem as this thread describes. &amp;nbsp;But try as I might I can't get the right combination of commands to post things where I want. &amp;nbsp;See this post: &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/fusion-360-manufacture/manual-nc-posting-before-machine-retracts/td-p/9570686" target="_blank"&gt;https://forums.autodesk.com/t5/fusion-360-manufacture/manual-nc-posting-before-machine-retracts/td-p/9570686&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 17:09:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9576980#M8716</guid>
      <dc:creator>tomae</dc:creator>
      <dc:date>2020-06-12T17:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9577220#M8717</link>
      <description>&lt;P&gt;There is a mistake in the shown code for the &lt;EM&gt;executeManualNC&lt;/EM&gt; command listed in this thread.&amp;nbsp; It should look like the following, otherwise multiple consecutive Manual NC commands will leave remnants for the following section (they will be processed twice).&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;  for (var i = manualNC.length -1; i &amp;gt;= 0; --i) {  // THIS LINE IS CHANGED
    if (!command || (command == manualNC[i].command)) {
      manualNC.splice(i, 1);
    }
  }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 19:17:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9577220#M8717</guid>
      <dc:creator>bob.schultz</dc:creator>
      <dc:date>2020-06-12T19:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9577316#M8718</link>
      <description>&lt;P&gt;Thanks, that did it!&lt;/P&gt;&lt;P&gt;-Tom&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2020 20:23:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9577316#M8718</guid>
      <dc:creator>tomae</dc:creator>
      <dc:date>2020-06-12T20:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9669955#M8719</link>
      <description>&lt;P&gt;I just want to say thank you. I have probably spent 20 hrs trying to figure out how to do this.&lt;/P&gt;&lt;P&gt;Cw&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 14:15:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/9669955#M8719</guid>
      <dc:creator>militiaproducts</dc:creator>
      <dc:date>2020-08-03T14:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/10785366#M8720</link>
      <description>&lt;P&gt;I am revisting this issue. I thought I had it handled, but really it isnt. I want the pass through to be at the end of the tool, after it goes home, and it is always before the M5,M8,home move, so I always manually enter that in my pass through to be safe. I am sure there is a correct way to do this. I tried to copy and paste in your above commands, and it changed things, but its not correct. I will attatch the "test" post I have been messing with, along with the good one I use all the time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another thing that I would like to have is as in this instance, there are 2 features with the same tool. I would like it to post the 2nd one with all the required info so I can start at that point if needed. In all situations. Like if you are rough turning with T5, then finishing with T5, I may want to re run the finish. I have to reenter the needed info manually.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;cw&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;N2(DRILL4)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G00&lt;/SPAN&gt; &lt;SPAN&gt;G28&lt;/SPAN&gt; &lt;SPAN&gt;U0.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G53&lt;/SPAN&gt; &lt;SPAN&gt;Z-4.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M69&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G54&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G98&lt;/SPAN&gt; &lt;SPAN&gt;G18&lt;/SPAN&gt; &lt;SPAN&gt;M46&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;T1111&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M621&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G97&lt;/SPAN&gt; &lt;SPAN&gt;S382&lt;/SPAN&gt; &lt;SPAN&gt;M03&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G00&lt;/SPAN&gt; &lt;SPAN&gt;Z0.625&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;X0.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;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SPAN&gt;G00&lt;/SPAN&gt; &lt;SPAN&gt;Z0.225&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G83&lt;/SPAN&gt; &lt;SPAN&gt;Z-6.4253&lt;/SPAN&gt; &lt;SPAN&gt;R-2.2871&lt;/SPAN&gt; &lt;SPAN&gt;F1.528&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G80&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G00&lt;/SPAN&gt; &lt;SPAN&gt;Z0.625&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G28&lt;/SPAN&gt; &lt;SPAN&gt;U0.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G53&lt;/SPAN&gt; &lt;SPAN&gt;Z-4.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M05&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M622&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M100&lt;/SPAN&gt; &lt;SPAN&gt;P12&amp;nbsp; (this should be after home move above)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M105&lt;/SPAN&gt; &lt;SPAN&gt;P12&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M110&lt;/SPAN&gt; &lt;SPAN&gt;P12&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 27 Nov 2021 15:12:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/10785366#M8720</guid>
      <dc:creator>militiaproducts</dc:creator>
      <dc:date>2021-11-27T15:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/10788636#M8721</link>
      <description>&lt;P&gt;It is important to know that buffered Manual NC commands will be output whenever the &lt;U&gt;executeManualNC&lt;/U&gt; command is processed so you must place these calls in the exact location where you want Manual NC commands executed, or in your case where you want the Passthrough text output.&amp;nbsp; To process these commands just before the new operation starts, you should place the &lt;U&gt;executeManual&lt;/U&gt; NC command just prior to where the operation comment is output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;  // Output the operation description
  writeln("");
  executeManualNC();  // &amp;lt;&amp;lt;&amp;lt; executes the Manual NC commands at this location
  if (hasParameter("operation-comment")) {&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Likewise, in the &lt;U&gt;onClose&lt;/U&gt; function you should place the call immediately after the call to &lt;U&gt;goHome&lt;/U&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;  // Move to home position
  goHome();
  executeManualNC();  // ADD THIS LINE&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will also want to move the definition of the &lt;U&gt;onPassThrough&lt;/U&gt; function outside of the &lt;U&gt;onClose&lt;/U&gt; function.&amp;nbsp; You shouldn't place a function definition within another function definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;function onPassThrough(text) {
  writeBlock(text);
}
  
function onClose() {&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can force out a tool change between operations that use the same tool by using the &lt;STRONG&gt;Force tool change&lt;/STRONG&gt; Manual NC command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bobschultz_0-1638206340789.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/994922i515A16055FF78272/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bobschultz_0-1638206340789.png" alt="bobschultz_0-1638206340789.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 17:20:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/10788636#M8721</guid>
      <dc:creator>bob.schultz</dc:creator>
      <dc:date>2021-11-29T17:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/10788803#M8722</link>
      <description>&lt;P&gt;I am closer, but why would it post the second line of the first pass through again at the beginning of the second?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G28&lt;/SPAN&gt; &lt;SPAN&gt;U0.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G53&lt;/SPAN&gt; &lt;SPAN&gt;Z-4.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M01&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;M100&lt;/SPAN&gt; &lt;SPAN&gt;P12&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M105&lt;/SPAN&gt; &lt;SPAN&gt;P123&amp;nbsp; (first correct time)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;N3(DRILL4 2)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G00&lt;/SPAN&gt; &lt;SPAN&gt;G28&lt;/SPAN&gt; &lt;SPAN&gt;U0.&lt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SPAN&gt; &lt;SPAN&gt;U0.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G53&lt;/SPAN&gt; &lt;SPAN&gt;Z-4.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M05&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M09&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;M201&lt;/SPAN&gt;&lt;SPAN&gt; (CHIP CONVEYOR STOP)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G00&lt;/SPAN&gt; &lt;SPAN&gt;G28&lt;/SPAN&gt; &lt;SPAN&gt;U0.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G53&lt;/SPAN&gt; &lt;SPAN&gt;Z-4.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M105&lt;/SPAN&gt; &lt;SPAN&gt;P123&amp;nbsp; &amp;nbsp; (2nd&amp;nbsp; incorrect time)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M110&lt;/SPAN&gt; &lt;SPAN&gt;P12&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M46&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;G54&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;M30&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 29 Nov 2021 18:17:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/10788803#M8722</guid>
      <dc:creator>militiaproducts</dc:creator>
      <dc:date>2021-11-29T18:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/10789154#M8723</link>
      <description>&lt;P&gt;The code you used in &lt;U&gt;executeManualNC&lt;/U&gt; is old code that is incorrect.&amp;nbsp; You should replace the following ...&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;  for (var i = 0; i &amp;lt; manualNC.length; ++i) {
    if (!command || (command == manualNC[i].command)) {
      manualNC.splice(i, 1);
    }
  }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;... with this code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;  for (var i = manualNC.length - 1; i &amp;gt;= 0; --i) {
    if (!command || (command == manualNC[i].command)) {
      manualNC.splice(i, 1);
    }
  }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 21:04:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/10789154#M8723</guid>
      <dc:creator>bob.schultz</dc:creator>
      <dc:date>2021-11-29T21:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Manual NC</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/10789284#M8724</link>
      <description>&lt;P&gt;well that worked. I will play around with this.&lt;/P&gt;&lt;P&gt;I really want to thank you for your help with this. It is priceless.&lt;/P&gt;&lt;P&gt;I wish I understood what the language meant. I am limited to copy and pasting what you said.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;cw&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 22:06:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/manual-nc/m-p/10789284#M8724</guid>
      <dc:creator>militiaproducts</dc:creator>
      <dc:date>2021-11-29T22:06:53Z</dc:date>
    </item>
  </channel>
</rss>

