Pause at layer height (Simplify3D)

Note: This page has been replaced with this page: Pause At Layer Height.  Please update any links and bookmarks accordingly.

 

Pause at layer X code

(Thanks to Virág Adorján in the Wanhao Duplicator i3 Facebook group for this tip!)

In Simplify3D, you can use a script that will pause the print job and move the print head to coordinates of your choosing.  This is useful or changing the filament color, or adding parts to be captured in the print.

In the process settings, go to the Scripts tab.  At the bottom is a box labeled “Additional terminal commands for post processing.”  In this box, add a script such as the following example:

{REPLACE "\n; layer 19, Z = " "; layer 19\nG28 Y0 X0\nM300\nM25\nG92 E0\nG28 Y0 X0\n; layer 19 "}

Replace “layer 19” with your desired layer number.   This script uses regular expressions.  A tutorial on regular expressions is outside the scope of this article, but it is important to know that \n will begin a new line in the gcode file.  You can also change the X and Y coordinates with where you would like the print head to be parked for the pause operation.  In this example, I have homed both the X and Y axis.

After the gcode is saved you may look for something like the following depending on how you modified the script.  I have added comments to explain each line, but they will not appear in the gcode file unless you modify the script above to include them:

; layer 19
G28 Y0 X0     ; home the X and Y axis
M300                ; ring the buzzer
M25                   ; pause the print so you can change the filament
G92 E0             ; reset the extruder origin
G28 Y0 X0     ; home the X and Y axis
; layer 19

To continue printing you have to select on the printer from the menu -> sd card -> continue printing, or press the Resume Print button in OctoPrint.

Make sure the script is only 1 line.  If you save the profile and reload it, S3D may replace the comma after the layer number with a line break.  This will cause the script to fail, so check this each time you need to use it.

S3D-Pause

Tips

  • Before resuming the print, you can use the control box to home the X and Y axes (do not “home all” or home the Z axis!) to realign the X and Y axes if you fear you moved the print head or the bed (or moved it intentionally).  When you resume the print, the nozzle will return to the pause coordinates and then resume the print.  I have this homing procedure to the script example above so that it happens automatically when resuming.
  • If you adjust the Z height using the control panel, you may need to return it to the precise location before resuming.  You may want to experiment with this.  My finding was that it will not automatically return to the paused Z height when printing from the SD card, but will return to the paused Z height when printing from OctoPrint.
  • You CAN use the extruder (either with the Extruder Position menu option, or extruding/retracting with host control software such as OctoPrint) when changing filament (a previous version of this document said otherwise).  But if you do, reset the extruder origin using the control panel, or make sure the “G92 E0” command is included in the script after the M25 pause command.  If you do not reset the extruder origin, it will return the extruder to the position it was at when paused which will likely retract and eject the filament you just loaded.
  • If you are using OctoPrint, the “Multi Colors” plugin makes this much easier. http://plugins.octoprint.org/plugins/multi_colors/