Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Question about G30 command

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    2
    7
    1.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • garyd9undefined
      garyd9
      last edited by

      From reading the g-code wiki (https://duet3d.com/wiki/G-code#G30:_Single_Z-Probe) I got the impression that the following command:

      G30 X0 Y0

      …would use the G31 configured offset to move a z-probe to the absolute 0,0 location, perform a probe, and when the probe hits threshold, set absolute Z to match the Z specified in G31 (the probe trigger height.)

      What I'm finding is that the X and Y parameters are being ignored with the above command and the probe is performed in the "current" X/Y location.

      In contrast, when I use "G30 P0 X0 Y0 Z-999999", the probe moves to position itself over absolute 0,0.

      Am I misunderstanding what G30 is supposed to do? (I'm using firmware 1.21RC1)

      Thank you
      Gary

      "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

      1 Reply Last reply Reply Quote 0
      • garyd9undefined
        garyd9
        last edited by

        …another G30 question:

        When using "G30" (no parameters) to probe for Z, the firmware seems to require that I first home X and Y.

        Why is that?

        "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

        1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators
          last edited by

          @garyd9:

          …another G30 question:

          When using "G30" (no parameters) to probe for Z, the firmware seems to require that I first home X and Y.

          Why is that?

          To make sure you know where you are probing, so that the Z probe is likely to be over the bed.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators
            last edited by

            @garyd9:

            From reading the g-code wiki (https://duet3d.com/wiki/G-code#G30:_Single_Z-Probe) I got the impression that the following command:

            G30 X0 Y0

            …would use the G31 configured offset to move a z-probe to the absolute 0,0 location, perform a probe, and when the probe hits threshold, set absolute Z to match the Z specified in G31 (the probe trigger height.)

            What I'm finding is that the X and Y parameters are being ignored with the above command and the probe is performed in the "current" X/Y location.

            In contrast, when I use "G30 P0 X0 Y0 Z-999999", the probe moves to position itself over absolute 0,0.

            Am I misunderstanding what G30 is supposed to do? (I'm using firmware 1.21RC1)

            Thank you
            Gary

            I didn't write the specification of G30, and it is rather complicated. Basically, G30 Xxx Yyy Zzz doesn't actually probe, but tells the firmware that the probe would trigger at height zz at XY coordinates xx and yy. In conjunction with a P parameter, this can be used to implement bed compensation even if you don't have a Z probe.

            But there are exceptions:

            • G30 with no Z parameter performs a probe at the current location (X and Y are ignored);
            • G30 with a "silly" Z value moves to the specified XY position at the specified Z dive height and then probes.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            • garyd9undefined
              garyd9
              last edited by

              @dc42:

              • G30 with no Z parameter performs a probe at the current location (X and Y are ignored);
              • G30 with a "silly" Z value moves to the specified XY position at the specified Z dive height and then probes.

              That sounds interesting. I'll have to play with "silly" values and see what happens. If a person wants to home Z at "0,0", they would currently have to use G1 to move a tool to X(0-probeXoffset), Y(0-probeYoffset) and run G30. In my case, that looks like:

              T1 P0 ; need to select the right tool so I know the offset to the probe
              G1 X74.3 Y0.8 F6000 ; position the probe over 0,0 - if I ever move the probe, I have to remember to change this as well as the G31 specified offsets in config.g
              G30

              Being that the firmware already knows what the offsets are (assuming G31 was set properly), it'd be significantly easier to type and read:

              G30 X0 Y0 ZsillyValue

              Thank you - again.
              Gary

              "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

              1 Reply Last reply Reply Quote 0
              • garyd9undefined
                garyd9
                last edited by

                In testing (while X/Y are homed)

                G30 ; probed in place, left 'Z' as the trigger height from G31
                G30 X0 Y0 ; exact same as above
                G30 X0 Y0 Z-999 ; exact same as above
                G30 X0 Y0 Z-999999 ; exact same as above
                G30 X0 Y0 Z0 ; exact same as above

                What would a good "silly" value for Z be?

                Thanks
                Gary

                "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

                1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators
                  last edited by

                  I was wrong. When there is no P parameter, G30 probes from the current position, and the only other parameters that are significant are S and H.

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA