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

    help with conditions in variable g-code

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    9
    304
    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.
    • arhiundefined
      arhi
      last edited by

      I have this:

        G1 X110 Y-100 Z5 F9000
        M400
        G31 P{sensors.probes[0].value[0] + 8}
        G30 P4 X110 Y-100 Z-9999
        if result != 0
          echo "ERROR P4"
          continue
        echo "DONE P4"
      

      so nothing special, go, probe, if successful print done, if not print error ... simple enough but .. output:

      4/10/2020, 12:30:58 PM 	Error: Z probe already triggered at start of probing move
      DONE P4
      

      So G30 produced Error, RRF knows there's an error and yet the "result" is 0 ?! like the probing went ok ? (3.01RC6)

      What am I doing wrong?

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

        @arhi said in help with conditions in variable g-code:

        So G30 produced Error

        What error did it report?

        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

        arhiundefined 1 Reply Last reply Reply Quote 0
        • arhiundefined
          arhi @dc42
          last edited by

          @dc42 you see the error just before the DONE:

          Error: Z probe already triggered at start of probing move

          1 Reply Last reply Reply Quote 0
          • OwenDundefined
            OwenD
            last edited by

            I would say that the firmware, having sensed that the probe is already triggered is (correctly) bailing out of the procedure to head off any possible damage,

            arhiundefined 1 Reply Last reply Reply Quote 0
            • arhiundefined
              arhi @OwenD
              last edited by

              @OwenD that is ok, the movement behavior is ok, but the return value is 0 and 0 means "ok", not "error"

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

                It's a bug, which will be fixed in 3.01-RC7. Thanks for reporting it.

                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

                arhiundefined 1 Reply Last reply Reply Quote 1
                • arhiundefined
                  arhi
                  last edited by

                  Good, I'm not going crazy then 😄

                  1 Reply Last reply Reply Quote 0
                  • arhiundefined
                    arhi @dc42
                    last edited by

                    @dc42 btw it returns zero in event of other error too (not triggered after a while)

                    1 Reply Last reply Reply Quote 0
                    • arhiundefined
                      arhi
                      last edited by

                      Error: Probe points P0 to P3 must be in clockwise order starting near minimum X and Y, and P4 must be near the centre
                      

                      this error does not return 0 (after doing G30 P24 X110 Y100 Z-9999 S0 all the other ones were without S parameter)

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