strayr/strayr-k-macros

Macro start_print reorder extruder pre-temp

stephbellemare opened this issue · 1 comments

Hello, i,ve re-ordered the pre-heating commands for the hotend, considering if you had pre-heated to unload / load filament, your macro would have to wait for the extruder to cool down, and then re-start heating back up. this is the way i've done it

[gcode_macro START_PRINT]
variable_version: 0.1
description: Does everythin to go from a cold printer to a successful print except a purge line.
gcode:
{% set svv = printer.save_variables.variables %}
{% set BED_TEMP = params.BED_TEMP|default(svv.setup_default_bed_temp)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(svv.setup_default_nozzle_temp)|float %}

{% if svv.setup_version|float < version|float %}
    { action_raise_error("Setup data is older than macro version
    You should check the values in INIT_SETUP and run it to update
    ")}
{% endif %}
{% if svv.setup_use_bed_offset == 1  %}
    BED_DETAILS # tell us about the bed
{else}

{% endif %}

G92 E0 ; reset extruder
G90 ; absolute
M82 ; extruder absolute
G92 E0 ; reset extruder


M107 S0; turn off fan
M117 Heating Bed to {BED_TEMP}
UPDATE_DELAYED_GCODE ID=clear_display DURATION=10
M140 S{BED_TEMP} ; start heating
M104 S{svv.setup_idle_temp} ; set extruder warmup temp
SETUP_BED TOL_CORNERS=0.2 TOL_GANTRY=0.02
M190 S{BED_TEMP} ; wait for bed temp
#PARK
#M109 S{svv.setup_idle_temp}
M117 Preheat Extruder
UPDATE_DELAYED_GCODE ID=clear_display DURATION=10
#SETUP_BED TOL_CORNERS=0.2 TOL_GANTRY=0.02
LOAD_MESH_TEMP BED_TEMP={BED_TEMP}
M104 S{EXTRUDER_TEMP}
#PARK
#Set our baseline offset for nozzle height, this is based PROBE_CALIBRATE result
SET_GCODE_OFFSET Z={svv.setup_nozzle_offset} ;+ve is UP
#And apply changes for a different bed
{% if svv.setup_use_bed_offset == 1  %}
    SET_GCODE_OFFSET Z_ADJUST={svv.bed_offset}
{% endif %}
M117 Heating Extruder to {EXTRUDER_TEMP}
UPDATE_DELAYED_GCODE ID=clear_display DURATION=10
M109 S{EXTRUDER_TEMP} ; wait for extruder temp
M117 Starting Print
UPDATE_DELAYED_GCODE ID=clear_display DURATION=10
_SOUND_YES
G28 #Try homing at end to fix gcode