G-Code Pause Command: A Game-Changer For 3D Printing

A G-code pause, G04 command, or dwell command is a command to pause your 3D printer for a certain amount of time, normally measured in seconds or milliseconds. 

This command is available on any 3D printer and can be added directly via the G-code or the slicer commands, depending on the model and slicer you’re running. 

Inserting that G-code pause is often as simple as inserting a G04 command, a G1 command, or an M1 command depending on the software and what you want from the pause.

For example, if you’d like to pause the print to harden layers or to allow a layer to UV cure, using a G04 is ideal. On the other hand, if you want to pause the print while you’re at work and resume later, an M1 or M600 will be more appropriate. 

What Is G-Code Pause?

A G-code pause is exactly what it sounds like: a line in the G-code that initiates a print pause. 

The standard G04 command pauses the printer for X milliseconds or X seconds, after which, the print is resumed as before. If you’re adjusting G-code in Marlin or Marlin derivatives, you also have several other options. 

This pause can be adjusted in Cura as well. However, the specific options you have to do change per slicer you’re using – although basic G-code commands will work with everything. 

  • G04 Command – the G04 command or dwell command tells the 3D printer to stop what it is doing and stop for X amount of time. In this case, the command is “Pause for X time then resume”. 
  • M0-M1 – The M0/M1 command or “Unconditional Stop” forces the machine to stop and wait for X time. This command is primarily used on Cura. In addition, if your machine doesn’t support M0/M1, it will support G04. Therefore, they can be considered equivalent, although M0 has the option to display text as well. 
  • M600 – The M600/filament change is an advanced pause feature that a) pauses the print; b) moves the nozzle away from the print; and c) ejects the filament. This enables you to very easily swap filament. In addition, unlike the other commands, it allows you to set a time, schedule a specific position for filament change, and resume temperature after you confirm a restart. It’s also the only pause without a built-in timer. 

Each of these three G-code pause options can be used at a different time, so it’s normally very easy to choose between them.

See also  Marlin G-Code: The Ultimate Guide (2023)

For instance, if you don’t have Marlin software, use the G04 command. If you want to change filament, the M600 is superior to the M0. 

In addition, if you want to pause your printer after a certain amount of elapsed time, you’ll have to do so from the control box or from the LCD panel.

Starting out with 3D printing and want to AVOID rookie MISTAKES? New: Filament Printing 101 Course
Starting out with 3D printing and want to AVOID rookie MISTAKES?
  • Our new Filament Printing 101 Course is just for you! Lean how to create perfect professional prints without all the hassle.
  • Don't let common mistakes hold you back, click the link to learn more and get ahead now!

For example, if you want to pause overnight at a certain time, you’ll have to use the control box and not a Gcode command. 

How To Implement G-Code Pause

Implementing a G-code pause is a very simple matter of: 

  1. Open your slicer. 
  2. Modify G-code/Add Script.
  3. Scroll to the layer height you want to pause at.
  4. Insert the G-code pause.
  5. Save and run.

G04 and M0 commands are virtually identical and can be treated the same depending on whether you have a Marlin-based slicer or not. 

In this case, both use the same commands, but with some slight changes. 

  • P# = pause in milliseconds 
  • S# = pause in seconds 

So, G04 S60 = 1 minute pause, and M0 S120 = 2 minute pause.

In the case that you use both P and S commands, P will normally be ignored in favor of S. 

G04 also doesn’t have a built-in messaging function at the end. However, you can achieve a message at the end with an M117 message. 

So, with G04, you could set up something like this: 

Layer Height: 44
G04 P600; dwell
M117 [Resuming in 0.6 seconds]

On the other hand, with M0, you could simply go: 

Layer Height: 44 

M0 S600; dwell

[resuming in 10 minutes] 

Marlin-based printers also allow you to override the pause if you have EMERGENCY_PARSER enabled. 

  • M112 – An emergency stop. You need EMERGENCY PARSER enabled to execute it instantly. This shuts the machine down and turns off all steppers and heaters. If you don’t have EMERGENCY PARSER enabled, your machine will wait for all other commands in the queue to finish first. 
  • M1108 – If you have EMERGENCY_PARSER enabled, you can override the pause to resume printing. As above, without the EMERGENCY_PARSER, your printer will run through the command queue first. 
See also  How To Edit G-Code In Cura: 3 Modification Steps For Beginners

In each case, it’s important to know which layer you want to pause at, because the pause will happen after executing that layer. 

When To Use G04 Command

The G04 command can be extremely useful for a number of reasons. 

Filament Swaps

If you want to pause your printer to swap filament, the G04 command can enable that. However, if you have Marlin-based firmware, you’re probably better off using the M600 command, although you’ll have to enable advanced pauses first.

For a filament swap, it’s important to get an idea of how long swapping filament takes you. Then, you can program in a stop at the layer you expect to swap filament. For example: 

  • If the reel is almost empty
  • If you want to change color
  • If you want to use a different filament for the supports and the print 

In each case, the only thing you need is to know when to make the switch and how much time you need to swap the filament.  

Extra Curing Time 

If you want to give some layers extra time to cure or harden, you can put in a pause of a few extra milliseconds in between each layer. 

In this case, you’ll simply add the G04 code between every layer you want to cure further, for example, if you have a very thin or brittle part of the print. 

Pausing While You’re Away 

In some cases, you can use the G04 command to pause a print while you’re away. However, because you’re programming in seconds or milliseconds, your options will be somewhat limited. 

If you’re going to be away for several hours or for most of the day, you’re normally better off simply using the pause command from the control box. 

Redo Layers 

Many people use the pause command to stop the printer to check and redo layers. However, this may or may not be possible depending on your printer. 

Similarly, many people use the pause command to add inserts, such as screw-in or tunnel inserts, for added strength. Depending on the filament or material, you might also be able to add metal supports or other structural supports to strengthen the model. 

Pausing for a certain amount of time with a G04 command allows you to do so without disrupting the print, so long as you do not move the print when adding the insert. 

See also  Marlin Auto Bed Leveling Not Working? (Issue Resolved)

Check Print Completed 

If you’re printing something and you’re not sure if the print is working out, are testing the design, or are trying to work out an issue with the printer, pausing after every few layers can allow you to check to see how the print is going. 

That gives you the option to stop the print sooner if you’re having issues – so you waste less time and less filament on something that’s already failing. 

Other Options 

Slicer software like Cura3D offers out-of-the-box plugins to allow you to perform different types of stops. 

For example, Cura3D enables you to add a stop to change the filament, pause at height, pause at layer, and add an insert (pause and retract) – all with no G-code required. 

Cura also directly offers features like “pause at height” which can be significantly useful and easier to use than modifying the G-code. Therefore, it may be a good idea to check which script inserts your Slicer natively supports before going through the host or the G-code editor. 

If you can make adjustments through a simple menu script insert, that’s usually the faster option and leaves less room for human error. 

Final Thoughts

Pausing your 3D printer can simplify your life when printing. In addition, the G04 command is extremely easy to add – so long as you know what layer height you need it at. 

Once you do, pausing your printer is useful for additional curing or hardening, changing filament, checking the print, and for checking the machine. 

Depending on the firmware and slicer, you may also be able to use a range of other commands, such as the display text, the change filament, or a stop with a separate start command. In each case, possibilities almost entirely depend on what your printer supports. 

Finally, most slicers offer a significant number of options for pausing your print. Check your manual and the control box, and go through the menu to see what you can do without touching the G-code.

Recent Posts