Skip to content

Instantly share code, notes, and snippets.

@faparicior
Created April 28, 2020 16:03
Show Gist options
  • Star 43 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save faparicior/98f7a28c80ac7b6b20ffa771af103c56 to your computer and use it in GitHub Desktop.
Save faparicior/98f7a28c80ac7b6b20ffa771af103c56 to your computer and use it in GitHub Desktop.
Start and End G-code for Ender 3 on Cura
; 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 Z20 ; Move Z Axis up 20 mm to allow filament ooze freely
G90 ; Set coordinates to absolute
G1 X0 Y{machine_depth} F1000 ; Move Heat Bed to the front for easy print removal
M106 S0 ; Turn off cooling fan
M104 S0 ; Turn off extruder
M140 S0 ; Turn off bed
M107 ; Turn off Fan
M84 ; Disable stepper motors
M117 That's All Folks!
; End of custom end GCode
; Ender 3 Custom Start G-code
M104 S{material_print_temperature_layer_0} ; Set Extruder temperature
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
M109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature
G28 ; Home all axes
M117 Purge extruder
G92 E0 ; Reset Extruder
G1 Z2.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 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
M117 By your command!
; End of custom start GCode
@pseudobamboo
Copy link

i iknow, thats too old, but i put this code on prusa slicer for my ender 3 and the error screem show,

16128.gcode failed due to invalid custom G-code sections:
end_gcode
Parsing error at line 9: Not a variable name
G1 X0 Y{machine_depth} F1000 ; Move Heat Bed to the front for easy print removal
^
16128.gcode.tmp for error messages enclosed between
!!!!! Failed to process the custom G-code template ...
and
!!!!! End of an error report for the custom G-code template ...
for all macro processing errors.

i need a gcode when finish my print, before the heat low, i need to retrat the filament for i remove

@RadoBGMTB
Copy link

RadoBGMTB commented Nov 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment