<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to SMC_Interpolator / CNC Abort – ControlAxisByPos Sometimes Remains Busy and Axis Continues Moving</title><link>https://forge.codesys.com/forge/talk/Engineering/thread/4c3b2a1abd/</link><description>Recent posts to SMC_Interpolator / CNC Abort – ControlAxisByPos Sometimes Remains Busy and Axis Continues Moving</description><language>en</language><lastBuildDate>Fri, 25 Sep 2026 09:19:48 -0000</lastBuildDate><atom:link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c3b2a1abd/feed.rss" rel="self" type="application/rss+xml"></atom:link><item><title>SMC_Interpolator / CNC Abort – ControlAxisByPos Sometimes Remains Busy and Axis Continues Moving</title><link>https://forge.codesys.com/forge/talk/Engineering/thread/4c3b2a1abd/?limit=25#7b93</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am working with CODESYS SoftMotion CNC using a preprocessing chain, SMC_Interpolator, and SMC_ControlAxisByPos for controlling the CNC axes.&lt;/p&gt;
&lt;p&gt;I have noticed an issue when aborting CNC execution.&lt;/p&gt;
&lt;p&gt;When I execute the Abort command, I abort both the CNC preprocessing blocks and SMC_Interpolator.&lt;/p&gt;
&lt;p&gt;Normally the CNC process stops correctly.&lt;/p&gt;
&lt;p&gt;However, occasionally after the abort:&lt;/p&gt;
&lt;p&gt;SMC_Interpolator has already been aborted.&lt;/p&gt;
&lt;p&gt;CNC preprocessing has also been aborted/reset.&lt;/p&gt;
&lt;p&gt;But SMC_ControlAxisByPos.bBusy remains TRUE.&lt;/p&gt;
&lt;p&gt;The corresponding physical axis can still continue moving for some distance.&lt;/p&gt;
&lt;p&gt;This does not happen every time.&lt;/p&gt;
&lt;p&gt;My basic sequence is similar to:&lt;/p&gt;
&lt;p&gt;G-code / CNC preprocessing&lt;br/&gt;
        ↓&lt;br/&gt;
SMC_Interpolator&lt;br/&gt;
        ↓&lt;br/&gt;
Transformation&lt;br/&gt;
        ↓&lt;br/&gt;
SMC_ControlAxisByPos&lt;br/&gt;
        ↓&lt;br/&gt;
SoftMotion Axis&lt;/p&gt;
&lt;p&gt;When the operator requests CNC Abort, I set the Abort inputs of the interpolator and preprocessing function blocks.&lt;/p&gt;
&lt;p&gt;My questions are:&lt;/p&gt;
&lt;p&gt;Does SMC_Interpolator.bAbort only stop/reset the interpolator, or should it also stop the motion currently being executed by SMC_ControlAxisByPos?&lt;/p&gt;
&lt;p&gt;Can SMC_ControlAxisByPos remain Busy after the interpolator has been aborted?&lt;/p&gt;
&lt;p&gt;If bAvoidGaps = TRUE, could SMC_ControlAxisByPos still be trying to reach the last fSetPosition using the fGapVelocity / fGapAcceleration / fGapDeceleration settings after the interpolator has stopped?&lt;/p&gt;
&lt;p&gt;What is the recommended sequence for safely aborting a running CNC program?&lt;/p&gt;
&lt;p&gt;For example, should the sequence be something like:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Stop / Abort Interpolator&lt;/li&gt;
&lt;li&gt;Disable SMC_ControlAxisByPos&lt;/li&gt;
&lt;li&gt;Execute MC_Stop for all physical axes&lt;/li&gt;
&lt;li&gt;Wait until all axes reach standstill&lt;/li&gt;
&lt;li&gt;Abort/reset preprocessing blocks and CNC queues&lt;/li&gt;
&lt;li&gt;Reset CNC state&lt;/li&gt;
&lt;li&gt;Re-enable axis controllers&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Or is there a recommended CODESYS CNC method for performing a complete CNC Abort?&lt;/p&gt;
&lt;p&gt;I would especially like to understand why SMC_ControlAxisByPos.bBusy can occasionally remain TRUE and continue moving the axis even though the interpolator and preprocessing blocks have already been aborted.&lt;/p&gt;
&lt;p&gt;CODESYS SoftMotion CNC is being used with real EtherCAT servo axes.&lt;/p&gt;
&lt;p&gt;Any explanation about the correct abort/stop sequence would be appreciated.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kishan</dc:creator><pubDate>Fri, 25 Sep 2026 09:19:48 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.come57fa8b9f12e4c8c9a8bcef95c023adef4214686</guid></item></channel></rss>