homing.cfg modified - 17/04/25 - 09:40:25
This commit is contained in:
1 parent
b039447217
commit
953bb3e824
2 files changed
No files matched your search
@@ -1,110 +0,0 @@
|
||||
[bed_mesh]
|
||||
mesh_min = 10, 40
|
||||
mesh_max = 340, 335
|
||||
speed = 200
|
||||
horizontal_move_z = 2
|
||||
probe_count = 10,10
|
||||
algorithm = bicubic
|
||||
zero_reference_position = 175, 175
|
||||
##[(7x7)-1] / 2 = 24
|
||||
##[(5x5)-1] / 2 = 12
|
||||
##[(9x9)-1] / 2 = 40
|
||||
#relative_reference_index: 40
|
||||
#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 %}
|
||||
@@ -1,95 +0,0 @@
|
||||
# Note you may need to add the following to your printer.cfg somewhere (without the comments of course) for the Kinematic position stuff below to work.
|
||||
#[force_move]
|
||||
#enable_force_move: True
|
||||
|
||||
#[safe_z_home]
|
||||
#home_xy_position: 175, 175
|
||||
#speed: 150.0
|
||||
#z_hop: 2
|
||||
#z_hop_speed: 15.0
|
||||
#move_to_previous: False
|
||||
|
||||
[gcode_macro _HOME_X]
|
||||
gcode:
|
||||
# Home
|
||||
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
|
||||
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
|
||||
{% set HOME_CURRENT = 0.49 %}
|
||||
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
|
||||
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
|
||||
|
||||
SET_KINEMATIC_POSITION X=5
|
||||
G91
|
||||
G1 X-5 F1200
|
||||
|
||||
#G4 P2000
|
||||
#M400 to finish all pending moves/process the buffer
|
||||
M400
|
||||
G28 X
|
||||
|
||||
# Move away
|
||||
G91
|
||||
G1 X-5 F1200
|
||||
|
||||
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
|
||||
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
|
||||
|
||||
[gcode_macro _HOME_Y]
|
||||
gcode:
|
||||
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
|
||||
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
|
||||
{% set HOME_CURRENT = 0.49 %}
|
||||
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
|
||||
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
|
||||
|
||||
SET_KINEMATIC_POSITION Y=5
|
||||
G91
|
||||
G1 Y-5 F1200
|
||||
|
||||
#G4 P2000
|
||||
#M400 to finish all pending moves/process the buffer
|
||||
M400
|
||||
|
||||
# Home
|
||||
G28 Y
|
||||
# Move away
|
||||
G91
|
||||
G1 Y-5 F1200
|
||||
|
||||
# Wait just a second… (give StallGuard registers time to clear)
|
||||
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
|
||||
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
|
||||
|
||||
[homing_override]
|
||||
axes: xyz
|
||||
gcode:
|
||||
{% set home_all = 'X' not in params and 'Y' not in params and 'Z' not in params %}
|
||||
|
||||
SET_KINEMATIC_POSITION Z=0
|
||||
G1 Z5 F1200
|
||||
|
||||
{% if home_all or 'X' in params %}
|
||||
_HOME_X
|
||||
{% endif %}
|
||||
|
||||
{% if home_all or 'Y' in params %}
|
||||
_HOME_Y
|
||||
{% endif %}
|
||||
|
||||
{% if home_all or 'Z' in params %}
|
||||
|
||||
G90
|
||||
G1 X{ printer.toolhead.axis_maximum.x/2 } Y{ printer.toolhead.axis_maximum.y/2 } F4500
|
||||
|
||||
G28 Z
|
||||
|
||||
G1 Z10 F1500
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro _CG28]
|
||||
description: Homing only if necessary
|
||||
gcode:
|
||||
{% if "xyz" not in printer.toolhead.homed_axes %}
|
||||
G28
|
||||
{% endif %}
|
||||
Reference in new issue
Block a user