Skip to content

Instantly share code, notes, and snippets.

@terrafied
Forked from jazzsequence/end.gcode
Last active May 23, 2025 23:11
Show Gist options
  • Save terrafied/94818a5e2dff9930ef0cac0e34d6ecc9 to your computer and use it in GitHub Desktop.
Save terrafied/94818a5e2dff9930ef0cac0e34d6ecc9 to your computer and use it in GitHub Desktop.
Start and End G-code for Ender 5 on Cura
; Ender 5 Custom End G-code
G4 P1000; 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 Y220 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 Print Complete.
; End of custom end GCode
M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration
M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate
M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration
M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
G28 ;Home
M140 S50 ;Start heating bed
M190 S50 ;Wait for bed to reach temp before proceeding
G29 ;Auto bed-level (BL-Touch)
G28 ;Home
M104 S200 ;Start heating extruder
M109 S200 ;Wait for extruder to reach temp before proceeding
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position
G1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line
G1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little
G1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment