Short-circuting G28 when already homed
-
Hi all,
I had the idea of using "if" clauses in "homeall.g" to skip homing if all the axes are already homed. I thought it'll be a no-brainer, but it appears that triggering G28 alone resets {move.axes[].homed}, before it even gets to execute any user-defined gcode(?)This is on 3.4.0beta4, duet2 wifi, cartesian FDM - but I suspect it's just a fundamental feature of how G28 is implemented?
My goal is to make running subsequent print jobs on an "already initialised" printer faster, skipping homing/levelling. Are there any "idiomatic" takes on doing this on a duet?
Oh... I just realised that instead of having the "if" in homeall.g I could place it in my slicer gcode preamble instead, wrapping the G28 call there. Would that be the best I could do?
-
@gregn I found out the homed" condtions are wiped out before executing G28 so trying to see if you were homed before doing the homing doesn't work.
It works in a macro though. -
@hugsy thx, good to confirm that it's normal behaviour. I'll try replacing G28 with M98 P"homeall.g" in my standard print startup code
-
@gregn
Your "if" statement should be in your start.g (or your slicer start code) to determine whether G28 should be called or not.
G28 calls homeall.g, so if you try modifying that and using M98, you'll have issues if you hit homeall in DWC for example.This was pretty much the first conditional code example posted by DC42
; If the printer hasn't been homed, home it if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed G28
-
@owend Got it, but how to make it do that when hitting "home all" in DWC? I tried finding the endstops variables names so that I would be able to see if my endstops were already triggered but I wasn't able to find them
-
@hugsy endstop should be:
sensors.endstops[].triggered
-
@cosmowave Thank you! Do you know where we can find them all so that I don't have to ask a similar question again?
-
-
@t3p3tony Thank you so much!