<?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: Failing when changing spindle speed between operations in HSM Post Processor Forum</title>
    <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13705204#M29541</link>
    <description>&lt;P&gt;Comment out line number 406, which we added earlier, as shown in the image.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jul 2025 05:19:21 GMT</pubDate>
    <dc:creator>RohitMane_</dc:creator>
    <dc:date>2025-07-01T05:19:21Z</dc:date>
    <item>
      <title>Failing when changing spindle speed between operations</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13692759#M29510</link>
      <description>&lt;P&gt;When I edit the spindle speed between 2 similar or identical operations, the post fails and produces this error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;###############################################################################&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Error&lt;/SPAN&gt;&lt;SPAN&gt;: Mismatching arguments for invocation of &lt;/SPAN&gt;&lt;SPAN&gt;'string FormatNumber.format(Number) const'&lt;/SPAN&gt;&lt;SPAN&gt; (Value is not a number.).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Error&lt;/SPAN&gt;&lt;SPAN&gt; at line: &lt;/SPAN&gt;&lt;SPAN&gt;406&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;dynapath-B6GX5.cps&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Error&lt;/SPAN&gt;&lt;SPAN&gt; in operation: &lt;/SPAN&gt;&lt;SPAN&gt;'2D Pocket3 (3)'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Failed while processing onSection() for record &lt;/SPAN&gt;&lt;SPAN&gt;1636&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;###############################################################################&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;Error&lt;/SPAN&gt;&lt;SPAN&gt;: Failed to invoke function &lt;/SPAN&gt;&lt;SPAN&gt;'onSection'&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Error&lt;/SPAN&gt;&lt;SPAN&gt;: Failed to invoke &lt;/SPAN&gt;&lt;SPAN&gt;'onSection'&lt;/SPAN&gt;&lt;SPAN&gt; in the post configuration.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Error&lt;/SPAN&gt;&lt;SPAN&gt;: Failed to execute configuration.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Stop time: Sunday, June &lt;/SPAN&gt;&lt;SPAN&gt;22&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;2025&lt;/SPAN&gt; &lt;SPAN&gt;4:54:17&lt;/SPAN&gt;&lt;SPAN&gt; PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Post processing failed.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been comparing this post with others that do work OK and I'm stumped. I've attached a sample model, the post, the code produced, and the error log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the model I changed the feed between 2Dpocket 1 and 2, and changed the spindle speed between pocket 2 and 3. It processes the feed change OK, but not the spindle speed, it fails before processing pocket 3. I can post process the model OK with other posts for other machines. What did I do wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Model -&amp;nbsp;&lt;A href="https://a360.co/44ebF4A" target="_blank"&gt;https://a360.co/44ebF4A&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jun 2025 17:24:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13692759#M29510</guid>
      <dc:creator>InfoGZ52M</dc:creator>
      <dc:date>2025-06-22T17:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Failing when changing spindle speed between operations</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13693274#M29511</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10131287"&gt;@InfoGZ52M&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;The value of &lt;STRONG&gt;lengthOffset&lt;/STRONG&gt; is not updated, which causes a runtime error because its current value is undefined. Therefore, along with the &lt;STRONG&gt;firstToolNumber&lt;/STRONG&gt; variable, you must also update the &lt;STRONG&gt;lengthOffset&lt;/STRONG&gt; variable at line number 405 in your post.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;var lengthOffset = section.getTool().lengthOffset;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 07:38:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13693274#M29511</guid>
      <dc:creator>RohitMane_</dc:creator>
      <dc:date>2025-06-23T07:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Failing when changing spindle speed between operations</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13703339#M29534</link>
      <description>&lt;P&gt;I added that line to my post, now it post processes that test model. I used it to make code for a production part and it failed again. I worked on the test model to reproduce the problem, I added a cycle with a different new tool. Now it fails like the production part fails. Those files are attached to this post.&lt;/P&gt;&lt;P&gt;&lt;A href="https://a360.co/44ebF4A" target="_blank"&gt;https://a360.co/44ebF4A&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Next post shows a new problem I discovered while testing.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 01:02:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13703339#M29534</guid>
      <dc:creator>InfoGZ52M</dc:creator>
      <dc:date>2025-06-30T01:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Failing when changing spindle speed between operations</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13703353#M29535</link>
      <description>&lt;P&gt;I then discovered that the new post when it does not fail and creates a complete program, it makes an error in the tool number of the last tool changed. I suppressed the 3rd cycle in the model, this allowed the post to make a complete program without failing. In this program, line N189 should have T0120, not T0101. T0101 applies the tool offsets for tool 01 to the current tool in the spindle which is tool 20. This nearly crashed the machine. The rest of this program seems OK. I tried the post with other models with multiple tools and it seems to always work OK except for the last tool offset call. Model and program file and post attached.&lt;/P&gt;&lt;P&gt;&lt;A href="https://a360.co/46mztFP" target="_blank"&gt;https://a360.co/46mztFP&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 01:16:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13703353#M29535</guid>
      <dc:creator>InfoGZ52M</dc:creator>
      <dc:date>2025-06-30T01:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Failing when changing spindle speed between operations</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13703990#M29537</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10131287"&gt;@InfoGZ52M&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;The code in the post-processor uses the variable &lt;STRONG&gt;lengthOffset&lt;/STRONG&gt;, which is declared at line 338. However, this variable is not updated when there is a change in spindle speed or direction. To address this, you should either move the update outside of the current conditional block or ensure it is updated again, as shown in the image. Adding the line at 397 will effectively resolve both issues.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rohit_maneYV8C9_0-1751278431781.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1547910i25C3F8D9DBC1512F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rohit_maneYV8C9_0-1751278431781.png" alt="rohit_maneYV8C9_0-1751278431781.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P data-start="83" data-end="167"&gt;Refer to the following details to identify the tools used in different operations:&lt;/P&gt;
