Jump to content

how to use "stay hot"


mbunjes

Recommended Posts

I have the following macro in my printer.cfg

#PRINT_END
#
#   Use PRINT_END for the slicer ending script - please customise for your slicer of choice
#
description: End print and tidy up (retract filament, move toolhead, turn off heaters)
gcode:
    {% set STAY_HOT = params.STAY_HOT|default(0)|int %}   # STAY_HOT=1 to keep heaters primed for more printing

    STATUS_BUSY
    M400                           ; wait for buffer to clear
    G92 E0                         ; zero the extruder
    G1 E-2.0 F3600                ; retract filament
    G91                            ; relative positioning

    #   Get Boundaries
    {% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %}
    {% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %}
    {% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}

    #   Check end position to determine safe direction to move
    {% if printer.toolhead.position.x < (max_x - 20) %}
        {% set x_safe = 20.0 %}
    {% else %}
        {% set x_safe = -20.0 %}
    {% endif %}

    {% if printer.toolhead.position.y < (max_y - 20) %}
        {% set y_safe = 20.0 %}
    {% else %}
        {% set y_safe = -20.0 %}
    {% endif %}

    {% if printer.toolhead.position.z < (max_z - 40) %}
        {% set z_safe = 40.0 %}
    {% else %}
        {% set z_safe = max_z - printer.toolhead.position.z %}
    {% endif %}

    G0 Z{z_safe} F3600             ; move nozzle up
    G0 X{x_safe} Y{y_safe} F20000  ; move nozzle to remove stringing

    M107                           ; turn off fan
    G90                            ; absolute positioning
    G0 X{max_x / 2} Y{max_y - 20} F3600 ; park nozzle near rear
    M117 Print Complete.

    {% if STAY_HOT != 1 %}
        M118 Disabling heaters
        TURN_OFF_HEATERS               
        M84                            ; disable steppers
    {% else %}
        M118 Keeping printer hot for more printing...
        SET_HEATER_TEMPERATURE HEATER=extruder TARGET=100 ; set nozzle temp for standy-by for probing
    {% endif %}

    {% if printer.configfile.config["bed_mesh"] %}
    BED_MESH_CLEAR
    {% endif %}

    {% if printer['fan_generic exhaust_fan'] %}
    STOP_TEMP_MONITOR
    SET_FAN_SPEED FAN=exhaust_fan SPEED=1.0
    FAN_DELAY FAN=exhaust_fan DELAY=300
    {% else %}
        M118 No exhaust fan configured
    {% endif %}

    {% if printer['fan_generic cooling_fan'] %}
    SET_FAN_SPEED FAN=cooling_fan SPEED=1.0
    FAN_DELAY2 FAN=cooling_fan DELAY=300
    {% else %}
        M118 No cooling fan configured
    {% endif %}

    STATUS_READY
    #UPDATE_DELAYED_GCODE ID=_CLEAR_DISPLAY DURATION=60

 

And I would like to be able to print again after a print ends. There is an option whereby if you fill in "1" in the "stay hot" macro, the printer should not cool down but it doesn't work.
I also don't know when to give this command. When the first print is finished ? Or when it starts ? Either way nothing happens and the printer cools down immediately after the print.
Can someone shine a light ?

  • Like 1
Link to comment
Share on other sites

I use this as my print-end macro. It cools to a probing temperature. When I want to turn off the printer, I use the preset pull-down cooldown. turn off fan is commented out.

 

[gcode_macro PRINT_END]
#   Use PRINT_END for the slicer ending script - please customise for your slicer of choice
gcode:
    M400                           ; wait for buffer to clear
    G92 E0                         ; zero the extruder
    G1 E-1.0 F3600                  ; retract filament
    M104 S150                      ; Set Extrude Temp to 150C
    M140 S110                        ; Set Bed Temp 110C
    G91                            ; relative positioning
    G0 Z1.00 X20.0 Y20.0 F20000    ; move nozzle to remove stringing
   # M107; turn off fan
    G1 Z5 F3000                    ; move nozzle up 5mm
    G90                            ; absolute positioning
    G0  X345 Y345 F3600            ; park nozzle at rear
    G0  Z10 F3600

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...