v2.4: recalibrate all the positions

This commit is contained in:
Konstantin Koslowski 2021-11-14 20:18:34 +01:00
parent ace55b8a4b
commit 63465ae331
5 changed files with 71 additions and 59 deletions

View file

@ -18,7 +18,7 @@
gcode:
{% set x0=200 %}
{% set x1=250 %}
{% set y0=306 %}
{% set y0=310 %}
{% set z0=1 %}
{% set z_hop = printer['gcode_macro _USER_VARIABLE'].z_hop|int %}
{% if "xyz" in printer.toolhead.homed_axes %}
@ -80,7 +80,7 @@ gcode:
{% set z_safe = max_z - act_z %}
{% endif %}
G91
G0 Z{z_safe} F900
G0 Z{z_safe} F1200
G90
G0 X{x_park} Y{y_park} F6000
{% else %}
@ -117,6 +117,7 @@ gcode:
{% set BED=params.BED|default(100)|int %}
{% set EXTRUDER=params.EXTRUDER|default(250)|int %}
{% set CHAMBER=params.CHAMBER|default(0)|int %}
{% set SHEET=params.SHEET|default("default")|string %}
{% set QGL=params.QGL|default(1)|int %}
{% set BMC=params.BMC|default(0)|int %}
{% set PURGE=params.PURGE|default(1)|int %}
@ -124,9 +125,9 @@ gcode:
{% set Z_ADJUST=params.Z_ADJUST|default(0.0)|float %}
# TODO: ERCF
{% set ERCF=params.ERCF|default(0) %}
{action_respond_info("starting print BED=%d, EXTRUDER=%d, CHAMBER=%d, QGL=%d, BMC=%d, PURGE=%d, SOAK=%d, Z_AJUST=%f" % (BED, EXTRUDER, CHAMBER, QGL, BMC, PURGE, SOAK, Z_ADJUST))}
{action_respond_info("starting print BED=%d, EXTRUDER=%d, CHAMBER=%d, SHEET=%s, QGL=%d, BMC=%d, PURGE=%d, SOAK=%d, Z_AJUST=%f" % (BED, EXTRUDER, CHAMBER, SHEET, QGL, BMC, PURGE, SOAK, Z_ADJUST))}
M117 > configuring
SET_LED LED=caselight RED=0.00 GREEN=0.00 BLUE=0.50
SET_LED LED=caselight RED=0.50 GREEN=0.50 BLUE=0.50
G4 P2000
SET_GCODE_OFFSET Z=0.0 # reset z offset
M140 S{BED} # start bed heating
@ -137,7 +138,6 @@ gcode:
M83 # use relative distances for extrusion
M117 > homing
SET_LED LED=caselight RED=0.00 GREEN=0.50 BLUE=0.00
G4 P2000
{% if BMC %}
BED_MESH_CLEAR
@ -156,12 +156,11 @@ gcode:
M117 > bed mesh calibrate
BED_MESH_CALIBRATE
{% else %}
M117 > bed mesh load
BED_MESH_PROFILE LOAD=default
M117 > bed mesh load {SHEET}
BED_MESH_PROFILE LOAD={SHEET}
{% endif %}
M117 > heating
SET_LED LED=caselight RED=0.50 GREEN=0.00 BLUE=0.00
G4 P2000
G92 E0 # reset extruder
M190 S{BED} # set and wait for bed temperature
@ -175,7 +174,6 @@ gcode:
M117 > starting
SET_PRESSURE_ADVANCE ADVANCE=0.05
SET_GCODE_OFFSET Z_ADJUST={params.Z_ADJUST|default(0.0)|float} MOVE=1
SET_LED LED=caselight RED=0.50 GREEN=0.50 BLUE=0.50
G4 P2000
{% if PURGE %}
PURGE_NOZZLE
@ -199,16 +197,18 @@ gcode:
gcode:
{% set x0=params.x0|default(100) %}
{% set x1=params.x1|default(200) %}
{% set y0=params.y0|default(0) %}
{% set y1=params.y1|default(0.8) %}
{% set y0=params.y0|default(2) %}
{% set y1=params.y1|default(3) %}
{% set z_hop = printer['gcode_macro _USER_VARIABLE'].z_hop|int %}
M117 > purge nozzle
G0 Z{z_hop} F300 # move Z to travel height
G0 X{x0} Y{y0} F5000 # move to x0/y0
G0 Z0.2 F1500 # lower Z
G0 Z0.24 F300 # lower Z
G0 X{x1} E20 # draw line
G0 Y{y1} # move to y1
G0 X{x0} E10 # draw fine line
G0 X{x0-10} # move a little further
G0 E-3 # retract filament
G0 Z{z_hop} F300 # move Z to travel height

View file

@ -26,6 +26,9 @@ gcode:
{action_respond_info("CALIBRATE_Z: High must be above %.2f" % z_hop)}
G1 Z{z_hop} F900 ; move head up
{% endif %}
{% if printer.quad_gantry_level.applied|lower == 'false' %}
QUAD_GANTRY_LEVEL PARK=false
{% endif %}
#ATTACH_PROBE ; if not using start_gcode
_CALIBRATE_Z_BASE
#DETACH_PROBE ; if not using end_gcode

View file

@ -26,9 +26,9 @@
## [E in MOTOR6] - Extruder
## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify
##--------------------------------------------------------------------
# serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_1E0030000E5053424E363620-if00
serial: /dev/serial0
restart_method: command
serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_1E0030000E5053424E363620-if00
# serial: /dev/serial0
# restart_method: command
##--------------------------------------------------------------------
@ -51,15 +51,18 @@ gcode:
G0 Z10 F{speed}
[gcode_macro foo]
gcode:
{% set SENSOR = params.SENSOR|default("bme280 chamber")|string %}
{action_respond_info("sensor: %s, qgl: %s" % (SENSOR, printer.quad_gantry_level.applied))}
[printer]
kinematics: corexy
max_velocity: 300
max_velocity: 500
## regular
max_accel: 3000 # Max 4000
max_accel: 3000
max_accel_to_decel: 1500 # default half of max_accel
## input_shaper
# max_accel: 7000
# max_accel_to_decel: 3500
##
max_z_velocity: 30 # Max 15 for 12V TMC Drivers, can increase for 24V
max_z_accel: 500
@ -89,12 +92,12 @@ dir_pin: !PF12
enable_pin: !PF14
rotation_distance: 40
microsteps: 16
full_steps_per_rotation: 400 # 1.8 deg stepper: 200, 0.9 deg stepper
full_steps_per_rotation: 400 # 200: 1.8 deg stepper, 400: 0.9 deg stepper
endstop_pin: PG6
position_min: 0
position_endstop: 300
position_max: 300
homing_speed: 30 # speed: mm/sec, feedrate: mm/min
homing_speed: 30 # speed: mm/sec, feedrate: mm/min
homing_retract_dist: 5
homing_positive_dir: true
@ -116,8 +119,8 @@ microsteps: 16
full_steps_per_rotation: 400 # 200: 1.8 deg stepper, 400: 0.9 deg stepper
endstop_pin: PG9
position_min: 0
position_endstop: 305
position_max: 306
position_endstop: 307
position_max: 310
homing_speed: 30 # Max 100
homing_retract_dist: 5
homing_positive_dir: true
@ -149,7 +152,8 @@ position_endstop: 0.5
position_max: 290
position_min: -5
homing_speed: 13.0 # speed: mm/sec, feedrate: mm/min
second_homing_speed: 3
homing_retract_speed: 10
second_homing_speed: 2
homing_retract_dist: 3
[tmc2209 stepper_z]
@ -283,25 +287,6 @@ max_temp: 120
#pid_kd: 363.769
#####################################################################
# Probe
#####################################################################
[probe]
## Microswitch probe
pin: ^PG11
x_offset: 0
y_offset: 30
z_offset: 12
speed: 3
lift_speed: 25
samples: 5
samples_result: median
sample_retract_dist: 2.0
samples_tolerance: 0.01
samples_tolerance_retries: 5
#####################################################################
# Filament Sensor
#####################################################################
@ -357,6 +342,25 @@ timeout: 1800
# z_hop: 10
# z_hop_speed: 25
#####################################################################
# Probe
#####################################################################
[probe]
## Microswitch probe
pin: ^PG11
x_offset: 0
y_offset: 30
z_offset: 12
lift_speed: 20
samples: 3
samples_result: median
sample_retract_dist: 2
samples_tolerance: 0.01
samples_tolerance_retries: 5
[bed_mesh]
speed: 500
horizontal_move_z: 12
@ -373,11 +377,15 @@ algorithm: bicubic
# probe_count: 3,3
# relative_reference_index: 4
# probe_count: 5,5
# relative_reference_index: 9
probe_count: 9,9
relative_reference_index: 40
# relative_reference_index: 12
probe_count: 7,7
relative_reference_index: 24
# probe_count: 9,9
# relative_reference_index: 40
[quad_gantry_level]
speed: 150
horizontal_move_z: 12
gantry_corners:
-60,-10
360,370
@ -386,8 +394,6 @@ points:
40,260
260,260
260,40
speed: 150
horizontal_move_z: 12
retries: 5
retry_tolerance: 0.0075
max_adjust: 10

