jschuh / klipper-macros

A collection of useful macros for the Klipper 3D printer firmware
GNU General Public License v3.0
921 stars 167 forks source link

[BUG] Resume macro #193

Closed appleimperio closed 10 months ago

appleimperio commented 10 months ago

I think it's the same problem with the M600 mentioned in other post. The Resume macro is going first to the last printing position then Unretract leaving a blob on the printed part.

Klipper config Paste any relevant sections from your Klipper config, or attach the full config if you prefer. Please also note any other macros you are including as part of your config. Bug reports without attached configs will most likely be closed.

## Happy Hare supporting macros

[save_variables]
filename: /home/pi/printer_data/config/mmu/mmu_vars.cfg

########################################################################
# Tool change macros
# This is automatically created on installation but you can increase
# or reduce this list to match your number of tools in operation
#######################################################################
[gcode_macro T0]
gcode: MMU_CHANGE_TOOL TOOL=0
[gcode_macro T1]
gcode: MMU_CHANGE_TOOL TOOL=1
[gcode_macro T2]
gcode: MMU_CHANGE_TOOL TOOL=2
[gcode_macro T3]
gcode: MMU_CHANGE_TOOL TOOL=3
[gcode_macro T4]
gcode: MMU_CHANGE_TOOL TOOL=4
[gcode_macro T5]
gcode: MMU_CHANGE_TOOL TOOL=5

########################################################################
# Simplified subset of commands just for visability in Mainsail/Fluidd UI
# until custom panel is complete!
# The __ is a trick because it is not displayed by the UI but the fact
# the macros are defined here means they are still seen by Mainsail/Fluidd
########################################################################
[gcode_macro MMU__EJECT]
gcode: MMU_EJECT

[gcode_macro MMU__HOME]
gcode:
    {% set TOOL = params.TOOL|default(0)|int %}
    {% set FORCE_UNLOAD = params.FORCE_UNLOAD|default(0)|int %}
    MMU_HOME TOOL={TOOL} FORCE_UNLOAD={FORCE_UNLOAD}

[gcode_macro MMU__STATUS]
gcode: MMU_STATUS

[gcode_macro MMU__MOTORS_OFF]
gcode: MMU_MOTORS_OFF

[gcode_macro MMU__SERVO]
gcode:
    {% set POS = params.POS|default("up")|string %}
    MMU_SERVO POS={POS}

[gcode_macro MMU__SELECT_TOOL]
gcode:
    {% set TOOL = params.TOOL|default(0)|int %}
    MMU_SELECT TOOL={TOOL}

[gcode_macro MMU__SELECT_BYPASS]
gcode: MMU_SELECT_BYPASS

[gcode_macro MMU__LOAD_BYPASS]
gcode: MMU_LOAD_BYPASS

[gcode_macro MMU__RECOVER]
gcode: MMU_RECOVER

[gcode_macro MMU__PRELOAD]
gcode:
    {% set GATE = params.GATE|default(0)|int %}
    MMU_PRELOAD GATE={GATE}

[gcode_macro MMU__CHECK_GATES]
gcode:
    {% set GATE = params.GATE|default(0)|int %}
    MMU_CHECK_GATES GATE={GATE}

# Useful convenience commands...

[gcode_macro MMU_CHANGE_TOOL_STANDALONE]
description: Convenience macro for inclusion in print_start for initial tool load (defined in mmu_software.cfg)
gcode:
    {% set TOOL = params.TOOL|default(0)|int %}
    MMU_CHANGE_TOOL TOOL={TOOL} STANDALONE=1

########################################################################
# Standalone Tip Forming (also helps with rapid tuning of Slicer values)
########################################################################
[gcode_macro _MMU_FORM_TIP_STANDALONE]
description: Standalone macro that mimics SuperSlicer process

# Unloading and Ramming values - Initial moves to form and shape tip
variable_unloading_speed_start: 150 #80     # Fast here to seperate the filament from meltzone (Very intitial retract SS uses distance of E-15)
variable_unloading_speed: 16 #20           # Too fast forms excessively long tip or hair. Slow is better here UNLOADING_SPEED_START/COOLING_MOVES seems a good start
variable_ramming_volume: 20 #0             # (mm^3) SS default values = 2, 5, 9, 13, 18, 23, 27. Only Used to Simulate SS Ramming during standalone
variable_ss_ramming: 0                 # Set to 0 for standalone ramming (RAMMING_VOLUME), 1 to let the slicer do it (i.e. turn off for standalone)

# Cooling Move Values - To cool the tip formed and separate from strings
variable_cooling_tube_position: 35     # Dragon ST: 35, Dragon HF: 30, Mosquito: 30, Revo: 35, Phaetus Rapido HF: 43;  Measured from Top of Heater Block to Top of Heatsink
variable_cooling_tube_length: 10       # Dragon ST: 15, Dragon HF: 10, Mosquito: 20, Revo: 10, Phaetus Rapido HF: 22; Measured from Nozzle to Top of Heater Block
variable_initial_cooling_speed: 3 #10     # Slow to solidify tip and cool string if formed.
variable_final_cooling_speed: 25 #50       # High speed break the string formed. Too fast = tip deformation during eject. Too Slow = long string/no seperation
variable_toolchange_temp: 0            # Used if you want to lower temp during toolchanges default 0
variable_cooling_moves: 4              # 2-4 is a good start

# SkinnyDip values - To burn off VERY FINE hairs only (This is NOT for long tip reshaping)
variable_use_skinnydip: 1              # Tune this LAST, this is for removal of VERY FINE hairs only (Different than a long tip)
variable_skinnydip_distance: 30        # Start just under Cooling_tube_position and increase - Will depend on how much Ramming Volume is used
variable_dip_insertion_speed: 30       # Medium-Slow - Just long enough to melt the fine hairs. Too slow will pull up molten filament
variable_dip_extraction_speed: 70      # Around 2x Insertion speed, Prevents forming new hairs
variable_melt_zone_pause: 0            # Milliseconds - default 0
variable_cooling_zone_pause: 0         # Milliseconds - default 0 - If you need to adjust here its possible Dip Insertion too slow
variable_use_fast_skinnydip: 0         # Skip the toolhead temp change during skinnydip move - default 0

# Final Eject - for standalone tuning only. Automatically set by `MMU_FORM_TIP` command
variable_final_eject: 0                # Default 0, enable during standalone tuning process to eject the filament

# Park filament ready to eject
variable_parking_distance: 0           # Final filament parking position after final cooling move, 0 will leave filament where it naturally ends up

gcode:
    # Initialize Paramaters
    {% set UNLOADING_SPEED_START = params.UNLOADING_SPEED_START|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['unloading_speed_start']) %}
    {% set UNLOADING_SPEED = params.UNLOADING_SPEED|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['unloading_speed']) %}
    {% set RAMMING_VOLUME = params.RAMMING_VOLUME|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['ramming_volume']) %}
    {% set SS_RAMMING = params.SS_RAMMING|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['ss_ramming']) %}
    {% set COOLING_TUBE_LENGTH = params.COOLING_TUBE_LENGTH|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['cooling_tube_length']) %}
    {% set COOLING_TUBE_POSITION = params.COOLING_TUBE_POSITION|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['cooling_tube_position']) %}
    {% set INITIAL_COOLING_SPEED = params.INITIAL_COOLING_SPEED|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['initial_cooling_speed']) %}
    {% set FINAL_COOLING_SPEED = params.FINAL_COOLING_SPEED|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['final_cooling_speed']) %}
    {% set COOLING_MOVES = params.COOLING_MOVES|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['cooling_moves']) %}
    {% set TOOLCHANGE_TEMP = params.TOOLCHANGE_TEMP|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['toolchange_temp']) %}
    {% set USE_SKINNYDIP = params.USE_SKINNYDIP|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['use_skinnydip']) %}
    {% set USE_FAST_SKINNYDIP = params.USE_FAST_SKINNYDIP|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['use_fast_skinnydip']) %}
    {% set SKINNYDIP_DISTANCE = params.SKINNYDIP_DISTANCE|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['skinnydip_distance']) %}
    {% set DIP_INSERTION_SPEED = params.DIP_INSERTION_SPEED|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['dip_insertion_speed']) %}
    {% set DIP_EXTRACTION_SPEED = params.DIP_EXTRACTION_SPEED|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['dip_extraction_speed']) %}
    {% set MELT_ZONE_PAUSE = params.MELT_ZONE_PAUSE|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['melt_zone_pause']) %}
    {% set COOLING_ZONE_PAUSE = params.COOLING_ZONE_PAUSE|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['cooling_zone_pause']) %}
    {% set PARKING_DISTANCE = params.PARKING_DISTANCE|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['parking_distance']) %}
    {% set FINAL_EJECT = params.FINAL_EJECT|default(printer['gcode_macro _MMU_FORM_TIP_STANDALONE']['final_eject']) %}

    G91
    M83
    G92 E0

    #---------------------------------#
    #-Tip forming Process begins here-#
    #---------------------------------#

    SET_PRESSURE_ADVANCE ADVANCE=0
    {% set OLD_TEMP = printer.extruder.target %}
    {% if SS_RAMMING|int == 0 and RAMMING_VOLUME|int > 0 %} # Standalone Ramming
        {% set RATIO = (RAMMING_VOLUME|float) /23.0 %}
        G1 E{0.5784 * RATIO|float} F299 #7
        G1 E{0.5834 * RATIO|float} F302 #3
        G1 E{0.5918 * RATIO|float} F306 #6
        G1 E{0.6169 * RATIO|float} F319 #6
        G1 E{0.3393 * RATIO|float} F350 #0
        G1 E{0.3363 * RATIO|float} F350 #0
        G1 E{0.7577 * RATIO|float} F392 #6
        G1 E{0.8382 * RATIO|float} F434 #3
        G1 E{0.7776 * RATIO|float} F469 #9
        G1 E{0.1293 * RATIO|float} F469 #9
        G1 E{0.9673 * RATIO|float} F501 #2
        G1 E{1.0176 * RATIO|float} F527 #2
        G1 E{0.5956 * RATIO|float} F544 #6
        G1 E{0.4555 * RATIO|float} F544 #6
        G1 E{1.0662 * RATIO|float} F552 #4
    {% endif %}

    # Set toolchange temperature just prior to filament being extracted from melt zone and wait for set point
    # (SKINNYDIP -- normal mode only)
    # Only used if changing between filament types eg. ABS-->PLA
    {% if TOOLCHANGE_TEMP|float > 0 and USE_FAST_SKINNYDIP|int == 0 %}
         M109 S{TOOLCHANGE_TEMP}
    {% endif %}

    # Unloading - This is where the tip spear shape comes from Faster=longer/pointer/higher stringing
    {% set TOTAL_RETRACTION_DISTANCE = COOLING_TUBE_POSITION|float + COOLING_TUBE_LENGTH|float / 2 - 15 %}
    G1 E-15 F{1.0 * UNLOADING_SPEED_START|float * 60} # Default value from SS - Cannot modify
    G1 E-{0.7 * TOTAL_RETRACTION_DISTANCE} F{1.0 * UNLOADING_SPEED|float * 60}
    G1 E-{0.2 * TOTAL_RETRACTION_DISTANCE} F{0.5 * UNLOADING_SPEED|float * 60}
    G1 E-{0.1 * TOTAL_RETRACTION_DISTANCE} F{0.3 * UNLOADING_SPEED|float * 60}

    {% if TOOLCHANGE_TEMP|float > 0 and USE_FAST_SKINNYDIP|int == 1 %}
        M104 S{TOOLCHANGE_TEMP}
    {% endif %}

    # Generate Cooling Moves - Solidifies tip shape and helps break strings if formed
    {% set SPEED_INC = (FINAL_COOLING_SPEED|float - INITIAL_COOLING_SPEED|float) / (2 * COOLING_MOVES|float - 1) %}
    {% for move in range(COOLING_MOVES|int) %}
        G1 E{COOLING_TUBE_LENGTH} F{(INITIAL_COOLING_SPEED|float + SPEED_INC*move*2) * 60}
        G1 E-{COOLING_TUBE_LENGTH} F{(INITIAL_COOLING_SPEED|float + SPEED_INC*(move*2+1)) * 60}
    {% endfor %}

    # Wait for extruder to reach toolchange temperature after cooling moves complete (SKINNYDIP--fast mode only)
    {% if TOOLCHANGE_TEMP|float > 0 and USE_FAST_SKINNYDIP|int == 1 %}
        M109 S{TOOLCHANGE_TEMP}
    {% endif %}

    # Skinny dip Move - burns off VERY FINE hairs (Good for PLA)
    {% if USE_SKINNYDIP|int == 1 %}
        G1 E{SKINNYDIP_DISTANCE} F{DIP_INSERTION_SPEED|float * 60}
        G4 P{MELT_ZONE_PAUSE}
        G1 E-{SKINNYDIP_DISTANCE} F{DIP_EXTRACTION_SPEED|float * 60}
        G4 P{COOLING_ZONE_PAUSE}
    {% endif %}

    {% if TOOLCHANGE_TEMP|float > 0 %}
        M104 S{OLD_TEMP}
    {% endif %}

    # Eject once all shaping is done - Standalone mode only
    {% if FINAL_EJECT|int == 1 %}
        G92 E0
        G1 E-80 F3000

    # Park filament at fixed location
    {% elif PARKING_DISTANCE|int > 0 %}
        G90
        M82
        G1 E-{PARKING_DISTANCE} F3000

    {% endif %}

    G92 E0
    G90
    M82

########################################################################
# Standalone Tip Cutting template
#
# Note that this is just an outline placeholder example that can be
# configured as an alternative to _MMU_FORM_TIP_STANDALONE by setting
# 'form_tip_gcode: _MMU_CUT_TIP` in mmu_parameters.cfg
########################################################################
[gcode_macro _MMU_CUT_TIP]
description: Standalone macro for filament tip cutting logic

# Final Eject - for standalone testing only. Automatically set by `MMU_FORM_TIP` command
variable_final_eject: 0                # Default 0, enable during standalone tuning process to eject the filament after cut

# The park position of the filament is relative to the nozzle and represents where the end of the filament is
# after tip forming. The park position is important and used by Happy Hare to finish unloading the extruder.
# If the filament is cut it is important to report back the position your cutter leaves the filament in the
# extruder relative to the nozzle.
#
# The value can be set dynamically in gcode with this construct:
#   SET_GCODE_VARIABLE MACRO=_MMU_CUT_TIP VARIABLE=output_park_pos VALUE=-1
# or preset as a variable like this:
variable_output_park_pos: 25           # The park position (output variable passed back to Happy Hare)

gcode:
# Initialize Paramaters
    {% set FINAL_EJECT = params.FINAL_EJECT|default(printer['gcode_macro _MMU_CUT_TIP']['final_eject']) %}

    G91
    M83
    G92 E0

    #
    # INSERT OR CALL YOUR CUSTOM CUTTING GCODE HERE...
    #

    # Eject after cut - useful for testing
    {% if FINAL_EJECT|int == 1 %}
        G92 E0
        M83
        G1 E-80 F3000
    {% endif %}

    G92 E0
    G90
    M82

###########################################################################
# Callback macros for modifying Happy Hare behavior
# This occurs prior to unloading filament on a toolchange
#
# Typically you would move toolhead to a position where oozing is not a problem
# Note that the z_hop is automatically controlled by Happy Hare and is
# specified with the 'z_hop_height_toolchange' parameter
#
[gcode_macro _MMU_PRE_UNLOAD]
description: Optional pre unload routine for filament change
gcode:

