[gcode_macro CLEAN_NOZZLE] variable_start_x: 0 variable_start_y: 115 variable_start_z: 10 variable_wipe_dist: -50 variable_wipe_qty: 10 variable_wipe_spd: 200 variable_raise_distance: 20 gcode: STATUS_CLEANING {% if "xyz" not in printer.toolhead.homed_axes %} G28 {% endif %} G90 ; absolute positioning ## Move nozzle to start position G1 X{start_x} Y{start_y} F6000 G1 Z{start_z} F1500 ## Wipe nozzle {% for wipes in range(1, (wipe_qty + 1)) %} G1 Y{start_y + wipe_dist} F{wipe_spd * 60} G1 Y{start_y} F{wipe_spd * 60} {% endfor %} ## Raise nozzle G1 Z{raise_distance}