Skip to content

Commit

Permalink
STEAPP-651: added new config for auto calibrate, change start point f…
Browse files Browse the repository at this point in the history
…or axis X. (#164)

* STEAPP-651: added new config for auto calibrate, change start point for axis X.

* STEAPP-651: moved config to folder the v6
  • Loading branch information
SokolovJek authored Aug 31, 2023
1 parent f5188a3 commit 8e2ffa7
Show file tree
Hide file tree
Showing 3 changed files with 230 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stereotech_config/HFE530-5-8-23.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ path: /home/ste/uploads

[include config/printhead.cfg]
[include config/probe_2.cfg]
[include config/probe_fiber_printer.cfg]
[include config/probe_fiber_printer_3.cfg]

[include config/main_extruder.cfg]
[include config/fiber_extruder_3.cfg]
Expand Down
229 changes: 229 additions & 0 deletions stereotech_config/probe_fiber_printer_3.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 = [160 - offsets[0], 243 - offsets[1], 120] %}
{% if O[1] > 294.0 %}
{% set O = [160 - offsets[0], 294, 120] %}
{% endif %}
G0 Z120 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] + 16 %}
{% 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] - 40 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z + 28.5 %}
{% 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 + 28.5 %}
{% 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] - 10 %}
{% 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] - 30 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 2 %}
{% set axis = 'Y' %}
{% set positive = 1 %}
G0 A90 C5 F3600
{% elif point=='YZ3' %}
{% set target_x = O[0] + 45 %}
{% set target_y = O[1] - 30 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 2 %}
{% 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] - 11 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 17.5 %}
{% set axis = 'X' %}
G0 A90
{% elif point=='CX2' %}
{% set target_x = O[0] - 80 %}
{% set target_y = O[1] - 11 %}
{% set target_z = printer['gcode_macro PROBE_TEMPLATE_POINT'].probe_z - 17.5 %}
{% set axis = 'X' %}
{% set positive = 1 %}
G0 A90
{% endif %}
G0 X{target_x} Y{target_y} F3600
G0 Z{target_z} F3600
PROBE AXIS={axis} POSITIVE_DIR={positive}
G0 X{target_x} Y{target_y} F3600
G0 Z{target_z} F3600
G0 Z120 F3600
G0 A0 C0 F3600

0 comments on commit 8e2ffa7

Please sign in to comment.