<p>Are you sure the move didn't finish? That would be very unusual, not the way 3D printer firmware normally operates. A new <code>G0</code>/<code>G1</code> move command does not execute until the previous one finishes, whether it's extrude-only, travel-only, or a print move (mix of extrusion and travel).</p>
<p>What's probably happening for you is that the amount of material you're trying to extrude cannot melt and pass through the extruder at the speed you requested. At 1800 mm/min, assuming 1.75 mm diameter filament, you're requesting over 72 mm³ of material (nearly a whole cubic centimeter!) of material to be extruded per second. According to some back-of-the-envelope calculations I just did, It would take more than 300 Watts to continuously raise PLA from room temperature to extrusion temperature at that rate, which is not happening without an <strong>extreme</strong> hotend and power supply.</p>
<p>So, what you're getting is pressure building up between the extruder gear and the hotend (until it starts slipping), causing the material to continue to ooze for some time after the E-axis move finishes, until all the pressure subsides. If your goal is to prime the nozzle for printing, this is not how to do it. It will just end up oozing material all over the start of your print.</p>
<p>You can somewhat fix this by just reducing the feedrate in your command, but that's still not necessarily going to give you great results. The right way to prime is to extrude at nearly the maximum <strong>rate your hotend can handle</strong>, then <strong>retract and wipe</strong> before traveling to where the print will begin.</p>

CC BY-SA 4.0
2021-04-03T23:17:36.617Z
Excellent answer. OP should figure out their max extrusion rate for a given temperature/material. For me, with 1.75 mm PLA, my maximum extrusion rate before skipping steps is about 11.25 mm/s at 250 °C.
Rykara
CC BY-SA 4.0
2021-04-03T23:21:04.777Z
@Rykara: Even 11.25 sounds very high, like it would need a volcano or something. The 250 °C temp should help if you're not trying to sustain that rate continuously, but that's still over 40 mm³/s which is double what I see frequently cited as the max "normal" printers can handle which is still significantly more than they can handle *well*, without skipping.
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2021-04-04T08:10:21.043Z
@R..GitHubSTOPHELPINGICE Thank you! That's totally the problem I have. I found the start code online, so I was not really questioning it. But your explanation makes perfect sense, and it is exactly what is happening! Thank you.
jnovacho
CC BY-SA 4.0
2021-04-04T16:30:30.163Z
Correction to my previous comment: 11.25 mm/s is 27 mm³/s which is high but not as high as I was estimating. It may be on the very high end of what's plausible with a "normal" printer/hotend and very high temp setting like 250°C. Note: a useful rule of thumb shortcut to remember is that you can multiply by 2.4 to get from mm/s (at 1.75 mm diameter) to mm³/s.
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2021-04-03T23:05:09.827Z
2021-04-04T06:00:26.403Z
2021-04-04T06:00:26.403Z
R.. GitHub STOP HELPING ICE
<p>I have following G-code to prime the nozzle before start of the print.</p>
<pre><code>G28 ; home all axes
G0 Z5 F5000 ; lift nozzle
G0 X30; move to X30
G28 Y; home Y
M420 S1; turn on bed leveling
M109 S220; wait for hotend temperature
G1 E20 F1800; extrude filament 20mm
</code></pre>
<p>The idea is to extrude a strand of filament outside of the bed and then start the print. The strand catches on the bed a tears off. So the ooze does not mess up the first layer.</p>
<p>The problem is that the <code>G1 E20 F1800</code> does not wait for the move to finish and the controller goes to next move immediately. This means the nozzle is going to start the first layer, while spewing filament along the way.</p>
<p>Is there a way to wait for the move to finish?</p>
<p>I have tried <code>M400</code> which seems not to help. I'm using Marlin Firmware.</p>

CC BY-SA 4.0
2021-04-03T08:56:16.117Z
Try to add a small rise e.g. of Z to the last command. I use similar script printing "big dot" on the side, while going up at the same time. (And then prints the initial line with the seperate command.) This works well for me. Btw. Marlin docs says for `G0-G1`: "These commands yield control back to the command parser as soon as the move is queued, but they may delay the command parser while awaiting a slot in the queue." ...whatever it means.
octopus8
CC BY-SA 4.0
2021-04-03T11:33:00.537Z
Are you sure the move didn't finish? Attempting to extrude that much at that speed will not actually do so unless you have a really powerful hotend. Instead it'll build up the max pressure the extruder can give prior to slipping and continue to ooze for a long time after the move. This is not a workable way to prime.
R.. GitHub STOP HELPING ICE
CC BY-SA 4.0
2021-04-03T21:57:37.793Z
@R..GitHubSTOPHELPINGICE I was about to write an answer in this line, please post an answer. Note the a retraction prior to move may help, alongside slower extrusion. Please post an answer!
0scar
CC BY-SA 4.0
2021-04-03T22:50:15.390Z
OK, will do that.
R.. GitHub STOP HELPING ICE
<marlin><g-code>
G-code wait for extrude command to finish
jnovacho
# G-code wait for extrude command to finish

(Asked by: username_0 on 2021-04-03)

I have following G-code to prime the nozzle before start of the print.
G28 ; home all axes
G0 Z5 F5000 ; lift nozzle
G0 X30; move to X30
G28 Y; home Y
M420 S1; turn on bed leveling
M109 S220; wait for hotend temperature
G1 E20 F1800; extrude filament 20mm

The idea is to extrude a strand of filament outside of the bed and then start the print. The strand catches on the bed a tears off. So the ooze does not mess up the first layer.
The problem is that the G1 E20 F1800 does not wait for the move to finish and the controller goes to next move immediately. This means the nozzle is going to start the first layer, while spewing filament along the way.
Is there a way to wait for the move to finish?
I have tried M400 which seems not to help. I'm using Marlin Firmware.

**Tags:** marlin, g-code
> **Comments:**
> **username_1**: Try to add a small rise e.g. of Z to the last command. I use similar script printing "big dot" on the side, while going up at the same time. (And then prints the initial line with the seperate command.) This works well for me. Btw. Marlin docs says for `G0-G1`: "These commands yield control back to the command parser as soon as the move is queued, but they may delay the command parser while awaiting a slot in the queue." ...whatever it means.  
> **username_2**: Are you sure the move didn't finish? Attempting to extrude that much at that speed will not actually do so unless you have a really powerful hotend. Instead it'll build up the max pressure the extruder can give prior to slipping and continue to ooze for a long time after the move. This is not a workable way to prime.  
> **username_3**: @R..GitHubSTOPHELPINGICE I was about to write an answer in this line, please post an answer. Note the a retraction prior to move may help, alongside slower extrusion. Please post an answer!  
> **username_2**: OK, will do that.  

---

## 1 answers

### Answer by username_2 on 2021-04-03. Score: 5 | Accepted answer

Are you sure the move didn't finish? That would be very unusual, not the way 3D printer firmware normally operates. A new `G0`/`G1` move command does not execute until the previous one finishes, whether it's extrude-only, travel-only, or a print move (mix of extrusion and travel).

What's probably happening for you is that the amount of material you're trying to extrude cannot melt and pass through the extruder at the speed you requested. At 1800 mm/min, assuming 1.75 mm diameter filament, you're requesting over 72 mm³ of material (nearly a whole cubic centimeter!) of material to be extruded per second. According to some back-of-the-envelope calculations I just did, It would take more than 300 Watts to continuously raise PLA from room temperature to extrusion temperature at that rate, which is not happening without an **extreme** hotend and power supply.

So, what you're getting is pressure building up between the extruder gear and the hotend (until it starts slipping), causing the material to continue to ooze for some time after the E-axis move finishes, until all the pressure subsides. If your goal is to prime the nozzle for printing, this is not how to do it. It will just end up oozing material all over the start of your print.

You can somewhat fix this by just reducing the feedrate in your command, but that's still not necessarily going to give you great results. The right way to prime is to extrude at nearly the maximum **rate your hotend can handle**, then **retract and wipe** before traveling to where the print will begin.

> **Comments:**
> **username_4**: Excellent answer. OP should figure out their max extrusion rate for a given temperature/material. For me, with 1.75 mm PLA, my maximum extrusion rate before skipping steps is about 11.25 mm/s at 250 °C.  
> **username_2**: @Rykara: Even 11.25 sounds very high, like it would need a volcano or something. The 250 °C temp should help if you're not trying to sustain that rate continuously, but that's still over 40 mm³/s which is double what I see frequently cited as the max "normal" printers can handle which is still significantly more than they can handle *well*, without skipping.  
> **username_0**: @R..GitHubSTOPHELPINGICE Thank you! That's totally the problem I have. I found the start code online, so I was not really questioning it. But your explanation makes perfect sense, and it is exactly what is happening! Thank you.  
> **username_2**: Correction to my previous comment: 11.25 mm/s is 27 mm³/s which is high but not as high as I was estimating. It may be on the very high end of what's plausible with a "normal" printer/hotend and very high temp setting like 250°C. Note: a useful rule of thumb shortcut to remember is that you can multiply by 2.4 to get from mm/s (at 1.75 mm diameter) to mm³/s.  

---

