Skip to content

STEAPP-625: HTE-630(step-2): adapted 'auto_calibrate' and 'set zero point', added kinematic. #159

Merged
merged 12 commits into from
Aug 21, 2023
4 changes: 2 additions & 2 deletions stereotech_config/probe_2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ gcode:
{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 AUTO_BASEMENT_WCS_MOVE]
description: This macro does a move for measuring wcs_2_y and wcs_1_z-raw mode SPIRAL.
gcode:
Expand All @@ -505,9 +504,10 @@ gcode:
{% set y = wcs_offsets[1] - offsets[1] %}
{% set z = wcs_offsets[2] + offsets[2] %}
{% set a = '0' if wcs == 0 else '90' %}
{% set z = '200' if wcs == 0 else '150' %}
G28 A
G0 A{a} F3600
G0 Z150 F3600
G0 Z{z} F3600
G0 X{x} Y{y} F3600

[gcode_macro CHECK_AXIS_A]
Expand Down
229 changes: 229 additions & 0 deletions stereotech_config/probe_hybrid_printer_v6.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
[gcode_macro PROBE_TEMPLATE_POINT]
description: Macro for calibration template probing
variable_probe_z: 120.0
gcode:
{% set point = params.POINT|default('O') %}
{% set offsets = printer['probe'].offsets %}
{% set O = [161 - offsets[0], 243 - offsets[1], 120] %}
{% if O[1] > 294.0 %}
O[1] = 294.0
{% endif %}
G0 Z150 F3600
G0 A0 C0 F3600
{% set target_x = O[0] %}
{% set target_y = O[1] %}
{% set target_z = O[2] %}
{% set axis = 'Z' %}
{% set positive = 0 %}
{% if point=='AY' %}
{% set target_x = O[0] - 45 %}
{% set target_y = O[1] - 35 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'Y' %}
{% set positive = 1 %}
{% elif point=='CHECK_MODULE_Z1' %}
{% set target_x = O[0] - 45 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z + 5 %}
{% elif point=='CHECK_MODULE_Z2' %}
{% set target_x = O[0] + 45 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z + 5 %}
{% elif point=='AY1' %}
{% set target_x = O[0] - 32 %}
{% set target_y = O[1] - 83 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'Y' %}
{% set positive = 1 %}
G0 C15 F3600
{% elif point=='AY1_2' %}
{% set target_x = O[0] - 32 %}
{% set target_y = O[1] - 15 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'Y' %}
{% set positive = 1 %}
G0 C30
{% elif point=='AY2' %}
{% set target_x = O[0] - 32 %}
{% set target_y = O[1] - 6 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'Y' %}
G0 C15 F3600
{% elif point=='AY2_2' %}
{% set target_x = O[0] - 32 %}
{% set target_y = O[1] + 17 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'Y' %}
G0 C30 F3600
{% elif point=='BY' %}
{% set target_x = O[0] + 45 %}
{% set target_y = O[1] - 35 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'Y' %}
{% set positive = 1 %}
{% elif point=='CY' %}
{% set target_x = O[0] %}
{% set target_y = O[1] - 90 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'Y' %}
{% set positive = 1 %}
{% elif point=='DY' %}
{% set target_x = O[0] %}
{% set target_y = O[1] - 30 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z + 30 %}
{% set axis = 'Y' %}
{% set positive = 1 %}
G0 A90 C30 F3600
{% elif point=='DY_2' %}
{% set target_x = O[0] + 2 %}
{% set target_y = O[1] - 80 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 12 %}
{% set axis = 'Y' %}
{% set positive = 1 %}
G0 A90 C90 F3600
{% elif point=='EY' %}
{% set target_x = O[0] %}
{% set target_y = O[1] + 5 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z + 30 %}
{% set axis = 'Y' %}
G0 A90 C30 F3600
{% elif point=='EY_2' %}
{% set target_x = O[0] + 2 %}
{% set target_y = O[1] + 5 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 12 %}
{% set axis = 'Y' %}
G0 A90 C90 F3600
{% elif point=='AZ' %}
{% set target_x = O[0] - 45 %}
{% elif point=='BZ' %}
{% set target_x = O[0] + 45%}
{% elif point=='CZ' %}
{% set target_y = O[1] - 45 %}
{% elif point=='CZ1' %}
{% set target_y = O[1] - 45 %}
G0 A10 F3600
{% elif point=='DZ' %}
{% set target_x = O[0] %}
{% set target_y = O[1] - 8 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z + 57 %}
G0 A90 C30 F3600
{% elif point=='DZ_2' %}
{% set target_x = O[0] %}
{% set target_y = O[1] - 50 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z + 57 %}
G0 A90 F3600
{% elif point=='EZ' %}
{% set target_x = O[0] %}
{% set target_y = O[1] - 5 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z + 57 %}
G0 A90 F3600
{% elif point=='AX' %}
{% set target_x = O[0] - 80 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'X' %}
{% set positive = 1 %}
{% elif point=='AX1' %}
{% set target_x = O[0] - 40 %}
{% set target_y = O[1] - 45 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'X' %}
{% set positive = 1 %}
{% elif point=='AX2' %}
{% set target_x = O[0] - 80 %}
{% set target_y = O[1] + 2 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'X' %}
{% set positive = 1 %}
{% elif point=='BX' %}
{% set target_x = O[0] + 80 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'X' %}
{% elif point=='BX1' %}
{% set target_x = O[0] + 80 %}
{% set target_y = O[1] - 2 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'X' %}
{% elif point=='BX2' %}
{% set target_x = O[0] + 80 %}
{% set target_y = O[1] + 2 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'X' %}
; skew_correction
; xy skew
{% elif point=='XY1' %}
{% set target_x = O[0] + 15 %}
{% set target_y = O[1] - 50 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'X' %}
{% elif point=='XY2' %}
{% set target_x = O[0] - 15 %}
{% set target_y = O[1] - 50 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'X' %}
{% set positive = 1 %}
; xz skew
{% elif point=='XZ1' %}
{% set target_x = O[0] + 80 %}
{% set target_y = O[1] - 5 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'X' %}
{% elif point=='XZ2' %}
{% set target_x = O[0] - 80 %}
{% set target_y = O[1] - 5 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 6 %}
{% set axis = 'X' %}
{% set positive = 1 %}
{% elif point=='XZ3' %}
{% set target_x = O[0] + 15 %}
{% set target_y = O[1] - 5 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z + 36 %}
{% set axis = 'X' %}
G0 A90 C60
{% elif point=='XZ4' %}
{% set target_x = O[0] - 15 %}
{% set target_y = O[1] - 5 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z + 36 %}
{% set axis = 'X' %}
{% set positive = 1 %}
G0 A90 C60 F3600
; yz skew
{% elif point=='YZ1' %}
{% set target_x = O[0] %}
{% set target_y = O[1] - 60 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z + 36 %}
{% set axis = 'Y' %}
{% set positive = 1 %}
G0 A90 C60 F3600
{% elif point=='YZ2' %}
{% set target_x = O[0] - 45 %}
{% set target_y = O[1] - 60 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z %}
{% set axis = 'Y' %}
{% set positive = 1 %}
G0 A90 C5 F3600
{% elif point=='YZ3' %}
{% set target_x = O[0] + 45 %}
{% set target_y = O[1] - 60 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z %}
{% set axis = 'Y' %}
{% set positive = 1 %}
G0 A90 C-5 F3600
{% elif point=='CX1' %}
{% set target_x = O[0] + 80 %}
{% set target_y = O[1] - 50 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 45 %}
{% set axis = 'X' %}
G0 A90 C-4
{% elif point=='CX2' %}
{% set target_x = O[0] - 80 %}
{% set target_y = O[1] - 50 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 45 %}
{% set axis = 'X' %}
{% set positive = 1 %}
G0 A90 C4
{% endif %}
G0 X{target_x} Y{target_y} F1500
G0 Z{target_z} F1500
PROBE AXIS={axis} POSITIVE_DIR={positive}
G0 X{target_x} Y{target_y} F3600
G0 Z{target_z} F3600
G0 Z150 F3600
G0 A0 C0 F3600
12 changes: 8 additions & 4 deletions stereotech_config/v6/kinematics.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ step_pin: z_step_pin
dir_pin: !z_dir_pin
enable_pin: !z_en_pin
microsteps: 128
rotation_distance: 4
rotation_distance: 2
endstop_pin: z_endstop_pin
position_endstop: 300
position_max: 300
Expand All @@ -48,8 +48,8 @@ dir_pin: a_dir_pin
enable_pin: !a_en_pin
microsteps: 128
rotation_distance: 360
gear_ratio: 80:20
endstop_pin: a_endstop_pin
gear_ratio: 10:1
endstop_pin: !a_endstop_pin
position_endstop: 90
position_min: -10
position_max: 90
Expand All @@ -61,6 +61,10 @@ dir_pin: c_dir_pin
enable_pin: !c_en_pin
microsteps: 128
rotation_distance: 120
gear_ratio: 80:20
gear_ratio: 10:1
# endstop_pin: !c_endstop_pin
# position_endstop: 0
# position_min: 0
# position_max: 120
can_home: false
homing_speed: 20