<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to SMC_Interpolator / CNC Abort – ControlAxisByPos Sometimes Remains Busy and Axis Continues Moving</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c3b2a1abd/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c3b2a1abd/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/4c3b2a1abd/</id><updated>2026-10-27T16:35:07.197000Z</updated><subtitle>Recent posts to SMC_Interpolator / CNC Abort – ControlAxisByPos Sometimes Remains Busy and Axis Continues Moving</subtitle><entry><title>SMC_Interpolator / CNC Abort – ControlAxisByPos Sometimes Remains Busy and Axis Continues Moving</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c3b2a1abd/?limit=25#b4f4" rel="alternate"/><published>2026-10-27T16:35:07.197000Z</published><updated>2026-10-27T16:35:07.197000Z</updated><author><name>gseidel</name><uri>https://forge.codesys.com/u/gseidel/</uri></author><id>https://forge.codesys.com2169edb2a66cf062a10a9a65bbb039489f79ec71</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi kishan,&lt;/p&gt;
&lt;p&gt;I would recommend to first execute a stop (input bSlowStop or bQuickStop of the interpolator). Only when the interpolator has stopped you should abort the interpolator and preprocessing FBs. BTW., a new rising edge of the execute input should suffice.&lt;/p&gt;
&lt;p&gt;In case preprocessing is done in a different task: take care to write the abort signal to a local variable in the path and interpolation task and use this local copy. (Otherwise, some preprocessing FBs might see an abort and others not, in the same cycle of the task.)&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Georg&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SMC_Interpolator / CNC Abort – ControlAxisByPos Sometimes Remains Busy and Axis Continues Moving</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/4c3b2a1abd/?limit=25#7b93" rel="alternate"/><published>2026-09-25T09:19:48.408000Z</published><updated>2026-09-25T09:19:48.408000Z</updated><author><name>kishan</name><uri>https://forge.codesys.com/u/kishan/</uri></author><id>https://forge.codesys.come57fa8b9f12e4c8c9a8bcef95c023adef4214686</id><summary type="html">&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;</summary></entry></feed>