Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [gcode_macro WIPE_NOZZLE]
- variable_default_homing: 1 # 1 is yes, home away
- variable_default_temp: 175
- gcode:
- {% if 'gcode_macro PRINT_START' in printer and 'pre_home_on_wipe' in printer['gcode_macro PRINT_START']%} # needed for wipe_nozzle macro in klipper since start_print macro isn't called yet
- {% set PRE_HOME_STATE = printer['gcode_macro PRINT_START'].pre_home_on_wipe %}
- {% else %}
- {% set PRE_HOME_STATE = default_homing %}
- {% endif %}
- {% if printer.extruder.temperature|int < default_temp %}
- RESPOND TYPE=echo MSG="Heating nozzle to {default_temp}C..."
- M104 S{default_temp} # non blocking heat up nozzle to luke warm, good for cleaning
- {% endif %}
- {% if PRE_HOME_STATE == 1 %}
- G28 # home all axes
- G90 # absolute positioning
- {% endif %}
- G1 X60 Y120 Z3 F9000 # move to first position before brush
- {% if printer.extruder.temperature|int < default_temp %} # if only needed for isolated wipe_nozzle macro
- M109 S{default_temp} # blocking if did not finish heating after homing
- {% endif %}
- G1 Z-1.5 F500 # lower down next to brush
- # -- START clean nozzle in X direction 3x -- #
- {% for i in range(5) %}
- G1 X18 F12000 # swipe left to clean nozzle
- G1 X60 F12000 # swipe right to clean nozzle
- {% endfor %}
- # -- END clean nozzle in X direction 3x -- #
- # -- START clean nozzle in Y direction 12x -- #
- G1 X39 Y120 F1000 # move to middle of brush in X
- {% for i in range(12) %}
- G1 Y118 F12000
- G1 Y120 F12000
- {% endfor %}
- # -- END clean nozzle in Y direction 12x -- #
- G1 X60 Y120 Z3 F500 # park nozzle safely where nozzle clean started
- [gcode_macro PRINT_START]
- # Use PRINT_START for the slicer starting script - please customize for your slicer of choice
- variable_pre_home_on_wipe: 1
- gcode:
- {% set target_bed = params.BED|float %}
- {% set target_extruder = params.EXTRUDER|float %}
- # --- start bed warmup --- #
- SET_LED LED=chamber_leds RED=1.0 GREEN=0.50 BLUE=0.0 # set color to orange to denote heating
- M140 S{target_bed} # non-blocking heat bed
- SET_FAN_SPEED FAN=nevermore_fans SPEED=1.0 # Turn on Nevermore Fan to 100%
- WIPE_NOZZLE
- # --- heat chamber by blowing part cooling fan onto top of bed --- #
- M106 S255 # Turn on the PT-fan
- G1 X60 Y60 Z10 F500 # Go to center of the bed
- M190 S{target_bed} # Set target temp for the bed
- # preheat before purge line
- M106 S0 # turn off part cooling fans, confirm this line is working
- G1 X60 Y120 Z3 F9000 ; move nozzle away from bed
- M109 S{target_extruder}
- SET_LED LED=chamber_leds RED=1.0 GREEN=1.0 BLUE=1.0 # set LED color to white for better print monitoring
- G92 E0 ; Reset the extruder to 0
- M82 ; set extruder to absolute mode
- G1 X60 Z0.2 E16 F500 ; Draw a priming line to the rear, extrude 16mm
- G92 E0 ; Zero the extruder
- SET_GCODE_VARIABLE MACRO=PRINT_START VARIABLE=pre_home_on_wipe VALUE={0}
- WIPE_NOZZLE
Advertisement
Add Comment
Please, Sign In to add comment