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.
STEAPP-651: added new config for auto calibrate, change start point f…
…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
1 parent
f5188a3
commit 8e2ffa7
Showing
3 changed files
with
230 additions
and
1 deletion.
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,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 |
File renamed without changes.