diff --git a/HTE750-0-0-23.cfg b/HTE750-0-0-23.cfg index 6a7378d7f198..ce2e02d602ba 100644 --- a/HTE750-0-0-23.cfg +++ b/HTE750-0-0-23.cfg @@ -35,8 +35,13 @@ path: /home/ste/uploads [include stereotech_config/750/module_3d_macros.cfg] [include stereotech_config/750/module_5d.cfg] -[include stereotech_config/750/probe_main.cfg] -[include stereotech_config/750/probe_v3.cfg] +# sections probe +[include stereotech_config/750/calibrate/probe_750.cfg] +[include stereotech_config/750/calibrate/probe_v3.cfg] +[include stereotech_config/calibrate/probe_3d.cfg] +[include stereotech_config/calibrate/probe_5d.cfg] +[include stereotech_config/calibrate/probe_5d_tool.cfg] +[include stereotech_config/calibrate/probe_5d_template.cfg] [include stereotech_config/750/print_macros.cfg] [include stereotech_config/common/variables.cfg] @@ -44,9 +49,8 @@ path: /home/ste/uploads [gcode_macro CONSTANTS] description: Holds printer constants -variable_probe_a_horizontal: 301, 328, 57 -# variable_probe_a_vertical: 301, 328, 107 -variable_probe_a_vertical: 301, 328, 57 +variable_probe_a_horizontal: 303, 329, 57 +variable_probe_a_vertical: 303, 325, 55 variable_offsets_sensor: -60, -6, 29.0 variable_extruder_load_length: 210 variable_extruder1_load_length: 1650 diff --git a/stereotech_config/750/calibrate/probe_750.cfg b/stereotech_config/750/calibrate/probe_750.cfg new file mode 100644 index 000000000000..894e0d10d0cf --- /dev/null +++ b/stereotech_config/750/calibrate/probe_750.cfg @@ -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 diff --git a/stereotech_config/750/calibrate/probe_v3.cfg b/stereotech_config/750/calibrate/probe_v3.cfg new file mode 100644 index 000000000000..79193c069e3a --- /dev/null +++ b/stereotech_config/750/calibrate/probe_v3.cfg @@ -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 %} diff --git a/stereotech_config/750/homing_override.cfg b/stereotech_config/750/homing_override.cfg index 6939579e6651..f1ed1f127f4f 100644 --- a/stereotech_config/750/homing_override.cfg +++ b/stereotech_config/750/homing_override.cfg @@ -1,5 +1,5 @@ [homing_override] -rotate_a: true +rotate_a: false axes: gcode: G28 Z diff --git a/stereotech_config/HTE750-0-0-23.cfg b/stereotech_config/HTE750-0-0-23.cfg index c1273f371393..b27fea1843bc 100644 --- a/stereotech_config/HTE750-0-0-23.cfg +++ b/stereotech_config/HTE750-0-0-23.cfg @@ -29,37 +29,30 @@ path: /home/ste/uploads [include config/common/extruder_macros.cfg] [include config/common/filament_control.cfg] [include config/common/filament_control_second.cfg] - -# sections probe -# [include config/calibrate/probe_5-8-23.cfg] -# [include config/calibrate/probe_3d.cfg] -# [include config/calibrate/probe_5d.cfg] -# [include config/calibrate/probe_5d_tool.cfg] -# [include config/calibrate/probe_5d_template.cfg] -# [include config/calibrate/probe_v2.cfg] -# # sections new probe need adapted its -[include config/750/probe_main.cfg] -[include config/750/probe_v3.cfg] - -# [include config/750/nozzle_offset.cfg] -[include config/common/extruder_macros.cfg] # [include config/750/power_control.cfg] [include config/750/module_3d.cfg] [include config/750/module_3d_macros.cfg] [include config/750/module_5d.cfg] +# sections probe +[include config/750/calibrate/probe_750.cfg] +[include config/750/calibrate/probe_v3.cfg] +[include config/calibrate/probe_3d.cfg] +[include config/calibrate/probe_5d.cfg] +[include config/calibrate/probe_5d_tool.cfg] +[include config/calibrate/probe_5d_template.cfg] + [include config/750/print_macros.cfg] [include config/common/variables.cfg] # [include config/750/diagnostics.cfg] [gcode_macro CONSTANTS] description: Holds printer constants -variable_probe_a_horizontal: 301, 328, 57 -# variable_probe_a_vertical: 301, 328, 107 -variable_probe_a_vertical: 301, 328, 57 +variable_probe_a_horizontal: 303, 329, 57 +variable_probe_a_vertical: 303, 325, 55 variable_offsets_sensor: -60, -6, 29.0 -variable_extruder_load_length: 210 +variable_extruder_load_length: 210 variable_extruder1_load_length: 1650 # variable_path_to_model_nozzle_offset: '/home/ste/klipper/config/common/model_hybrid_nozzle_offset.gcode' gcode: diff --git a/stereotech_config/calibrate/probe_3d.cfg b/stereotech_config/calibrate/probe_3d.cfg index ffde0fe51f61..37631e217334 100644 --- a/stereotech_config/calibrate/probe_3d.cfg +++ b/stereotech_config/calibrate/probe_3d.cfg @@ -2,7 +2,11 @@ description: 3D module calibration gcode: {% if printer["gcode_button five_axis_module"].state == "RELEASED" %} - G0 X197 Y195 F6000 + {% set axis_max = printer.toolhead.axis_maximum %} + {% set offsets = printer.probe.offsets %} + {% set center_probe_x = (axis_max[0] / 2.0) - offsets[0] %} + {% set center_probe_y = (axis_max[1] / 2.0) - offsets[1] %} + G0 X{center_probe_x} Y{center_probe_y} F6000 G0 Z40 F3600 PROBE G91 @@ -12,7 +16,7 @@ gcode: G91 G0 Z30 F3600 G90 - G0 X150 Y50 F3600 + G0 X{center_probe_x + offsets[0]} Y50 F3600 {% endif %} [gcode_macro MODULE_THREE_D_MESH_CALIBRATE] diff --git a/stereotech_config/calibrate/probe_5d.cfg b/stereotech_config/calibrate/probe_5d.cfg index f38ea9d52217..6feb294c4832 100644 --- a/stereotech_config/calibrate/probe_5d.cfg +++ b/stereotech_config/calibrate/probe_5d.cfg @@ -33,7 +33,8 @@ gcode: {% set safe_distance_z = (probe_a_vertical[2] + 70 + offsets[2]) if a_deg == 'A90' else (probe_a_horizontal[2] + 20 + offsets[2]) %} {% set axis = ax[-1] %} {% set positive = 0 if (ax[0] == 'M' or ax[0] == 'Z') else 1 %} - {% if p == 'A' %} + + {% if p == 'A' and target_a == 0.0 %} {% set target_y = target_y - 4 %} {% elif p == 'B' %} {% if target_a == 0.0 and target_c == 0.0 %} @@ -53,11 +54,13 @@ gcode: {% set target_x = target_x + 50 %} {% set target_y = target_y - 4 %} {% endif %} + {% if ax != 'Z' %} {% set target_z = target_z - 6 %} {% else %} {% set target_z = target_z + 20 %} {% endif %} + {% if ax == 'X' %} {% set target_x = target_x - 20 %} {% set axis = 'X' %} diff --git a/stereotech_config/calibrate/probe_5d_template.cfg b/stereotech_config/calibrate/probe_5d_template.cfg index a91145a25c4e..ac4f80c5076a 100644 --- a/stereotech_config/calibrate/probe_5d_template.cfg +++ b/stereotech_config/calibrate/probe_5d_template.cfg @@ -61,6 +61,10 @@ gcode: gcode: {% set set_xy = params.XY|default(0) %} {% set y_shift = 50 if set_xy else 7 %} + ; make a check to avoid collision of the sensor and the template for printer v750 + {% if y_shift == 7 and printer.extruder and printer.extruder1 and printer.extruder2 %} + {% set y_shift = y_shift + 15 %} + {% endif %} {% if printer["gcode_button five_axis_module"].state == "PRESSED" %} G0 X{printer.auto_wcs.wcs[0][0]} Y{printer.auto_wcs.wcs[0][1] - y_shift} Z{printer.auto_wcs.wcs[0][2] + 10} F3600 {% endif %} @@ -126,18 +130,16 @@ gcode: [gcode_macro SET_WCS_FROM_AUTO_WCS] gcode: {% set auto_wcs_params = printer.auto_wcs.wcs %} + {% set max_x = printer.toolhead.axis_maximum[0]|float %} + {% set max_z = printer.toolhead.axis_maximum[2]|float %} G10 L2 P2 X{auto_wcs_params[0][0]} Y{auto_wcs_params[0][1]} Z{auto_wcs_params[0][2]} G10 L2 P4 X{auto_wcs_params[0][0]} Y{auto_wcs_params[0][1]} Z{auto_wcs_params[0][2]} G10 L2 P3 X{auto_wcs_params[1][0]} Y{auto_wcs_params[1][1]} Z{auto_wcs_params[1][2]} G10 L2 P5 X{auto_wcs_params[1][0]} Y{auto_wcs_params[1][1]} Z{auto_wcs_params[1][2]} G90 - G0 Z150 F1500 + G0 Z{max_z / 2.0} F3600 G54 - {% if printer.toolhead.axis_maximum[0] > 250 %} - G0 X150 Y50 F3600 - {% else %} - G0 X100 Y50 F3600 - {% endif %} + G0 X{max_x / 2.0} Y50 F3600 [gcode_macro MOVE_ACCURACY_SET_MODULE_FIVE_D] Description: This macro do moved for accuracy set the module 5d.