Skip to content

Instantly share code, notes, and snippets.

@williamwebb
Last active October 20, 2022 12:41
Show Gist options
  • Save williamwebb/946421534482057df36acb2290750236 to your computer and use it in GitHub Desktop.
Save williamwebb/946421534482057df36acb2290750236 to your computer and use it in GitHub Desktop.
Start/End G-code to support BLTouch probing
;
; end_gcode
G92 E0 ; zero the extruded length
G1 E-5 F9000 ; retract
M104 S0 ; turn off temperature
M140 S0 ; turn off bed
G91 ; relative positioning
G1 E-1 F300 ; retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+20 E-5 X-20 Y-20 F7200 ; move Z up a bit and retract filament even more
G1 X320 Y150 F10000 ; move right mid
M107 ; turn off layer fan
M84 ; disable motors
G90 ; absolute positioning
;
;EOF
; start_gcode
M117 retacting...;
G92 E0 ; set extruder to 0
G1 E-25 ; retract 25mm
G92 E0 ; set extruder to 0
M117 start heating... ;
M140 S{material_bed_temperature} ; target bed temp
M104 S200 ; heat to below the (petg) transition temp
M117 leveling...;
M107 ; Turn layer fan off
G21 ; Set to metric [change to G20 if you want Imperial]
G90 ; Force coordinates to be absolute relative to the origin
G28 ; Home X/Y/Z axis
G29 ; Auto Bed Leveling
M117 waiting to reach temp...;
M109 S{material_print_temperature} ; wait for nozzel to reach temp
M109 R{material_print_temperature} ; set nozzel standbye temp
M117 cleaning nozzle...;
G1 X3 Y1 Z15 F9000 ; Move safe Z height to shear strings
G0 X1 Y20 Z0.2 F9000 ; Move in 1mm from edge and up [z] 0.2mm
G92 E0 ; Set extruder to [0] zero
G1 X100 E37 F500 ; Advance filiment 25mm, extrude 12mm filiment along X axis 100mm long to prime and clean the nozzle
G92 E0 ; Reset extruder to [0] zero end of cleaning run
G1 E-1 F500 ; Retract filiment by 1 mm to reduce string effect
G1 X180 F4000 ; quick wipe away from the filament line / purge
M117 End Clean ; Indicate nozzle clean in progress on LCD
M117 Printing...
@sabarjp
Copy link

sabarjp commented Nov 14, 2019

Thank you sir, looks good.

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