<p>I decided to go ahead and try anyways, to moderate success.</p>
<p>The main takeaways:</p>
<ul>
<li><code>M0</code> does definitely work as advertised.</li>
<li>During the pause, plastic had been leaking from the nozzle and down on the print, and during the filament change even more leaked out. Next time I'm doing this, I'm adding significantly more height to the line <code>G1 F300 Z15</code> (right above <code>M0</code>) and perhaps will consider a different parking spot (the line <code>G1 F9000 X190 Y190</code> right above that again) to prevent this from affecting the print</li>
<li>As I extracted the blue filament that I started the print with, I saw that a couple of milimeters at the end had gotten singed and miscolored. Not much of an issue, though, I'll just snap it off next time I load it.</li>
<li>Even though I did get plastic of the right color coming through the nozzle during the change procedure, as the printer resumed printing, it didn't actually print anything (presumably it retracted a little bit). I had to push the filament through the tube manually to get it to print correctly, but a little bit of the new layer was missing. Luckily, the next layer printed fine even without the layer below supporting it.</li>
<li>When entering which layer to pause on into the wizard, it seems one should believe the layer numbers in the slice preview of Cura and the part of the pop-up that tells you to enter the layer that will complete before the pause. Everything else around this confused me into suspecting an off-by-one error somewhere, but those were just red herrings.</li>
</ul>
<p>In the rightmost corner you can see a little bit of the damage from the leaking while swapping filament, but most of it is hidden below the black (and you can also see that it didn't stick to the build plate, but that's entirely unrelated to this issue).</p>
<p><a href="https://i.sstatic.net/LnZUd.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LnZUd.jpg" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2024-01-04T20:42:30.217Z
2024-01-04T20:42:30.217Z
Arthur
<p>I want to make a print where I swap color halfway through. I have tried doing something similar with a 2+ Connect before, and what the internet told me then was to go into Ultimaker Cura and modify the G-code to add a filament change. And the printer blew right past that layer and printed the whole thing in one go. (How Cura would allow me, completely without warning, to insert G-code unsupported by the chosen printer, especially since the chosen printer is of their own make and entirely under their control, is beyond me, and also a different question.)</p>
<p>So naturally, now that I'm working with an Ultimaker 2+ (Extended, with original firmware up-to-date according to Cura), I am inclined to distrust Cura with these things. I have tried to look into modifying the G-code manually to add a pause, and then by hand interrupt the print to change filament. The two main options I have found are the commands <code>M0</code> and <code>G04</code>. But none of the sources I have found have mentioned printer support. I haven't been able to find anything online that tells me whether <code>M0</code> or <code>G04</code> are actually supported by the firmware.</p>
<p>The G-code that Cura makes, with the settings I chose, uses <code>M0</code>, as shown below:</p>
<pre><code>G0 F9000 X19.305 Y19.27
G0 X19.27 Y19.27
;TIME_ELAPSED:25576.615046
;TYPE:CUSTOM
;added code by post processing
;script: PauseAtHeight.py
;current layer: 22
M83 ; switch to relative E values for any needed retraction
G1 F300 Z4.57 ; move up a millimeter to get out of the way
G1 F9000 X190 Y190
G1 F300 Z15 ; too close to bed--move to at least 15mm
M0 ; Do the actual pause
G1 F300 Z3.57
G1 F9000 X19.27 Y19.27
G1 F300 Z3.57 ; move back down to resume height
G1 F1800 ; restore extrusion feedrate
M82 ; switch back to absolute E values
G92 E3066.65549
;LAYER:22
;TYPE:FILL
;MESH:brett.stl
G11
G1 F3600 X34.487 Y34.487 E3067.94669
</code></pre>
<p>Would this even work? And if it turns out that it doesn't, is it as easy to fix as swapping out that <code>M0</code> command with a <code>G04</code> (possibly with a specified time argument)? Finally, I want this change to happen between what Cura, in the slice preview, calls layers 23 and 24, where it seemingly gives the first layer the name 1. The G-code insertion wizard asks me to insert the last layer I would like finished before the pause and specifies that 0 is the first layer printed. So I enter 22 in there. But in the above G-code, it seems to have inserted the pause <strong>before</strong> it begins to print its layer 22 (which in the Cura preview would be layer 23?) I need some help untangling this.</p>

<ultimaker-cura><g-code><ultimaker-2>
Does Cura's M0 pause work to pause an Ultimaker 2+ (Extended) print?
Arthur
# Does Cura's M0 pause work to pause an Ultimaker 2+ (Extended) print?

(Asked by: username_0 on 2024-01-02)

I want to make a print where I swap color halfway through. I have tried doing something similar with a 2+ Connect before, and what the internet told me then was to go into Ultimaker Cura and modify the G-code to add a filament change. And the printer blew right past that layer and printed the whole thing in one go. (How Cura would allow me, completely without warning, to insert G-code unsupported by the chosen printer, especially since the chosen printer is of their own make and entirely under their control, is beyond me, and also a different question.)
So naturally, now that I'm working with an Ultimaker 2+ (Extended, with original firmware up-to-date according to Cura), I am inclined to distrust Cura with these things. I have tried to look into modifying the G-code manually to add a pause, and then by hand interrupt the print to change filament. The two main options I have found are the commands M0 and G04. But none of the sources I have found have mentioned printer support. I haven't been able to find anything online that tells me whether M0 or G04 are actually supported by the firmware.
The G-code that Cura makes, with the settings I chose, uses M0, as shown below:
G0 F9000 X19.305 Y19.27
G0 X19.27 Y19.27
;TIME_ELAPSED:25576.615046
;TYPE:CUSTOM
;added code by post processing
;script: PauseAtHeight.py
;current layer: 22
M83 ; switch to relative E values for any needed retraction
G1 F300 Z4.57 ; move up a millimeter to get out of the way
G1 F9000 X190 Y190
G1 F300 Z15 ; too close to bed--move to at least 15mm
M0 ; Do the actual pause
G1 F300 Z3.57
G1 F9000 X19.27 Y19.27
G1 F300 Z3.57 ; move back down to resume height
G1 F1800 ; restore extrusion feedrate
M82 ; switch back to absolute E values
G92 E3066.65549
;LAYER:22
;TYPE:FILL
;MESH:brett.stl
G11
G1 F3600 X34.487 Y34.487 E3067.94669

Would this even work? And if it turns out that it doesn't, is it as easy to fix as swapping out that M0 command with a G04 (possibly with a specified time argument)? Finally, I want this change to happen between what Cura, in the slice preview, calls layers 23 and 24, where it seemingly gives the first layer the name 1. The G-code insertion wizard asks me to insert the last layer I would like finished before the pause and specifies that 0 is the first layer printed. So I enter 22 in there. But in the above G-code, it seems to have inserted the pause before it begins to print its layer 22 (which in the Cura preview would be layer 23?) I need some help untangling this.

**Tags:** ultimaker-cura, g-code, ultimaker-2

---

## 1 answers

### Answer by username_0 on 2024-01-04. Score: 2 | Accepted answer

I decided to go ahead and try anyways, to moderate success.

The main takeaways:

* `M0` does definitely work as advertised.
* During the pause, plastic had been leaking from the nozzle and down on the print, and during the filament change even more leaked out. Next time I'm doing this, I'm adding significantly more height to the line `G1 F300 Z15` (right above `M0`) and perhaps will consider a different parking spot (the line `G1 F9000 X190 Y190` right above that again) to prevent this from affecting the print
* As I extracted the blue filament that I started the print with, I saw that a couple of milimeters at the end had gotten singed and miscolored. Not much of an issue, though, I'll just snap it off next time I load it.
* Even though I did get plastic of the right color coming through the nozzle during the change procedure, as the printer resumed printing, it didn't actually print anything (presumably it retracted a little bit). I had to push the filament through the tube manually to get it to print correctly, but a little bit of the new layer was missing. Luckily, the next layer printed fine even without the layer below supporting it.
* When entering which layer to pause on into the wizard, it seems one should believe the layer numbers in the slice preview of Cura and the part of the pop-up that tells you to enter the layer that will complete before the pause. Everything else around this confused me into suspecting an off-by-one error somewhere, but those were just red herrings.

In the rightmost corner you can see a little bit of the damage from the leaking while swapping filament, but most of it is hidden below the black (and you can also see that it didn't stick to the build plate, but that's entirely unrelated to this issue).

[![enter image description here](https://i.sstatic.net/LnZUd.jpg)](https://i.sstatic.net/LnZUd.jpg)


---

