Skip to content

STEAPP-512: added move for adjust nozzle offset. #133

Merged
merged 5 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
20 changes: 20 additions & 0 deletions stereotech_config/fiber_nozzle_offset.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3937,3 +3937,23 @@ gcode:
{% set value = params.VALUE|default(8)|int %}
{% set offset = 0.7 + 0.1 * (value - 1) * -1 %}
SET_GCODE_VARIABLE MACRO=SET_NOZZLE_OFFSET VARIABLE=offset_{axis} VALUE={offset}

[gcode_macro ADJUST_NOZZLE_OFFSET_Z]
gcode:
G28 A
M204 S500
G0 C0.1
G0 C0
PROBE_TEMPLATE_POINT
MOVE_NOZZLE_OFFSET_Z

[gcode_macro MOVE_NOZZLE_OFFSET_Z]
gcode:
{% set point = printer.probe.last_result %}
{% set offsets = printer.probe.offsets %}
{% set x = 145 %}
{% set y = 240 %}
{% set z = point[2] - offsets[2] + 10 %}
G1 A0
G1 X{x} Y{y}
G1 Z{z}
20 changes: 20 additions & 0 deletions stereotech_config/nozzle_offset.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,23 @@ gcode:
{% set value = params.VALUE|default(8)|int %}
{% set offset = -0.7 + 0.1 * (value - 1) %}
SET_GCODE_VARIABLE MACRO=SET_NOZZLE_OFFSET VARIABLE=offset_{axis} VALUE={offset}

[gcode_macro ADJUST_NOZZLE_OFFSET_Z]
gcode:
G28 A
SokolovJek marked this conversation as resolved.
Show resolved Hide resolved
M204 S500
G0 C0.1
G0 C0
PROBE_TEMPLATE_POINT
MOVE_NOZZLE_OFFSET_Z

[gcode_macro MOVE_NOZZLE_OFFSET_Z]
gcode:
{% set point = printer.probe.last_result %}
{% set offsets = printer.probe.offsets %}
{% set x = 145 %}
{% set y = 240 %}
{% set z = point[2] - offsets[2] + 10 %}
G1 A0
G1 X{x} Y{y}
G1 Z{z}