Skip to content

Instantly share code, notes, and snippets.

@aplocher
Created September 2, 2018 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aplocher/f90885933cef0ca08c415aa0c96991ba to your computer and use it in GitHub Desktop.
Save aplocher/f90885933cef0ca08c415aa0c96991ba to your computer and use it in GitHub Desktop.
Simplify 3D G-Code starting script to reduce temp (to reduce oozing), perform homing, auto-leveling, return the temp to the target, and then clean nozzle. Stop script will turn off extruder, bed, move Z up a little bit, move X slightly (so if oozing occurs, hopefully not on the final printed piece), and move Y forward, then turn the fan off afte…
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G91 ; relative movement
G1 F150 ; slow Z rate
G1 Z10 ; Z up 15mm
G1 X3 ; X 3mm
G1 Y3 ; Y 3mm
G90 ; back to absolute movement
G1 Y200 F1000
M84 ; disable motors
G4 S20 ;
G4 S20 ;
G4 S20 ; wait 60 secs
M107 ; fan off
M104 S170 ; set temp to 170
M109 S170 ; set temp to 170 and wait for it
G91 ; relative movement
G1 Z25 ; Z up 25mm
G90 ; back to relative movement
G28 ; home all axes
G29 ; auto-bed-level
G91 ; relative movement
G1 Z35 ; Z up 35mm
G90 ; back to absolute movement
M104 S[extruder0_temperature] ; set config'ed temp
M109 S[extruder0_temperature] ; set config'ed temp and wait for it
G4 S3 ; wait 3 secs
G91 ; relative movement
G1 Z-30 ; Z down 30mm - if this isnt done prior to nozzle clean then nozzle clean will return the position to +35mm height which is pointless
G90 ; back to absolute movement
G12 P1 S3 T2 ; clean nozzle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment