Skip to content

Instantly share code, notes, and snippets.

@theely
Last active September 7, 2021 05:43
Show Gist options
  • Save theely/bd450a4d286ae0fe9a22f45962dd7d6d to your computer and use it in GitHub Desktop.
Save theely/bd450a4d286ae0fe9a22f45962dd7d6d to your computer and use it in GitHub Desktop.
Ender-3 Start & End G-codes
G91 ; Relative positioning
G1 E-5 F3000 ; Retract a bit
G1 E-10 X5 Y5 Z5 F3000 ; Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positionning
G1 X0 Y{machine_depth} ;Present print
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed
M84 X Y E ;Disable all steppers but Z
; Level-bed
; Re-home (adjust for thermal expansion)
; Prepare nozzle
; Start Pre-heating to avoid Cura heating sequentially bed & extrudeer
M117 Pre-heating.
M140 S{material_bed_temperature}
M104 S{material_print_temperature} T0
G92 E0 ; Reset Extruder
; Wait till temparature reached
M190 S{material_bed_temperature}
M109 S{material_print_temperature} T0
; Bed Leveling and re-homing
M117 Bed Leveling.
G28 ; Home all axes
G29 ; Auto bed-level (BL-Touch)
G1 X0 Y0 Z10 F5000 ; Move Z Axis up little to prevent scratching of Heat Bed
; Nozzle Wipe and Retraction
M117 Nozzle Wipe.
G1 X0 Y5 Z1.6 F5000.0 ;Go to front
G92 E0 ;Reset extruder
G1 E15 F60 ;Extrude 15mm
G92 E0 ;Zero the extruded length
G1 X0 Y0 Z4.0 F600 E-10 ;Quickly wipe away and retract
; Start Pre-print sequence
M117 Prime nozzle.
G92 E0 ; Reset Extruder
G1 Z15.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X20 Y4 Z10.0 F5000 ; Move to start position
G1 E10 Z0.3 F500 ; Pre-extrude a bit
G92 E0 ; Reset extruder
G1 X100 Y4 Z0.3 F1500.0 E15 ; Draw the first line
G1 X100 Y4.4 Z0.3 F5000.0 ; Move to side a little
G1 X20 Y4.4 Z0.3 F1500.0 E30 ; Draw the second line
G1 X10 Y10 Z5 F5000 E29.8 ; Quickly move away
G1 Z0.4 F5000 ; Lower Nozzle
G92 E0 ; Reset Extruder
M117 Printing!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment