-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to automatically apply hotend offsets to EVENT_GCODE_TOOLCHANGE #25399
Add option to automatically apply hotend offsets to EVENT_GCODE_TOOLCHANGE #25399
Conversation
Add EVENT_GCODE_TOOLCHANGE_AUTO_HOTEND_OFFSET options
Added apply_hotend_offset_and_run_gcode()
Rename to apply_hotend_offset_process_subcommands_now()
c917142
to
ef6dd4c
Compare
ef6dd4c
to
71360b7
Compare
Q: Under what circumstances will a post-toolchange move want to use something other than the nozzle position as its reference? Is this to accommodate moves that are carriage-relative? Note: Instead of modifying the user's custom G-code before executing it, it would probably be simpler to send a |
@thinkyhead Post toolchange move should use nozzle position as the reference in every case except for moving axes or motors that do not get affected by the change in hotend offset. The toolchange gcode that moves the printhead usually moves the nozzle to specific points relative to the carriage/frame so that the printhead can dock/undock, pickup/drop off, activate lever for tools. I can't think of too many cases where post toolchange move in gcode would not depend on the nozzle position. I tried manually adding a Is there a way to generate a |
73a4702
to
09c48fd
Compare
09c48fd
to
3f5d31f
Compare
@thinkyhead Tested on the actual printer with 2 extruders and confirmed working. |
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Description
This adds the option for firmware to automatically apply hotend offsets to toolchange gcode with a
EVENT_GCODE_TOOLCHANGE_AUTO_HOTEND_OFFSET
option inConfiguration_adv.h
. This feature fixes the missing link betweenHOTEND_OFFSET
andEVENT_GCODE_TOOLCHANGE
so both hotend offset and toolchange gcode can be changed at runtime and during a prints. Turning on this option makes hotend offsets affect toolchange gcode which simplifies the "offset" calculation and saves users massive time.Toolchange gcode to extruders are executed within the offsets of the target hotend. The target hotend is used because the target hotend offset is always known while the previous hotend can be one of multiple hotends and multiple offsets (depending on the number of hotends).
All hotend offsets can be dynamically changed at runtime with M218 or defaults set during compile in
Configuration.h
.Toolchange gcode consists of a sequence of gcode commands of any length. The gcode is set during compile in
Configuration_adv.h
withEVENT_GCODE_TOOLCHANGE_T1
. After testing toolchange gcode with T0 at zero offsets, users need to manually add hotend offsets in every axis for every individual gcode command inEVENT_GCODE_TOOLCHANGE_T1
. In the below, the commentedEVENT_GCODE_TOOLCHANGE_T1
can be easily developed and manually tested by the user in a safe zero offset environment (T0). There is currently no way to change toolchange gcode at runtime. The uncommentedEVENT_GCODE_TOOLCHANGE_T1
is the actual gcode that must be hard coded into the firmware and can't be changed by the user while using the printer. When the user calibrates and adjusts their hotend offsets by actively using the printer, they can adjust hotend offset withM218
but any hotend offset changes are not reflected inEVENT_GCODE_TOOLCHANGE_T1
so the toolchange gcode will always have the wrong "offset" after usingM218
until the user manually calculates new gcode and has access to a compiler.M218
not useful for users without automatic toolchange gcode adjustment because any hotend offset adjustment requires manual gcode editing and compiling.Requirements
Requires more than 1 extruder with offsets.
Benefits
See above.
This addresses the issue where users with toolchange gcode must change 2 settings (hotend offset + toolchange gcode) to actually change 1 setting (toolchange with offset hotends).
Configurations
Configuration.zip
Related Issues
This PR is compatible with #24553