diff --git a/cfgs/misc-macros.cfg b/cfgs/misc-macros.cfg index 424e19e..51e0063 100644 --- a/cfgs/misc-macros.cfg +++ b/cfgs/misc-macros.cfg @@ -20,7 +20,7 @@ gcode: SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0 [gcode_macro _globals] -variable_filament_sensor_enabled: 0 # NOTE Enable(1) or disable(0) the filament sensor, if one is connected +variable_filament_sensor_enabled: 1 # NOTE Enable(1) or disable(0) the filament sensor, if one is connected variable_beeping_enabled: 0 # NOTE Enable(1) or disable(0) beeping everywhere except during gantry calibration variable_pre_purge_prime_length: 1.4 gcode: @@ -75,17 +75,34 @@ gcode: {% endif %} [gcode_macro PURGE_LINE] -# https://github.com/JoeCat1207/V0.1-Purge-line-SuperSlicer/blob/main/Purgeline.txt -# https://github.com/VoronDesign/Voron-Switchwire/blob/200cdae033c59ef81f67c4235469da7ca66d53a1/Firmware/skr_mini_e3_v2_config.cfg gcode: {% set PRE_PURGE_PRIME_LENGTH=printer["gcode_macro _globals"].pre_purge_prime_length|default(1.40)|float %} ADJUST_FILAMENT_SENSOR_STATUS ENABLE=1 - G0 Y0 X0 F4000 ; go to tongue of print bed - G1 Z0.4 F500.0 ; move bed to nozzle + + # 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 %} + {% set extrudeAmount = 26.6 %} + {% set movementLength = 100.0 %} + {% set movementSpeed = 15 * 60 %} + {% set xStart = 0.5 %} + {% set yStart = 0.5 %} + + # Set safe speeds + {% set maxVelocity = printer.configfile.settings.printer.max_velocity|default(200)|int %} + {% set maxVelocityAdjusted = (0.95 * maxVelocity * 60)|int %} + G92 E0.0 ; reset extruder + G90 ; Absolute positioning + G0 X{xStart} Y{yStart} F{maxVelocityAdjusted} ; move to purge position + G1 Z0.4 F500.0 ; move to purge height + M83 ; Relative extrusion mode G1 E{PRE_PURGE_PRIME_LENGTH} F500 ; pre-purge prime LENGTH SHOULD MATCH YOUR PRINT_END RETRACT - G1 Y140 E35.0 F1200.0 ; intro line 1 + G1 X{xStart + movementLength} E{extrudeAmount} F{movementSpeed} ; intro line 1 + #G1 E-.5 F2100 # Retract G92 E0.0 ; reset extruder + M82 ; Absolute extrusion mode G1 Z5.0 ; move nozzle to prevent scratch [gcode_macro CANCEL_PRINT] @@ -123,13 +140,20 @@ gcode: [gcode_macro PRINT_END] gcode: ADJUST_FILAMENT_SENSOR_STATUS ENABLE=0 - CONDITIONAL_BEEP I=2 DUR=30 FREQ=8500 ; NOTE Comment out this line to stop the beeps at the end of a print + CONDITIONAL_BEEP I=2 DUR=30 FREQ=8500 {% set PRE_PURGE_PRIME_LENGTH=printer["gcode_macro _globals"].pre_purge_prime_length|default(1.40)|float %} + M400 ; wait for buffer to clear G92 E0 ; zero the extruder G1 E-{PRE_PURGE_PRIME_LENGTH} F400 ; retract filament G91 ; relative positioning + # Set safe speeds + {% set zVelocity = printer.configfile.settings.printer.max_z_velocity|default(15)|int %} + {% set maxVelocity = printer.configfile.settings.printer.max_velocity|default(200)|int %} + {% set zVelocityAdjusted = (0.95 * zVelocity * 60)|int %} + {% set maxVelocityAdjusted = (0.95 * maxVelocity * 60)|int %} + # Get Boundaries {% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %} {% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %} @@ -155,8 +179,8 @@ gcode: {% set z_safe = max_z - printer.toolhead.position.z %} {% endif %} - G0 Z{z_safe} F2000 ; move nozzle up - G0 X{x_safe} Y{y_safe} F9000 ; move nozzle to remove stringing + G0 Z{z_safe} F{zVelocityAdjusted} ; move nozzle up + G0 X{x_safe} Y{y_safe} F{maxVelocityAdjusted} ; move nozzle to remove stringing TURN_OFF_HEATERS M107 ; turn off fan G90 ; absolute positioning diff --git a/printer.cfg b/printer.cfg index 8cbf4ba..2cf1ec8 100644 --- a/printer.cfg +++ b/printer.cfg @@ -153,7 +153,7 @@ samples_tolerance: 0.01 samples_tolerance_retries: 5 [safe_z_home] -home_xy_position: 84.50, 135 # NOTE The probe is at the center of the bed. +home_xy_position: 123, 170 speed: 100.0 z_hop: 10 z_hop_speed: 15 @@ -188,32 +188,7 @@ pin: PA0 # encoder_pins: ^PB14, ^PB10 # click_pin: ^!PB2 -[bed_screws] -screw1: 26.5, 31 -screw1_name: front left -screw2: 196.75, 31 -screw2_name: front right -screw3: 196.75, 201 -screw3_name: back right -screw4: 26.5, 201 -screw4_name: back left - -[screws_tilt_adjust] -screw1: 111.5, 116.5 -screw1_name: center -screw2: 26.5, 31 -screw2_name: front left -screw3: 196.75, 31 -screw3_name: front right -screw4: 196.75, 201 -screw4_name: back right -screw5: 26.5, 201 -screw5_name: back left -speed: 50 -horizontal_move_z: 10 -screw_thread: CCW-M4 - -# NOTE The speaker will probably not work, since the LCD apparently doesn't work with Klipper +# NOTE The speaker will not work, since the screen doesn't # [output_pin beeper] # pin: PC6 # value: 0