###########################################################################
# Callback macros for modifying Happy Hare behavior
# This occurs after loading new filament on a toolchange
#
# Typically you would clean nozzle if equiped and return to previous position
# Note that restoration to original toolhead position is ensured by Happy Hare.
#
[gcode_macro _MMU_POST_LOAD]
description: Optional post load routine for filament change
gcode:

###########################################################################
# Callback macros for modifying Happy Hare behavior
# Note that EndlessSpool is an unsupervised filament change
# This occurs prior to MMU forming tip and ejecting the remains of the old filament
#
# Typically you would move toolhead to your park position so oozing is not a problem
# Note that the z_hop is automatically controlled by Happy Hare and is
# specified with the 'z_hop_height_toolchange' parameter
#
# This is probably similar to what you do in your PAUSE macro and you could simply call that here...
# (this call works with reference PAUSE macro supplied in client_macros.cfg)
#
[gcode_macro _MMU_ENDLESS_SPOOL_PRE_UNLOAD]
description: Optional post unload routine for EndlessSpool changes
gcode:
    PAUSE

###########################################################################
# Callback macros for modifying Happy Hare behavior
# Note that EndlessSpool is an unsupervised filament change
# This occurs after MMU has loaded the new filament from the next spool in rotation
# MMU will have loaded the new filament to the nozzle the same way as a normal filament
# swap. Previously configured Pressure Advance will be retained.
# 
# This would be a place to purge additional filament if necessary (it really shouldn't be)
# and clean nozzle if your printer is suitably equipped.
# Note that restoration to original toolhead position is ensured by Happy Hare.
#
# This is probably similar to what you do in your RESUME macro and you could simply call that here...
# (this call works with reference RESUME macro supplied in client_macros.cfg)
#
[gcode_macro _MMU_ENDLESS_SPOOL_POST_LOAD]
description: Optional post load routine for EndlessSpool changes
gcode:
    RESUME

###########################################################################
# This occurs when the MMU action status changes. The `ACTION` parameters will contain
# the current action string (also available in `printer.mmu.action` printer variable).
# Also the previous action is available in `OLD_ACTION`. See Happy Hare README for
# full list of action strings.
#
# This could be a place to set LED status or similar. The logic here
# demonstrates the three major action states
#
[gcode_macro _MMU_ACTION_CHANGED]
description: Called when an action has changed
gcode:
    {% set ACTION = params.ACTION|string %}
    {% set OLD_ACTION = params.OLD_ACTION|string %}

    {% if ACTION|string == "Loading" %}
        # Add your logic here, e.g. loading LED
        # _STATUS_LOADING
    {% endif %}

    {% if ACTION|string == "Unloading" %}
        # Add your logic here, e.g. unloading LED
        # _STATUS_UNLOADING
    {% endif %}

    {% if ACTION|string == "Idle" %}
        # Add your logic here, e.g. LED off
        # _STATUS_STANDBY
    {% endif %}

