Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save stelgenhof/db42f313453f1e618957d40b19f7bbc4 to your computer and use it in GitHub Desktop.
Save stelgenhof/db42f313453f1e618957d40b19f7bbc4 to your computer and use it in GitHub Desktop.
Ender3 - Slic3rPE CustomStartEndGcode
Creality Ender 3 Custom Start End Gcode v1 - Slic3r Prusa Edition
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
3D Printer: Creality Ender 3
Slicer: Slic3r Prusa Edition (Tested with version 1.41.0-beta)
Created by: Sacha Telgenhof <me at sachatelgenhof dot com>
Date: 2018/08/21
Introduction
------------
Below you can find custom start and end G-code procedures to be used for setting up your Ender-3 in Slic3r Prusa Edition.
The procedures are a combination of some personal preferences and various other sources / tips on the Internet. Each line has a description, so it is easy to understand what the G-code is doing and for what reason. Of course please feel free to adjust to your own liking.
Run through
-----------
The custom Start G-Code procedure starts with pre-heating the nozzle and heat bed based on your print/filament configuration in Slic3r Prusa Edition. Then it will home all axes and purge the extruder of any oozing filament by drawing a line on the left hand side of the heat bed. And then your print will start!
The custom End G-code first will reset the speed and extrude factor override percentage so you don't have any surprises with your next print. It will then retract the filament a bit to prevent oozing for your next print. Lastly it will move the heat bed to the front so you can easily remove your part(s) and turn off everything (extruder, heat bed and fans).
The Scripts
-----------
Copy/replace the following text in the 'Start G-Code' field of your Ender 3 printer settings (Printer Settings Tab > Custom G-Code)
; Ender 3 Custom Start G-code
M104 S[first_layer_temperature] ; Set Extruder temperature
M140 S[first_layer_bed_temperature] ; Set Heat Bed temperature
M190 S[first_layer_bed_temperature] ; Wait for Heat Bed temperature
M109 S[first_layer_temperature] ; Wait for Extruder temperature
G28 ; Home all axes
G92 E0 ; Reset Extruder
G1 Z5.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z5.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
Copy/replace the following text in the 'End G-Code' field of your Ender 3 printer settings (Printer Settings Tab > Custom G-Code)
; Ender 3 Custom End G-code
G4 ; Wait
M220 S100 ; Reset Speed factor override percentage to default (100%)
M221 S100 ; Reset Extrude factor override percentage to default (100%)
G91 ; Set coordinates to relative
G1 F1800 E-3 ; Retract filament 3 mm to prevent oozing
G1 F3000 Z10 ; Move Z Axis up 10 mm to allow filament ooze freely
G90 ; Set coordinates to absolute
G1 X0 Y220 F1000 ; Move Heat Bed to the front for easy print removal
M104 S0 ; Turn off Extruder temperature
M140 S0 ; Turn off Heat Bed
M106 S0 ; Turn off Cooling Fan
M107 ; Turn off Fan
M84 ; Disable stepper motors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment