-
-
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
Make switching toolhead compatible with cartesian printers #26956
base: bugfix-2.1.x
Are you sure you want to change the base?
Make switching toolhead compatible with cartesian printers #26956
Conversation
I was having trouble understanding why it wouldn't work with cartesian printers, but I think I understand now.
If my interpretation above is correct, then it isn't actually related to Cartesian vs. Core XY. It only matters whether the Z axis has to move to reach the parking position. Can you confirm whether that is correct, or if I am missing something in my understanding? |
You are absolutely right |
@DerAndere1 can you describe what the mechanical machine looks like for this? Is this some home-made, or an off-the-shelf mechanism you can provide links to? I'm trying to picture what type of machine this is designed for, and whether this solution might rely on assumptions that don't work for other designs. Since you are doing your Z movement at the end, I am picturing something like a CNC router that has a gantry design, where it is actually setting tools down onto holders on the bed. I can also picture scenarios where a printer might need to move up to a dock. Imagine a Voron-style design where the entire X/Y axis move up and down to a stationary bed. I don't want to drag this down imagining infinite complexity and variation for it, but seeing what you're work with would help understand the use-case better. |
I am trying to make the switching toolhead feature as generic as possible, before actually building the final machine. I test this with a Prusa i3-style printer where I mount the tool dock on the print bed, but this setup is for testing only. I have mainly CNC routers with a moving ganty in mind, where the bed is stationary and the tool dock can be mounted on the base plate, close to the end of the Y axis. This includes machine types like the PrintNC or even machines that resemble a Doosan DVF 5000. Or, as you said, a Voron2. Preferably, the machine has enough space to mount the tool dock next to the printbed, at the end of the Y axis. |
@sjasonsmith thanks for the feedback. It promted me to revise this PR to include further changes. This is currently in testing phase. |
8be5df5
to
abcb22a
Compare
This is working as intended. However, discussion is needed. I think now is the best time to address the issue that HOTEND_OFFSET corresponds to negative tool length. Marlin's, HOTEND_OFFSET only work for a limited set of Configurations anyway, so currently it seems to be rarely used. We could introduce new settings in Configuration.h named
Then extend G10 to support setting- and reporting of |
I've always pictured HOTEND_OFFSET to be widely used on dual extruders with fixed offsets between two nozzles. This would include SWITCHING_NOZZLE configurations. Do you know how people are typically handling tool offsets with switching toolheads today? I've worked with traditional CNC machines, so I am familiar with the notion of configurating a tool library and measuring/storing tool lengths, but I have never attempted that type of workflow in Marlin. I don't know whether people are doing this all in their headers, or just sending offset information from their slicers to avoid rebuilding their firmware. |
I guess so far SWITCHING_TOOLHEADS was a very specific and obscure feature. With this PR it can be used in much more scenarios, including tool carousels (with minor additions). In my fork I can have a mix of Extruders and non-extruder tools, making the feature even more attractive. In general I suspect that many people try to change nozzles and beds and then struggle with setting the offsets in Marlin. People that have not worked with traditional CNC machines likely rely on features built into the printer's display UI. An official guide that documents best practive is missing for Marlin. So they try whatever is available. This leads to problems or confusing- and manual workflows (babystepping, home offset, G92....). People that know traditional CNC probably see Marlins limitations and just make sure their hardware does not need hotend offsets, or they quickly write their own toolchange algorithm instead of fixing the verrrry confusing existing toolchange.cpp |
Since there is already one I’m adding my files. :-) 2024 04 26 Voron 2.4 Marlin Hydra tool changer Voron_2.4_Marlin_Hydra_tool_changer.zip ; PrusaSlicer > Filament Settings > Custom G-code > End G-Code: This is maybe the only missing part I need not sure. " see line 590 in tool_change.cpp |
@DerAndere1 I encouraged @alfskaar to post about what they were doing here, since it sounded like they had to work through issues similar to what you are working on. You can evaluate whether it provides any ideas that should be incorporated. I am wondering if this needs user-defined scripts for the various parts of the tool change, rather than variables capable of addressing every design variation. |
Thanks for providing a second implementation, @alfskaar . I think that the solution I propose in this PR is more versatile:
That is why I once added EVENT_GCODE_AFTER_TOOLCHANGE could be much more powerful if we had support for Gcode macros, including branching and variables. |
c792921
to
37fb26b
Compare
37d77d6
to
aa44542
Compare
Description
SWITCHING_TOOLHEAD only worked for printers where the bed moves in z direction.
This PR adds two settings to specify Z positions above- and at the toolhead dock:
and
In addition, this adds an option to alow toolhead switching mechanisms that work in Z direction (the toolhead is placed onto the dock in Z direction):
Note: HOTEND_OFFSET values, set with M218, are the opposite of tool length offsets you would typically set with G10 in other firmware. Thus, tool offset compensation in Marlin works as if G44 is active! This works opposite of the usual G43! So HOTEND_OFFSET corresponds to negative tool lengths. E.g. if tool 0 length is 0mm and tool 1 length is 20 mm, you need
#define HOTEND_OFFSET_Z {0, -20}
(set via G-code with M218 T1 Z-20)Requirements
Benefits
Configurations
ToolchangeConfig.zip
Related Issues
#8080