###########################################################################
# ADVANCED: User modifable loading and unloading sequences
#
# By default Happy Hare will call internal logic to handle loading and unloading
# sequences. To enable the calling of user defined sequences you must add the
# following to your mmu_parameters.cfg
#
# gcode_load_sequence: 1    # Gcode loading sequence 1=enabled, 0=internal logic (default)
# gcode_unload_sequence: 1  # Gcode unloading sequence, 1=enabled, 0=internal logic (default)
#
# This reference example load sequence mimicks the internal ones exactly. It uses the
# high level "modular" movements that are all controlled by parameters defined in
# mmu_parameters.cfg and automatically keep the internal filament position state up-to-date.
# Switching to these macros should not change behavior and can serve as a starting point for
# your customizations
#
# State Machine:
# If you experiment beyond the basic example shown here you will need to understand
# the possible states for filament position.  This is the same state that is exposed
# as the `printer.mmu.filament_pos` printer variable. This internal state must be
# kept up-to-date and will need to be set directly as you progress through your
# custom move sequence.  At this time the state machine is non-extensible.
#
#        FILAMENT_POS_UNKNOWN = -1
#  L  ^  FILAMENT_POS_UNLOADED = 0
#  O  |  FILAMENT_POS_START_BOWDEN = 1
#  A  |  FILAMENT_POS_IN_BOWDEN = 2
#  D  U  FILAMENT_POS_END_BOWDEN = 3
#  |  N  FILAMENT_POS_HOMED_EXTRUDER = 4
#  |  L  FILAMENT_POS_PAST_EXTRUDER = 5
#  |  O  FILAMENT_POS_HOMED_TS = 6
#  |  A  FILAMENT_POS_IN_EXTRUDER = 7    # AKA Filament is past the Toolhead Sensor
#  v  D  FILAMENT_POS_LOADED = 8         # AKA Filament is homed to the nozzle
#
# Final notes:
# 1) You need to respect the context being passed into the macro such as the
#    desired 'length' to move because this can be called for test loading
# 2) The unload macro can be called with the filament in any position (states)
#    You are required to handle any starting point. The default reference
#    serves as a good guide
#
[gcode_macro _MMU_LOAD_SEQUENCE]
description: Called when MMU is asked to load filament
gcode:
    {% set filament_pos = params.FILAMENT_POS|float %}
    {% set length = params.LENGTH|float %}
    {% set full = params.FULL|int %}
    {% set home_extruder = params.HOME_EXTRUDER|int %}
    {% set skip_extruder = params.SKIP_EXTRUDER|int %}
    {% set extruder_only = params.EXTRUDER_ONLY|int %}

    {% if extruder_only %}
        _MMU_STEP_LOAD_TOOLHEAD EXTRUDER_ONLY=1

    {% elif filament_pos >= 5 %}
        {action_raise_error("Can't load - already in extruder!")}

    {% else %}
        {% if filament_pos <= 0 %}                      # FILAMENT_POS_UNLOADED
            _MMU_STEP_LOAD_ENCODER
        {% endif %}

        {% if filament_pos < 3 %}                       # FILAMENT_POS_END_BOWDEN
            _MMU_STEP_LOAD_BOWDEN LENGTH={length}
        {% endif %}

        {% if filament_pos < 4 and home_extruder %}     # FILAMENT_POS_HOMED_EXTRUDER
            _MMU_STEP_HOME_EXTRUDER
        {% endif %}

        {% if not skip_extruder %}                      # FILAMENT_POS_PAST_EXTRUDER
            _MMU_STEP_LOAD_TOOLHEAD
        {% endif %}

    {% endif %}

[gcode_macro _MMU_UNLOAD_SEQUENCE]
description: Called when MMU is asked to unload filament
gcode:
    {% set filament_pos = params.FILAMENT_POS|float %}
    {% set length = params.LENGTH|float %}
    {% set extruder_only = params.EXTRUDER_ONLY|int %}
    {% set park_pos = params.PARK_POS|float %}

    {% if extruder_only %}
        {% if filament_pos >= 5 %}                      # FILAMENT_POS_PAST_EXTRUDER
            _MMU_STEP_UNLOAD_TOOLHEAD EXTRUDER_ONLY=1 PARK_POS={park_pos}
        {% else %}
            {action_raise_error("Can't unload extruder - already unloaded!")}
        {% endif %}

    {% elif filament_pos == 0 %}
        {action_raise_error("Can't unload - already unloaded!")}

    {% else %}
        {% if filament_pos >= 5 %}                      # FILAMENT_POS_PAST_EXTRUDER
            # Exit extruder, fast unload of bowden, then slow unload encoder
            _MMU_STEP_UNLOAD_TOOLHEAD PARK_POS={park_pos}
        {% endif %}

        {% if filament_pos >= 3 %}                      # FILAMENT_POS_END_BOWDEN
            # Fast unload of bowden, then slow unload encoder
            _MMU_STEP_UNLOAD_BOWDEN FULL=1
            _MMU_STEP_UNLOAD_ENCODER

        {% elif filament_pos >= 1 %}                    # FILAMENT_POS_START_BOWDEN
            # Have to do slow unload because we don't know exactly where in the bowden we are
            _MMU_STEP_UNLOAD_ENCODER FULL=1
        {% endif %}

    {% endif %}

