# [gcode_macro G32] # gcode: # BED_MESH_CLEAR # G28 # QUAD_GANTRY_LEVEL # G28 # G0 X175 Y175 Z30 F3600 # [gcode_macro PRINT_START] # gcode: # {% set bedtemp = params.BED|int %} # {% set extrudertemp = params.EXTRUDER|int %} # STATUS_HEATING # M109 S140 # STATUS_HEATING # M190 S{bedtemp} # STATUS_HOMING # G32 ; home all axes # G1 Z20 F3000 ; move nozzle away from bed # STATUS_HEATING # M109 S{extrudertemp} # STATUS_READY # STATUS_OFF # STATUS_BUSY # STATUS_HEATING # STATUS_LEVELING # STATUS_HOMING # STATUS_CLEANING # STATUS_MESHING # STATUS_CALIBRATING_Z [gcode_macro PRINT_START] gcode: {% set target_bed = params.BED|int %} {% set target_extruder = params.EXTRUDER|int %} {% set target_chamber = params.CHAMBER|default("45")|int %} {% set x_wait = printer.toolhead.axis_maximum.x|float / 2 %} {% set y_wait = printer.toolhead.axis_maximum.y|float / 2 %} RESPOND PREFIX="PRINT_START: " MSG="Preparing printer..." # Check if the bed temp is higher than 90c - if so then trigger a heatsoak. {% if target_bed > 90 %} CANCEL_PRINT # TODO! # SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Display info on display # STATUS_HEATING # Set LEDs to heating-mode # M106 S255 # Turn on the PT-fan # ## Uncomment if you have a Nevermore. # #SET_PIN PIN=nevermore VALUE=1 # Turn on the nevermore # G1 X{x_wait} Y{y_wait} Z15 F9000 # Go to center of the bed # M190 S{target_bed} # Set the target temp for the bed # SET_DISPLAY_TEXT MSG="Heatsoak: {target_chamber}c" # Display info on display # TEMPERATURE_WAIT SENSOR="temperature_sensor chamber" MINIMUM={target_chamber} # Waits for chamber temp # If the bed temp is not over 90c, then skip the heatsoak and just heat up to set temp with a 5 min soak {% else %} RESPOND PREFIX="PRINT_START: " MSG="Heating bed to: {target_bed}c" LED_STATUS_HEATING # Set LEDs to heating-mode G1 X{x_wait} Y{y_wait} Z15 F9000 # Go to center of the bed M190 S{target_bed} # Set the target temp for the bed # SET_DISPLAY_TEXT MSG="Soak for 5 min" # Display info on display # G4 P300000 # Wait 5 min for the bedtemp to stabilize {% endif %} # # All the calibration bits: Homing & QGL & Meshing # RESPOND PREFIX="PRINT_START: " MSG="Heating hotend (for calibration) to: 140c" LED_STATUS_HEATING # Set LEDs to heating-mode M109 S140 # Heat hotend to 140c # Home the printer, set absolute positioning and update the Stealthburner LEDs. BED_MESH_CLEAR # Clear old saved bed mesh (if any) RESPOND PREFIX="PRINT_START: " MSG="Homing all axes" LED_STATUS_HOMING # Set LEDs to homing-mode G28 # Full home (XYZ) G90 # Absolute position RESPOND PREFIX="PRINT_START: " MSG="Performing QGL" LED_STATUS_LEVELING # Set LEDs to leveling-mode QUAD_GANTRY_LEVEL # Level the printer via QGL G28 Z # Home Z again after QGL #RESPOND PREFIX="PRINT_START: " MSG="Creating bed mesh" # Display info on display #LED_STATUS_MESHING # Set LEDs to bed mesh-mode #BED_MESH_CALIBRATE # Start the bed mesh (add ADAPTIVE=1) for adaptive bed mesh G1 X{x_wait} Y{y_wait} Z20 F9000 # Go to center of the bed # Heat to target temp RESPOND PREFIX="PRINT_START: " MSG="Heating hotend (for first layer) to: {target_extruder}c" LED_STATUS_HEATING # Set LEDs to heating-mode M107 # Turn off partcooling fan M109 S{target_extruder} # Heat the hotend to set temp # Get ready to print by doing a primeline and updating the LEDs # SET_DISPLAY_TEXT MSG="Printer goes brr" # Display info on display # STATUS_PRINTING # Set LEDs to printing-mode # G0 X{x_wait - 50} Y4 F10000 # Go to starting point # G0 Z0.4 # Raise Z to 0.4 # G91 # Incremental positioning # G1 X100 E20 F1000 # Primeline # G90 # Absolute position RESPOND PREFIX="PRINT_START: " MSG="Starting the print..." LED_STATUS_PRINTING