View file

@ -1,3 +1,8 @@
# override printer
[printer]
max_accel: 10000
max_accel_to_decel: 5000
[mcu nano]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0

View file

@ -5,7 +5,7 @@
description: Helper: Contains User defined printer variables
##### Homing and general movement #####
variable_z_endstop_x: 94.5 ; z Endstop x position inside right profile
variable_z_endstop_y: 305 ; z Endstop y position
variable_z_endstop_y: 310 ; z Endstop y position
variable_z_hop: 12 ; z hop for moves e.g homing
variable_xy_home_current: 0.5 ; reduced homing current for x and y
variable_z_home_current: 0.4 ; reduced homing current for z
@ -14,8 +14,8 @@ variable_home_accel: 1000 ; reduced ACCEL for homing
variable_probe_dock_x: 52 ; x toolhead position before docking probe
variable_probe_dock_y: 250 ; y toolhead position before docking probe
variable_probe_dock_z: 12 ; z toolhead position before docking probe (only for bed dock)
variable_probe_undock_x: 120 ; x toolhead position after docking probe
variable_probe_undock_y: 305 ; y toolhead position after docking probe
variable_probe_undock_x: 110 ; x toolhead position after docking probe
variable_probe_undock_y: 309 ; y toolhead position after docking probe
variable_probe_undock_z: 12 ; z toolhead position after docking probe (only for bed dock)
variable_probe_z_min: 12 ; z minimum height to avoid crash
variable_probe_travel_speed: 100 ; dock moves travel speed
@ -36,11 +36,11 @@ gcode:
# The X and Y coordinates (in mm) for clicking the nozzle on the
# Z endstop.
probe_nozzle_x: 94.5
probe_nozzle_y: 305
probe_nozzle_y: 310
# The X and Y coordinates (in mm) for clicking the probe's switch
# on the Z endstop.
probe_switch_x: 90
probe_switch_y: 284
probe_switch_y: 290
# The X and Y coordinates (in mm) for probing on the print surface
# (e.g. the center point) These coordinates will be adapted by the
# probe's X and Y offsets. The default is the relative_reference_index
@ -52,7 +52,7 @@ probe_bed_y: 150
# The trigger point offset of the used mag-probe switch.
# This needs to be fined out manually. More on this later
# in this section. smaller switch_offset -> more distance to the build plate
switch_offset: 0.72
switch_offset: 0.59
# The maximum allowed deviation of the calculated offset.
# If the offset exceeds this value, it will stop!
# The default is 1.0 mm.
@ -145,11 +145,9 @@ gcode:
{% endif %}
## XY Location of the Z Endstop Switch
# TODO check speed
# G0 X{z_endstop_x} Y{z_endstop_y} F12000
G0 X{z_endstop_x} Y{z_endstop_y} F6000
G28 Z ; home Z
G0 Z2 F1500 ; move up
G28 Z ; home Z
G0 Z3 F1500 ; move up
## return to org current settings
{% if params.RESET_SETTINGS|default('true') == 'true' %}