#
# Some examples of alternative macros follow
#
# 1. This loading example leverages the built-in modules to load filament to the end
# of the bowden tube. Then homes the filament to the toolhead sensor (mmu_toolhead)
# using synchronized gear and extruder movement. The state is updated to reflect this
# new position. It then performs a synchronized stepper move of 62mm to advance the
# filament to the nozzle
#
#[gcode_macro _MMU_LOAD_SEQUENCE]
#description: Called when MMU is asked to load filament
#gcode:
#    {% set filament_pos = params.FILAMENT_POS|float %}
#    {% set length = params.LENGTH|float %}
#    {% set skip_extruder = params.SKIP_EXTRUDER|int %}
#    {% set extruder_only = params.EXTRUDER_ONLY|int %}
#
#    {% if extruder_only %}
#        _MMU_STEP_HOMING_MOVE ENDSTOP=mmu_toolhead MOVE=50 MOTOR=extruder
#        _MMU_STEP_SET_FILAMENT STATE=6     # FILAMENT_POS_HOMED_TS
#        _MMU_STEP_MOVE MOVE=62 MOTOR=extruder
#        _MMU_STEP_SET_FILAMENT STATE=8     # FILAMENT_POS_LOADED
#    {% else %}
#        _MMU_STEP_LOAD_ENCODER
#        _MMU_STEP_LOAD_BOWDEN LENGTH={length}
#        {% if full and not skip_extruder %}
#            _MMU_STEP_HOMING_MOVE ENDSTOP=mmu_toolhead MOVE=50 MOTOR=gear+extruder
#            _MMU_STEP_SET_FILAMENT STATE=6 # FILAMENT_POS_HOMED_TS
#            _MMU_STEP_MOVE MOVE=62 MOTOR=gear+extruder
#            _MMU_STEP_SET_FILAMENT STATE=8 # FILAMENT_POS_LOADED
#        {% endif %}
#    {% endif %}
#
#
# 2. This very streamlined loading example starts off similarly loading to the end of the
# calibrated bowden. It then simply homes to the nozzle (using TMC stallguard on the extruder
# stepper!) with synchronized extruder+gear steppers.  This requires the `mmu_ext_touch`
# endstop to be one of those defined for the extruder stepper
#
#[gcode_macro _MMU_LOAD_SEQUENCE]
#description: Called when MMU is asked to load filament
#gcode:
#    {% set length = params.LENGTH|float %}
#    {% set full = params.FULL|int %}
#    {% set skip_extruder = params.SKIP_EXTRUDER|int %}
#    {% set extruder_only = params.EXTRUDER_ONLY|int %}
#
#    {% if extruder_only %}
#        _MMU_STEP_HOMING_MOVE ENDSTOP=mmu_ext_touch MOVE=100 MOTOR=extruder
#        _MMU_STEP_SET_FILAMENT STATE=8 # FILAMENT_POS_LOADED
#    {% else %}
#        _MMU_STEP_LOAD_ENCODER
#        _MMU_STEP_LOAD_BOWDEN LENGTH={length}
#        {% if full and not skip_extruder %}
#            _MMU_STEP_HOMING_MOVE ENDSTOP=mmu_ext_touch MOVE=100 MOTOR=extruder+gear
#            _MMU_STEP_SET_FILAMENT STATE=8 # FILAMENT_POS_LOADED
#        {% endif %}
#    {% endif %}
jschuh commented 10 months ago

This is just how Klipper's resume works.