&lt;UL data-start="168" data-end="366"&gt;
&lt;LI data-start="168" data-end="253"&gt;
&lt;P data-start="170" data-end="253"&gt;&lt;CODE data-start="170" data-end="202"&gt;getPreviousSection().getTool()&lt;/CODE&gt; returns the tool used in the previous operation.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="254" data-end="292"&gt;
&lt;P data-start="256" data-end="292"&gt;&lt;CODE data-start="256" data-end="262"&gt;tool&lt;/CODE&gt; refers to the current tool.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="293" data-end="366"&gt;
&lt;P data-start="295" data-end="366"&gt;&lt;CODE data-start="295" data-end="321"&gt;getNextTool(tool.number)&lt;/CODE&gt; returns the tool used in the next operation.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 11:03:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13703990#M29537</guid>
      <dc:creator>RohitMane_</dc:creator>
      <dc:date>2025-06-30T11:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Failing when changing spindle speed between operations</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13704908#M29540</link>
      <description>&lt;P&gt;I edited the post per your instructions and it no longer fails. I does still post the wrong tool offset info at the last toolchange.&lt;/P&gt;&lt;P&gt;I've attached the edited post and it's output. On line N271 The T word should be T0120, not T0101. T0120 preloads the first tool (01) into the toolchange shuttle then enters the offsets for tool 20 into the control. Tool 20 was inserted on line N270 with T2000. Later, the M6 on line N292 puts the first tool (01) back into the spindle to keep the spindle taper clean.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 22:55:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13704908#M29540</guid>
      <dc:creator>InfoGZ52M</dc:creator>
      <dc:date>2025-06-30T22:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Failing when changing spindle speed between operations</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13705204#M29541</link>
      <description>&lt;P&gt;Comment out line number 406, which we added earlier, as shown in the image.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 05:19:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13705204#M29541</guid>
      <dc:creator>RohitMane_</dc:creator>
      <dc:date>2025-07-01T05:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Failing when changing spindle speed between operations</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13706077#M29544</link>
      <description>&lt;P&gt;That fixed it. Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 14:43:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/failing-when-changing-spindle-speed-between-operations/m-p/13706077#M29544</guid>
      <dc:creator>InfoGZ52M</dc:creator>
      <dc:date>2025-07-01T14:43:06Z</dc:date>
    </item>
  </channel>
</rss>

