Skip to content

_LINEAR_EXIT restore_z to z0 Fix - #46

Open
3DPrintDemon wants to merge 1 commit into
BondtechAB:mainfrom
3DPrintDemon:z_restore_to_z0_fix
Open

_LINEAR_EXIT restore_z to z0 Fix#46
3DPrintDemon wants to merge 1 commit into
BondtechAB:mainfrom
3DPrintDemon:z_restore_to_z0_fix

Conversation

@3DPrintDemon

Copy link
Copy Markdown

If you press T(n) from an un-homed state with a homing override macro that uses SET_KINEMATIC_POSITION Z=0 in any way to lift the toolhead before G28 homing, line 352 of the current index-tc-macros.cfg can potentially set the restore_z position to 0.000 when the CHANGE_TOOL macro evaluates. See photo.

add M118 restore_z saw {restore_z}mm after line 352 to test.

Restore to Z0

This will then proceed to lower the nozzle to the bed (Z0) after the _LINEAR_EXIT macro completes. As the current line 239 sees 0.00 as not "" so passes that command of G0 Z0.000 to the _TC_G0 macro for execution - but can't tell if it's potentially destructive or not.

This way if restore_z is passed as 0.000 it is simply not actioned as this outcome is obviously undesirable.

Comment thread macros/indx-tc-macros.cfg
{% set tp = printer["gcode_macro TOOL_POSITIONS"] %}
{% set c = printer["gcode_macro _INDX_CONSTANTS"] %}
{% set restore_z = params.RESTORE_Z|default("")|string %}
{% set restore_z = params.RESTORE_Z|default(0)|float %}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants