Get most coverage from multiple tools using coordinate systems
-
I've got 4 x tools and due to different offsets, they don't all cover the same exact area. I've had to make the initial sacrifice to set my coordinate system and limits to an area that is constrained to the intersection of all of the tools' coverage areas.
I recently started looking at managing coordinate systems so I can get the most out of each tool, and viola, I was able to print beyond my previous limits because I used
G10 L20 Y0
for one of the tools to get it to change where it's zero is.I have some questions...
SCENARIO
The docs forG10
say that if use useL2
orL20
, the offsets are applied to the coordinate system specified byPn
. But I didn't realize this. So, I wanted to set my P1 tool to have more Y axis length, so I activated the tool and jogged it all the way down, which would normally be something like -40. Then I usedG10 P1 L20 Y0
to update the Y origin coordinate. That worked??!??Three Part Question
-
(1/3) Why did that work? With
L20
, doesn't that mean it's adjusting a coordinate system and not a tool? -
(2/3) Did it switch to that coordinate system automatically?
-
(3/3) Is
P1
the default coordinate system, is it not zero based?
Next Question
- Is there a way to permanently set different origins for each tool to get the most coverage, but when printing with multiple tools have them still overlap properly? Or do I have to use macros to switch back and forth between all tools having the same global coordinates for the origin and having different coordinates for origin?(Having my cake and eating it too.)
-
-
@dc42 sorry about the personal bump, nobody responded.
Any ideas?
-
I can answer (3/3). With L2/L20, P is indexed from 1 to 9. See https://docs.duet3d.com/en/User_manual/Reference/Gcodes#g10-tool-temperature-setting
L2: this sets the origin of the coordinate system number specified by the P parameter (1 to 9) to the specified X, Y, X... values
For (1/3) and (2/3) since you did not use L1, the change was not tool specific, but coordinate system specific. and that doesn't change by a tool change.
"Next Question" I think you have to do the cake baking and eating yourself.
-
@oliof yes, i read it too, and have the same understanding. The whole point of my post is that it's not behaving as documented.
-
@gnydick I presume you are trying to print the largest possible item using just one tool, where that tool has an X and/or Y offset. I also presume that you have set your M208 limits so that they match what your slicer expects when a tool has zero X and Y offsets.
If the tool X offset is x then the reachable X min and max for that tool is offset from the M208 X limits by that amount x. Similarly, the reachable Y min and max for that tool is offset by y where y is the tool Y offset.
Therefore I think the coordinate offset you need is described by this:
G10 L2 P1 X{tools[state.currentTool].offsets[0]} Y{tools[state.currentTool].offsets[1]}
Obviously you need to select a tool before using that code.
In answer to your questions:
- Your sequence accomplished the same thing.
- Coordinate system 1 is selected by default at power up.
- Coordinate systems in the G10 command are 1-based as specified in the NIST standard.
- You could specify the coordinates system change in the tpost#.g file if you with. Bear in mind that this will mess up any jobs you run that use multiple tools.
-
@dc42 thanks for the suggestion.
What I'm curious about is if it's possible to have maximum print area while also using multiple tools. The slicer doesn't know that there are offsets between the tools. Although.... maybe there is a place to enter that.