stealthburner_leds.cfg modified - 17/04/25 - 09:34:31

This commit is contained in:
pi committed 2025-04-17 09:34:34 +01:00
1 parent abeb8c5d39
commit c102689a8b
2 files changed

No files matched your search

+110
View File
@@ -0,0 +1,110 @@
[bed_mesh]
mesh_min = 10, 40
mesh_max = 340, 335
speed = 200
horizontal_move_z = 2
probe_count = 10,10
algorithm = bicubic
##[(7x7)-1] / 2 = 24
##[(5x5)-1] / 2 = 12
##[(9x9)-1] / 2 = 40
#relative_reference_index: 40
zero_reference_position: 175, 175
#relative_reference_index: 15
split_delta_z = 0.0125
[gcode_macro QUAD_GANTRY_LEVEL]
rename_existing: _QUAD_GANTRY_LEVEL
gcode:
STATUS_LEVELING
SAVE_GCODE_STATE NAME=STATE_QGL
BED_MESH_CLEAR
# If QGL has not been done yet, correct for any major skew first
# at 8mm height
{% if not printer.quad_gantry_level.applied %}
_QUAD_GANTRY_LEVEL horizontal_move_z=8 retry_tolerance=1
{% endif %}
# Compelte with a full QGL at the configured height
_QUAD_GANTRY_LEVEL
RESTORE_GCODE_STATE NAME=STATE_QGL
#####################################################################
# Macros
#####################################################################
## customize BED MESH CALIBRATE gcode
## use BED_MESH_STORE -> generate MESH and save immediately and park in the middle
## use BED_MESH_STORE PARK=false -> generate MESH and save immediately
## use BED_MESH_STORE SAVE=false -> generate MESH and save it later
## use BED_MESH_STORE SAVE=false PARK=false -> would be most likely be used in your macros
[gcode_macro BED_MESH_STORE]
description: Generate a mesh, name it and run save_config if requested
variable_save_at_end: 'false'
gcode:
##### set default parameter value #####
{% set save = params.SAVE|default('true') %}
{% set park = params.PARK|default('true') %}
############# Get user defines #############
{% set center = printer["gcode_macro _USER_VARIABLE"].center %}
{% set z_hop = printer["gcode_macro _USER_VARIABLE"].z_hop %}
{% set bed_temp = printer.heater_bed.target|int %}
##### define plate name: Voron (default) or flexplate name #####
{% set plate_name = 'Voron' %}
{% if 'save_variables' in printer.configfile.config %}
{% if printer.save_variables.variables.plate_array is defined %}
{% set plate_index = printer.save_variables.variables.plate_index|int %}
{% set plate_name = printer.save_variables.variables.plate_array[plate_index][0] %}
{% endif %}
{% endif %}
##### join everything to a single mesh name #####
{% set mesh_name = "Voron-Bed_Temp-" + bed_temp|string + "C" %}
##### end of definitions #####
BED_MESH_CALIBRATE
BED_MESH_PROFILE SAVE={mesh_name}
BED_MESH_PROFILE REMOVE=default
{% if park|lower == 'true' %}
G90 ; set absolute
G0 Z{z_hop} F1800 ; move nozzle to z high first
G0 X{center[0]} Y{center[1]} F18000 ; home to get toolhead in the middle
{% endif %}
{% if save|lower == 'true' %}
_PRINT_AR T="BED_MESH: Save Config!"
SAVE_CONFIG
{% else %}
_PRINT_AR T="BED_MESH: Save Config after print done"
SET_GCODE_VARIABLE MACRO=BED_MESH_STORE VARIABLE=save_at_end VALUE='"true"'
{% endif %}
## use BED_MESH_LOAD -> load an existing MESH
## use BED_MESH_LOAD AUTO=true -> load an existing MESH or generate a new one and prepare it to be saved after print end
[gcode_macro BED_MESH_LOAD]
description: Load an existing mesh or generate a new one
gcode:
##### set default parameter value #####
{% set auto = params.AUTO|default('false') %}
{% set bed_temp = printer.heater_bed.target|int %}
##### join everything to a single mesh name #####
{% set mesh_name = "Voron-Bed_Temp-" + bed_temp|string + "C" %}
##### end of definitions #####
{% if printer.configfile.config["bed_mesh " + mesh_name] is defined %}
BED_MESH_CLEAR
BED_MESH_PROFILE LOAD={mesh_name}
_PRINT_AR T="{"BED_MESH: " + mesh_name + " loaded"}"
{% else %}
{% if auto|lower == 'true' %}
_PRINT_AR T="{"BED_MESH: " + mesh_name + " needs to be generated"}"
BED_MESH_STORE SAVE=false PARK=false
{% else %}
_PRINT_AR T="{"BED_MESH ERROR: " + mesh_name + " not defined"}"
{% endif %}
{% endif %}
## add this to your PRINT_END to save a mesh if needed 10 seconds after print ended
## UPDATE_DELAYED_GCODE ID=_BED_MESH_SAVE DURATION=10
[delayed_gcode _BED_MESH_SAVE]
gcode:
{% if printer["gcode_macro BED_MESH_STORE"].save_at_end == 'true' %}
_PRINT_AR T="BED_MESH: Save Config!"
SAVE_CONFIG
{% endif %}
@@ -0,0 +1,225 @@
#######################################################################################################################################
# Sample macro config to be used in conjunction with the Decontaminator Purge Bucket & Nozzle Scrubber mod. Created by Hernsl
# (hernsl#8860 on Discord) and edited by Edwardyeeks (edwardyeeks#6042 on Discord). Several ideas that made it as features by
# Deutherius (deutherius#3295 on Discord).
# The goal of this macro is to provide a nozzle scrubbing and purging routine that is easily copied/referenced into your printer.cfg.
# Users can simply change parameters and enable/disable options in the first half. Descriptions are plentiful, making this macro
# look huge but informative and are laid out in sequence to be read first describing the line below; PLEASE READ CAREFULLY.
# This sample config assumes the following: The user has implemented the default decontaminator purge bucket & nozzle scrubber mod
# for the VORON 1/2. It can be tweaked to customised purge bucket geometries and brushes.
# Features in this macro: option of putting the bucket at the rear or front of the bed. Purge routine that can be enabled/disabled.
# By default, bucket is located at rear left of bed and purge routine is enabled. The purge and scrubbing routine is randomized
# in either left or right bucket to ensure as even as possible distribution of filament gunk.
# Default parameters are set for safe speeds and movements. Where necessary, tweak the parameters for the nozzle scrub procedure
# to fit your printer.
# To avoid adding length of lines to your main printer.cfg config file, one can upload a config file separately into klipper and
# include it into the main printer config. Upload nozzle_scrub.cfg to the same directory as printer.cfg. Usually, it is in /home/pi/.
# Users of Fluidd, Mainsail and other klipper front ends would find it under /home/pi/klipper_config/.
# Once uploaded, add the following to your printer.cfg in the Macros section: [include /home/pi/nozzle_scrub.cfg]
# Those running Fluidd, Mainsail and other front ends will need to use the following location instead:
# [include /home/pi/klipper_config/nozzle_scrub.cfg]
#######################################################################################################################################
# Name of the macro is clean_nozzle.
[gcode_macro clean_nozzle]
# If you are putting your purge bucket at the rear left of the bed as per default installation, enable True on your location_bucket_rear
# variable. If you want to put your purge bucket elsewhere (perhaps the front), then set it to False. See diagrams and description
# further below on how to set your XY position.
variable_location_bucket_rear: True
# If you want the purging routine in your bucket enabled, set to True (and vice versa).
variable_enable_purge: True
# These parameters define your filament purging. The retract variable is used to retract right after purging to prevent unnecessary
# oozing. Some filament are particularly oozy and may continue to ooze out of the nozzle for a second or two after retracting. The
# ooze dwell variable makes allowance for this. Update as necessary. If you decided to not enable purge, you can ignore this section.
variable_purge_len: 10 ; Amount of filament, in mm, to purge.
variable_purge_spd: 150 ; Speed, in mm/min, of the purge.
variable_purge_temp_min: 240 ; Minimum nozzle temperature to permit a purge. Otherwise, purge will not occur.
variable_purge_ret: 2 ; Retract length, in mm, after purging to prevent slight oozing. Adjust as necessary.
variable_ooze_dwell: 2 ; Dwell/wait time, in seconds, after purging and retracting.
# Adjust this so that your nozzle scrubs within the brush. Currently defaulted to be a lot higher for safety. Be careful not to go too low!
variable_brush_top: .3
# These parameters define your scrubbing, travel speeds, safe z clearance and how many times you want to wipe. Update as necessary. Wipe
# direction is randomized based off whether the left or right bucket is randomly selected in the purge & scrubbing routine.
variable_clearance_z: 5 ; When traveling, but not cleaning, the clearance along the z-axis between nozzle and brush.
variable_wipe_qty: 7 ; Number of complete (A complete wipe: left, right, left OR right, left, right) wipes.
variable_prep_spd_xy: 3000 ; Travel (not cleaning) speed along x and y-axis in mm/min.
variable_prep_spd_z: 1500 ; Travel (not cleaning) speed along z axis in mm/min.
variable_wipe_spd_xy: 5000 ; Nozzle wipe speed in mm/min.
# These parameters define the size of the brush. Update as necessary. A visual reference is provided below. Note that orientation of
# parameters remain the same whether bucket is at rear or front.
#
# ← brush_width →
# _________________ ↑
# | | ↑ If you chose location_bucket_rear = True, Y position is acquired
# brush_start (x) | | brush_depth from your stepper_y position_max. Adjust your brush physically in
# |_________________| ↓ Y so that the nozzle scrubs within the brush.
# (y) ↓
# brush_front
# __________________________________________________________
# PRINTER FRONT
#
#
## For V1.8, you may need to measure where your brush is on the x axis and input manually into any of the variable_brush_start uncommented.
## For V2.4 250mm build, uncomment this below:
#variable_brush_start: 25
## For V2.4 300mm build, uncomment this below:
#variable_brush_start: 50
## For V2.4 350mm build, uncomment this below:
variable_brush_start: 230
# This value is defaulted from brush location in CAD (rear left). Change if your brush width is different.
variable_brush_width: 52
## These are only used if location_bucket_rear is False. You specify a custom location in y axis for your brush - see diagram above. ##
variable_brush_front: 0
variable_brush_depth: 0
# These parameters define the size of your purge bucket. Update as necessary. If you decided to not enable purge, you can ignore
# this section. A visual reference is provided below. Note that orientation of parameters remain the same whether bucket is at rear
# or front.
#
# bucket_gap
# ← ---- →
# __________________________________________
# | | | |
# | | | |
# bucket_start (x) | |______| |
# | | | |
# | | | |
# |_________________|. . . |_________________|
# ← ------------- → ← ------------- →
# bucket_left_width bucket_right_width
# _______________________________________________________________________________________
# PRINTER FRONT
#
## For V2.4 250mm build, uncomment below
#variable_bucket_left_width: 42
## For V2.4 300mm build, uncomment below
#variable_bucket_left_width: 67
## For V2.4 350mm build, uncomment below
#variable_bucket_left_width: 92
variable_bucket_left_width: 40
# These values are defaulted from bucket geometry in CAD (rear left location). Change only if you're using a custom bucket.
#variable_bucket_right_width: 40
variable_bucket_right_width: 92
variable_bucket_gap: 22
# For V1.8, you may need to measure where your bucket start is and input into bucket_start. Otherwise, a value of 0 is for a default
# installation of purge bucket at rear left.
variable_bucket_start: 200
###############################################################################################################################################
###############################################################################################################################################
### From here on, unless you know what you're doing, it's recommended not to change anything. Feel free to peruse the code and reach out to me
### (edwardyeeks#6042) on Discord if you spot any problems!
###############################################################################################################################################
###############################################################################################################################################
# Placeholder. The variable will later be set to contain, at random, a number representing the left or right bucket.
variable_bucket_pos: 1
gcode:
# First, check if the axes are homed.
{% if "xyz" in printer.toolhead.homed_axes %}
## Save the gcode state in this macro instance.
SAVE_GCODE_STATE NAME=clean_nozzle
STATUS_CLEANING
## Set to absolute positioning.
G90
## Grab max position of Y-axis from config to use in setting a fixed y position for location_bucket_rear = True.
{% set Ry = printer.configfile.config["stepper_y"]["position_max"]|float %}
## Check if user enabled purge option or not.
{% if enable_purge %}
### Randomly select left or right bin for purge. 0 = left, 1 = right
SET_GCODE_VARIABLE MACRO=clean_nozzle VARIABLE=bucket_pos VALUE={(range(2) | random)}
### Raise Z for travel.
G1 Z{brush_top + clearance_z} F{prep_spd_z}
### Check if user chose to use rear location.
{% if location_bucket_rear %}
G1 Y{Ry} F{prep_spd_xy}
{% else %}
G1 Y{brush_front + (brush_depth / 2)} F{prep_spd_xy}
{% endif %}
### Position for purge. Randomly selects middle of left or right bucket. It references from the middle of the left bucket.
G1 X{bucket_start + (bucket_left_width / (2 - bucket_pos)) + (bucket_pos * bucket_gap) + (bucket_pos * (bucket_right_width / 2))}
### Perform purge if the temp is up to min temp. If not, it will skip and continue executing rest of macro. Small retract after
### purging to minimize any persistent oozing at 5x purge_spd. G4 dwell is in milliseconds, hence * 1000 in formula.
{% if printer.extruder.temperature >= purge_temp_min %}
M83 ; relative mode
G1 E{purge_len} F{purge_spd}
G1 E-{purge_ret} F{purge_spd * 5}
G4 P{ooze_dwell * 1000}
G92 E0 ; reset extruder
{% endif %}
{% endif %}
## Position for wipe. Either left or right of brush based off bucket_pos to avoid unnecessary travel.
G1 Z{brush_top + clearance_z} F{prep_spd_z}
G1 X{brush_start + (brush_width * bucket_pos)} F{prep_spd_xy}
## Check if user chose to use rear location.
{% if location_bucket_rear %}
G1 Y{Ry}
{% else %}
G1 Y{brush_front + (brush_depth / 2)}
{% endif %}
## Move nozzle down into brush.
G1 Z{brush_top} F{prep_spd_z}
## Perform wipe. Wipe direction based off bucket_pos for cool random scrubby routine.
{% for wipes in range(1, (wipe_qty + 1)) %}
G1 X{brush_start + (brush_width * (1 - bucket_pos))} F{wipe_spd_xy}
G1 X{brush_start + (brush_width * bucket_pos)} F{wipe_spd_xy}
{% endfor %}
## Clear from area.
M117 Cleaned!
G1 Z{brush_top + clearance_z} F{prep_spd_z}
##G1 X{bucket_left_width / 4} F{prep_spd_xy}
G1 X{bucket_left_width * 3} F{prep_spd_xy}
## Restore the gcode state to how it was before the macro.
RESTORE_GCODE_STATE NAME=clean_nozzle
{% else %}
## raise error will stop any macros that clean_nozzle is referenced in from proceeding for safety.
{ action_raise_error("Please home your axes!") }
M117 Please home first!
{% endif %}