G53 Head positioning on a dual head printer
-
I have a 2 nozzle cartesian printer that I am setting up for nozzle wiping.
The two nozzles are offset from each other by 20 mm in the X direction.
I need to move head #1 to X 528 to get it past the wiper and a that point head #2 is at x 548.If I tell the head to go to x 528 then the final position will depend on if nozzle #1 or nozzle #2 is active.
The G53 command uses 'machine coordinates' that are not subject to tool offsets but I have no idea how I would use this. Would I simply tell the machine to go to x 528 as in
g53 g0 x528 and it would go to the same spot no matter which head is currently active?
This seems to be happening but I want to make sure there are no unintended consequences down the road (that seems to happen to me more often then not)Are there any implications down the line that could cause grief/tool crashes?
Is there anything else I need to consider?
Is there another way of achieving the end result that I have failed to consider?Basically I am looking for a sanity check from somebody that understands G53.
-
It might help if you describe your setup and intentions a bit further.
I take it you have a wide wiper and you want to do both nozzles at the same time?What you proposed seems correct.
You may have to send your G10 offsets again at the end of the macro to restore the offsets.You could use conditional G-code to check which nozzle is active and move accordingly (instead of G53)
something like this (untested)if state.currentTool = 0 G1 X528 elif state.currentTool = 1 G1 X548 else echo "no tool selected" M400
-
Thanks for replying.
I can't really add more to the description then I already have.
The nozzles are lined up along the x axis, 20 mm apart so not really a wide wiper. First one nozzle wipes and then the other wipes over the same point on the wiper (as the two heads move to the right on the gantry)
The sample of code you have provided is exactly right as far as intentions are concerned except using G53 does not require testing of the active tool. It 'seems' to do exactly what I want and offsets remain intact (get re-established in the next line of g-code).
So from my current experimentation, everything seems to work as I had hoped.
I was not sure if anything else would be affected that I had not anticipated and that is why I asked the question. I have recently done a couple of big blunders by not fully understanding what I was doing and in the process I ended up wasting a significant amount of time in trying to trace why the printer was doing the things it was doing.
As far as I can tell, things are working fine but I wanted a second opinion about my method and possible unintended consequences.Edit: Based on the limited replies received, I am thinking that there are no major concerns and the thread could be tagged as solved.
-
@jens55 said in G53 Head positioning on a dual head printer:
I have a 2 nozzle cartesian printer that I am setting up for nozzle wiping.
The two nozzles are offset from each other by 20 mm in the X direction.
I need to move head #1 to X 528 to get it past the wiper and a that point head #2 is at x 548.If I tell the head to go to x 528 then the final position will depend on if nozzle #1 or nozzle #2 is active.
The G53 command uses 'machine coordinates' that are not subject to tool offsets but I have no idea how I would use this. Would I simply tell the machine to go to x 528 as in
g53 g0 x528 and it would go to the same spot no matter which head is currently active?
This seems to be happening but I want to make sure there are no unintended consequences down the road (that seems to happen to me more often then not)Are there any implications down the line that could cause grief/tool crashes?
Is there anything else I need to consider?
Is there another way of achieving the end result that I have failed to consider?First, you need to decide on where your Head Reference Point (HRP) is. You can choose where to put the HRP. In your case the obvious places are at one of the nozzles, or midway between the two nozzles. On tool changers it may be more appropriate to use the location of the Z probe, because there may be large differences in the offsets of the different tools.
Then you need to specify the offset of each nozzle from the HRP using G10, and the offset of the Z probe from the HRP using G30.
The limits you specify in M208 are the limits of where the HRP may move to, and also the position of the HRP when the appropriate limit switch is triggered.
When you specify a move using G1:
- If G53 is active (because it appears earlier in the line), you are specifying where you want to move the HRP to
- If no tool is active, you are specifying where you want to move the HRP to in the current workplace coordinate system; so the current workplace coordinate offsets get subtracted from the coordinates in the G1 command
- If a tool is active and G53 is not active, you are specifying where you want to move the tool to in the current workplace coordinate system; so the firmware subtracts the current workplace coordinate offsets and the tool offsets from the coordinates in the G1 command
- In system macro files (pause.g, tool change files, homing files and other files in /sys that are run automatically), behaviour is as above except that workplace coordinate offsets are always ignored.
HTH David
-
@dc42 said in G53 Head positioning on a dual head printer:
In system macro files (pause.g, tool change files, homing files and other files in /sys that are run automatically), behaviour is as above except that workplace coordinate offsets are always ignored.
Ahhhh, this is the catch 44 that I was not expecting!
Thank you so much for mentioning it because I obviously read right past that in the g code reference and this is one of these things that takes a long time to sort out when they happen!