<p>3D Printers are pretty basic when it comes to g-code. There is no cycle start or cycle pause function on them. There is also no g-code command to interrupt the previous command. To get it to a halt you could turn it off. Or if the printer's firmware is configured to do so, you can touch one of the limit switches to get it to stop its movements.</p>

CC BY-SA 4.0
2021-01-06T13:39:27.167Z
2021-01-06T13:44:52.840Z
2021-01-06T13:44:52.840Z
user77232
<p>G-Code is processed as a queue. The FIFO behavior would disallow to execute any commands in parallel.</p>
<p>However I am aware of - yet I didn't have opportunity to try - the emergency commands <a href="https://marlinfw.org/docs/gcode/M112.html" rel="nofollow noreferrer">M112</a> or <a href="https://marlinfw.org/docs/gcode/M108.html" rel="nofollow noreferrer">M108</a> offered by Marlin. Marlin documentation says that EMERGENCY_PARSER and HOST_KEEPALIVE_FEATURE need to be enabled to handle these. So apparently there is a mechanism which may work in parallel (like the higher priority queue?).</p>
<p>These commands may be designed to break execution of some specific actions, e.g. M108 was described to break wait-for-temperature loop. You may want to give it a try.</p>
<p>M0 also requires EMERGENCY_PARSER setting. And it may be bit different than you expect: it is described as pause <strong>after</strong> the last movement. By contrast, emergency codes (M112 full stop) are designed to jump the internal command queue even when printing and execute immediately, when emergency parser is enabled (command queue would be lost, printer may shut down or user may be forced to reboot the printer).</p>

CC BY-SA 4.0
2021-01-06T19:07:18.173Z
Some commands are definetely can run in parallel. For example, I can start to heat extruder and meawhile move axes.
Dims
CC BY-SA 4.0
2021-01-06T19:16:47.800Z
@Dims That's not really running in parallel. You're just issuing a "change temperature setpoint" command and once the setpoint has been updated, the command is considered finished. Thre are also G-code commands for changing various other settings (such as the steps per mm) but these are not "running" in any sense after they've been executed.
Tom van der Zanden
CC BY-SA 4.0
2021-01-07T09:45:31.087Z
Commands like "Pause" get inserted after the completion of the last movement. However, there is the *abort print* command, that stops the execution of any G-code... but throws all commands out.
Trish
CC BY-SA 4.0
2023-03-24T11:57:08.227Z
klipper not support G80 gcode to stop runing move
CS QGB
CC BY-SA 4.0
2021-01-06T18:35:30.293Z
2021-01-07T18:12:57.243Z
2021-01-07T18:12:57.243Z
octopus8
<p>I was able to connect my terminal program (Putty) to my 3D Printer (Creality Ender 3 Pro) and was able to send G-code commands to my printer and it obeys.</p>
<p>Now suppose I sent long command like</p>
<pre><code>G29 ; auto bed leveling
</code></pre>
<p>and it is still executing. Printer writes me</p>
<pre><code>echo:busy: processing
</code></pre>
<p>How to interrupt it?</p>
<p>I tried to send <code>M0</code>, but it didn't work.</p>

<creality-ender-3><g-code>
How to interrupt long command with G-code?
Dims
# How to interrupt long command with G-code?

(Asked by: username_0 on 2021-01-06)

I was able to connect my terminal program (Putty) to my 3D Printer (Creality Ender 3 Pro) and was able to send G-code commands to my printer and it obeys.
Now suppose I sent long command like
G29 ; auto bed leveling

and it is still executing. Printer writes me
echo:busy: processing

How to interrupt it?
I tried to send M0, but it didn't work.

**Tags:** creality-ender-3, g-code

---

## 2 answers

### Answer by username_1 on 2021-01-06. Score: 2

3D Printers are pretty basic when it comes to g-code. There is no cycle start or cycle pause function on them. There is also no g-code command to interrupt the previous command. To get it to a halt you could turn it off. Or if the printer's firmware is configured to do so, you can touch one of the limit switches to get it to stop its movements.


---

### Answer by username_2 on 2021-01-06. Score: 2

G-Code is processed as a queue. The FIFO behavior would disallow to execute any commands in parallel.

However I am aware of - yet I didn't have opportunity to try - the emergency commands [M112](https://marlinfw.org/docs/gcode/M112.html) or [M108](https://marlinfw.org/docs/gcode/M108.html) offered by Marlin. Marlin documentation says that EMERGENCY\_PARSER and HOST\_KEEPALIVE\_FEATURE need to be enabled to handle these. So apparently there is a mechanism which may work in parallel (like the higher priority queue?).

These commands may be designed to break execution of some specific actions, e.g. M108 was described to break wait-for-temperature loop. You may want to give it a try.

M0 also requires EMERGENCY\_PARSER setting. And it may be bit different than you expect: it is described as pause **after** the last movement. By contrast, emergency codes (M112 full stop) are designed to jump the internal command queue even when printing and execute immediately, when emergency parser is enabled (command queue would be lost, printer may shut down or user may be forced to reboot the printer).

> **Comments:**
> **username_0**: Some commands are definetely can run in parallel. For example, I can start to heat extruder and meawhile move axes.  
> **username_3**: @Dims That's not really running in parallel. You're just issuing a "change temperature setpoint" command and once the setpoint has been updated, the command is considered finished. Thre are also G-code commands for changing various other settings (such as the steps per mm) but these are not "running" in any sense after they've been executed.  
> **username_4**: Commands like "Pause" get inserted after the completion of the last movement. However, there is the *abort print* command, that stops the execution of any G-code... but throws all commands out.  
> **username_5**: klipper not support G80 gcode to stop runing move  

---

