Skip to content

STEAPP-513: added park the axes A in auto calibrate after set template. #130

Merged
merged 3 commits into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 2 additions & 224 deletions stereotech_config/probe.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -106,234 +106,11 @@ gcode:
BED_MESH_CLEAR
{% endif %}

[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 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=='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] - 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] - 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

[gcode_macro CALIBRATE_MODULE_FIVE_D]
description: 5D module calibration
gcode:
{% if printer["gcode_button five_axis_module"].state == "PRESSED" %}
G28 A
M204 S500
G0 C0.1
G0 C0
Expand Down Expand Up @@ -680,6 +457,7 @@ description: This macro performs move based on the required measuring(wcs1_z, wc
gcode:
{% set wcs = params.WCS|default(0)|int %}
{% set probe_sensor_version = printer.save_variables.variables.probe_sensor_version|default(0)|int %}
G28 A
{% if wcs == 0 %}
{% if probe_sensor_version %}
; move for measuring wcs_1_z
Expand Down