forked from Klipper3d/klipper
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #231 from stereotech/STEAPP-851
STEAPP-851: Made changes to the auto-calibration algorithm in the configuration of the 750th printer
- Loading branch information
Showing
8 changed files
with
283 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
[probe] | ||
pin: !manta_mcu:probe_pin | ||
samples: 4 | ||
samples_tolerance_retries: 1 | ||
samples_result: median | ||
lift_speed: 10.0 | ||
x_offset: 0.0 | ||
y_offset: 0.0 | ||
z_offset: 0.0 | ||
|
||
[bed_mesh] | ||
speed: 120 | ||
horizontal_move_z: 180 | ||
mesh_min: 120, 10 | ||
mesh_max: 480, 530 | ||
probe_count: 6, 6 | ||
fade_start: 1 | ||
fade_end: 10 | ||
fade_target: 0 | ||
algorithm: bicubic | ||
mesh_pps: 1, 1 | ||
|
||
[bed_mesh module_3d] | ||
version = 1 | ||
points = | ||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0 | ||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0 | ||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0 | ||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0 | ||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0 | ||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0 | ||
x_count = 6 | ||
y_count = 6 | ||
mesh_x_pps = 1 | ||
mesh_y_pps = 1 | ||
algo = bicubic | ||
tension = 0.2 | ||
min_x = 120.0 | ||
max_x = 480.0 | ||
min_y = 10.0 | ||
max_y = 530.0 | ||
|
||
[skew_correction] | ||
|
||
[b_axis_compensation] | ||
|
||
[c_axis_align] | ||
|
||
[auto_wcs] | ||
|
||
[skew_correction module_3d] | ||
xy_skew = 0.0 | ||
xz_skew = 0.0 | ||
yz_skew = 0.0 | ||
|
||
[skew_correction module_5d] | ||
xy_skew = 0.0 | ||
xz_skew = 0.0 | ||
yz_skew = 0.0 | ||
|
||
[gcode_macro TEST_PROBE] | ||
gcode: | ||
QUERY_PROBE | ||
UPDATE_DELAYED_GCODE ID=test_probe_loop DURATION=1.0 | ||
|
||
[gcode_macro CANCEL_TEST_PROBE] | ||
gcode: | ||
UPDATE_DELAYED_GCODE ID=test_probe_loop DURATION=0.0 | ||
{action_respond_info('Abort check loop')} | ||
|
||
[delayed_gcode test_probe_loop] | ||
gcode: | ||
{% if printer["probe"].last_query %} | ||
UPDATE_DELAYED_GCODE ID=test_probe_loop DURATION=0.0 | ||
{action_respond_info('Probe pressed, abort check loop')} | ||
{% else %} | ||
{action_respond_info('Probe not pressed')} | ||
QUERY_PROBE | ||
UPDATE_DELAYED_GCODE ID=test_probe_loop DURATION=1.0 | ||
{% endif %} | ||
|
||
[gcode_macro AUTO_WCS] | ||
gcode: | ||
AUTO_WCS_OFFSET_V2 | ||
|
||
[gcode_macro AUTO_BASEMENT_WCS] | ||
gcode: | ||
AUTO_BASEMENT_WCS_V2 {rawparams} | ||
MOVE_SERVICE_POSITION_HEAD PARKING=0 | ||
|
||
[gcode_macro ADJUST_BASEMENT_WCS] | ||
gcode: | ||
; pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
[gcode_macro AUTO_WCS_OFFSET_V2] | ||
description: macro do move for measuring and calculated WCS. Sensor DAC_v_2 | ||
gcode: | ||
{% if printer["gcode_button five_axis_module"].state == "PRESSED" %} | ||
; get wcs3_z | ||
PROBE_TEMPLATE_POINT POINT=A_Z | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=0 | ||
; get wcs3_y | ||
PROBE_TEMPLATE_POINT POINT=B_MY_A0_C30 | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=7 | ||
PROBE_TEMPLATE_POINT POINT=B_Y_A0_C30 | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=1 | ||
; get wcs3_x | ||
PROBE_TEMPLATE_POINT POINT=C_X | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=2 | ||
PROBE_TEMPLATE_POINT POINT=D_MX | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=3 | ||
# get wcs4_z | ||
PROBE_TEMPLATE_POINT POINT=A_Z_A90 | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=4 | ||
# get wcs4_y | ||
PROBE_TEMPLATE_POINT POINT=B_Y_A90_C60 | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=5 | ||
PROBE_TEMPLATE_POINT POINT=B_MY_A90_C60 | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=6 | ||
# get wcs4_x | ||
PROBE_TEMPLATE_POINT POINT=B_MX_A90_C60 | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=8 | ||
PROBE_TEMPLATE_POINT POINT=B_X_A90_C60 | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=9 | ||
; calculating start wcs coordinates | ||
{% set template_thickness = printer.save_variables.variables.template_thickness|default(10.0)|float %} | ||
{% set auto_wcs_adj = printer.save_variables.variables.auto_wcs_adj|default(0.0)|float %} | ||
CALC_WCS_PARAMS THICKNESS={ template_thickness } ADJUSTMENT={ auto_wcs_adj } SENSOR_VERSION=1 | ||
{% endif %} | ||
|
||
[gcode_macro AUTO_BASEMENT_WCS_V2] | ||
description: macro do main moves for get wcs for SPIRAL and FULL modes. | ||
gcode: | ||
RESET_WCS | ||
SET_GCODE_VARIABLE MACRO=CALC_TOOL_PARAMS VARIABLE=length VALUE=999.0 | ||
SET_GCODE_VARIABLE MACRO=CALC_TOOL_PARAMS VARIABLE=radius VALUE=999.0 | ||
{% set wcs = params.WCS|default(0)|int %} | ||
{% if wcs == 0 %} | ||
MOVE_AUTOCALIBRATE_FULL_V2 | ||
{% else %} | ||
MOVE_AUTOCALIBRATE_SPIRAL_V2 | ||
{% endif %} | ||
SET_GCODE_VARIABLE MACRO=CALC_TOOL_PARAMS VARIABLE=length VALUE=999.0 | ||
SET_GCODE_VARIABLE MACRO=CALC_TOOL_PARAMS VARIABLE=radius VALUE=999.0 | ||
|
||
[gcode_macro MOVE_AUTOCALIBRATE_FULL_V2] | ||
description: macro do move for measuring and calculated WCS for FULL-SPIRAL mode. Sensor DAC_v_2 | ||
gcode: | ||
{% set max_z = printer.toolhead.axis_maximum[2]|float %} | ||
; set approximate radius, length and measuring the wcs_1_z | ||
CALC_TOOL_PARAMS LENGTH=1 APPROXIMATE_RADIUS=1 | ||
; checking and apply offset for axis A | ||
ALIGN_A_AXIS_TOOL | ||
; move for measuring the wcs_2_y | ||
PROBE_TOOL_POINT POINT=A_Y_A90 | ||
ADJUST_BASEMENT_WCS_V2 WCS=2 | ||
; move for measuring the wcs_2_x | ||
PROBE_TOOL_POINT POINT=A_X_A90 | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=0 | ||
PROBE_TOOL_POINT POINT=A_MX_A90 | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=1 | ||
CALC_WCS_TOOL WCS=2 AXIS=0 ADJUST=1 | ||
; set radius and measuring the wcs_2_z | ||
CALC_TOOL_PARAMS APPROXIMATE_RADIUS=1 RADIUS=1 | ||
; move for measuring the wcs_1_x | ||
PROBE_TOOL_POINT POINT=A_X | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=0 | ||
PROBE_TOOL_POINT POINT=A_MX | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=1 | ||
CALC_WCS_TOOL WCS=1 AXIS=0 ADJUST=1 | ||
; move for measuring the wcs_1_y | ||
PROBE_TOOL_POINT POINT=A_Y | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=0 | ||
PROBE_TOOL_POINT POINT=A_MY | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=1 | ||
CALC_WCS_TOOL WCS=1 AXIS=1 ADJUST=1 | ||
; eccentricity correction | ||
APPLY_ECCENTRICITY | ||
; check skew axis X | ||
CHECK_SKEW_TOOL | ||
|
||
[gcode_macro MOVE_AUTOCALIBRATE_SPIRAL_V2] | ||
description: macro do move for measuring and calculated WCS for SPIRAL mode. Sensor DAC_v_2 | ||
gcode: | ||
{% set max_z = printer.toolhead.axis_maximum[2]|float %} | ||
PROBE | ||
G91 | ||
G1 Z25 F1500 | ||
G90 | ||
; set the wcs_1_z and wcs_2_y | ||
ADJUST_BASEMENT_WCS_V2 WCS=1 | ||
; set approximate radius and length | ||
CALC_TOOL_PARAMS LENGTH=1 APPROXIMATE_RADIUS=1 LEN_PROBE=0 APPROXIMATE_RADIUS_PROBE=0 | ||
; move to calculate wcs by tool | ||
MOVE_MEASURING_SPIRAL | ||
|
||
[gcode_macro MOVE_MEASURING_SPIRAL] | ||
description: This macro do move and calculate wcs for SPIRAL mode. | ||
gcode: | ||
{% set radius = printer['gcode_macro CALC_TOOL_PARAMS'].radius|float %} | ||
{% set tool_length = printer['gcode_macro CALC_TOOL_PARAMS'].length|float %} | ||
{% if radius < 5.0 and tool_length > 35.0 %} | ||
; checking and apply offset for axis A | ||
ALIGN_A_AXIS_TOOL | ||
; move for measuring the wcs_2_x | ||
PROBE_TOOL_POINT POINT=A_X_A90 | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=0 | ||
PROBE_TOOL_POINT POINT=A_MX_A90 | ||
SET_POINT MACRO=SAVE_WCS_CALC_POINT POINT=1 | ||
CALC_WCS_TOOL WCS=2 AXIS=0 ADJUST=1 | ||
; set precise radius and set the wcs_2_z | ||
CALC_TOOL_PARAMS APPROXIMATE_RADIUS=1 RADIUS=1 | ||
; check skew axes | ||
CHECK_SKEW_TOOL | ||
{% else %} | ||
{action_respond_info("Radius greater than 5 mm or tool length less 35mm, movement to calculate wcs by tool is not available. Wcs will be calculated from the template.")} | ||
{% endif %} | ||
|
||
[gcode_macro ADJUST_BASEMENT_WCS_V2] | ||
gcode: | ||
{% set wcs = params.WCS|default(0)|int %} | ||
{% set point = printer.probe.last_result %} | ||
{% set offsets = printer.probe.offsets %} | ||
{% set wcs_0 = printer.gcode_move.wcs_offsets[3] %} | ||
{% set x = point[0] + offsets[0] - printer.gcode_move.homing_origin.x %} | ||
{% set y = point[1] + offsets[1] - printer.gcode_move.homing_origin.y %} | ||
{% set z = point[2] - offsets[2] - printer.gcode_move.homing_origin.z %} | ||
{% set wcs_1 = printer.gcode_move.wcs_offsets[4] %} | ||
{% set old_z = wcs_0[2] %} | ||
{% set old_y = wcs_1[1] %} | ||
{% set probe_backlash_y = printer.auto_wcs.probe_backlash_y|default(0.0)|float %} | ||
{% set tool_length = printer['gcode_macro CALC_TOOL_PARAMS'].length|float %} | ||
{% set radius = printer['gcode_macro CALC_TOOL_PARAMS'].radius %} | ||
{% set auto_wcs_adj = printer.save_variables.variables["auto_wcs_adj"]|default(0.0)|float %} | ||
{% if wcs == 0 %} | ||
G10 L2 P2 Z{z + auto_wcs_adj} | ||
G10 L2 P3 Y{old_y - (z - old_z)} | ||
{% elif wcs == 1 %} | ||
G10 L2 P3 Y{y} | ||
G10 L2 P2 Z{old_z - (y - old_y)} | ||
{% elif wcs == 2 %} | ||
G10 L2 P3 Y{y + probe_backlash_y} | ||
{% elif wcs == 3 %} | ||
G10 L2 P3 Z{z - radius + auto_wcs_adj} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[homing_override] | ||
rotate_a: true | ||
rotate_a: false | ||
axes: | ||
gcode: | ||
G28 Z | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.