No "undive" on G30 / H1 command on G1 for Z



  • Currently my printer probes the z by diving, hitting the z stop, then backing off again before I can do another move. I want to be able to hit the z end stop, then move the print head, without the backing off in z manoeuvre. (This is so I can pick up a probing module, then go and probe the bed for real).

    I thought about using G1 Z-999 H1, but if I include the H1 or H3 parameters on a G1 move, the axis doesn't move at all.

    is there a parameter for this within M558 or G30? Or is there something I'm doing wrong with G1?

    Thanks!


  • Moderator

    Can you give some more context around what you're trying to do? Provide your config files as well so we can see what's going on.

    There is a difference between probing and using an endstop, and I'm not really clear on which you're doing, or how and when you want to use it.



  • OK. So I want to move to a specific x y coordinate then move z towards the print head until a switch is hit. I then want to move the print head in X without the z axis moving away again (as it does after a g30 move).



  • @Dezdoghound Is your intention to move Z down to a switch, then pick up a probing module at that height (but at another X/Y) in order to then probe Z with that module?

    In this case, here's the recipe:

    1. tell the Duet to use a switch as end stop (see M574)
    2. move Z to that end stop (see G1 H1)
    3. pick your probe with whatever Gcodes you need to perform
    4. configure the Duet to use your Z-probe (M574, again)
    5. define the characteristics of your probe with M558
    6. probe the bed with G30

    To figure out the details, carefully read the Gcode reference, try out every step on the console, then, bake what you got into a macro.



  • @infiniteloop yes that's the plan! So would the switch be wired over the z end stop pins and the probe itself wired on the probe input? It would be good if I could use the same pins for both.



  • @infiniteloop So I've just given this a go. With it configured to use a switch as the end stop, using the H1 part of the G1 command means the axis doesn't move. If I don't have the H1 parameter then it does move. i.e.

    G1 Z10 H1 ; no movement
    G1 Z10 ; moves 10 in Z

    This is with the configuration M574 Z1 S1 and no M588 in the config.g



  • @Dezdoghound I suspect you to be not very familiar with Gcodes. As you intend to perform an ambitious task, you will have to delve into this matter. Don’t expect me to spell the macro for you. Instead, I tried to describe the way I took with my macro - which works.

    Look at the Gcode G1 Z10 H1, which doesn’t work for you. So, some prerequisites are missing. In context, this is the task „home Z to an end stop“. This is explained in the tutorial „Homing Z using a Z min endstop switch“. Just look up the Gcodes from the sample given there: what do they do, what parameters do they need? It’s exactly this context you need to make your G1 Z10 H1 work. Good luck!



  • Just in case anybody wants to do this in the future, I've solved it. The issue with having it not move when using G1 Z-999 H1 was my M574 needed to be set as a probe (Z) and I used the Z probe input pins. I had previously been trying the Z probe pins with S1 and the Z endstop pins with S1 (unsure as to why the endstop pins with S1 didn't work.)

    At some point I'll show the new probing method...


Log in to reply