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

    Strange Behaviour of G30

    Scheduled Pinned Locked Moved
    General Discussion
    2
    6
    363
    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.
    • Barracuda72undefined
      Barracuda72
      last edited by

      I put a Klicky Z-probe into my Voron. Firstly i made 2 macros deployprobe.g and retractprobe.g to get the Probe from the dock and use M401 and M402. Worked flawless.Then i wanted to implement an autoz script and the problems started. it do some global variable scripts and then it moves over the z-switch pin behind the Bed. then it calls a G30 Z-99999 . As far i understood the G30 doku it should lower the printhead till it hits the switch ( checked via m558 that its the right pin.) But it doesnt moves down...instead it moves to the bedcenter and moves there and would have crash without a emergency stop. Asked for help ind the Voron RRF channel but no help from there...took me 2 days till i was sure that the G30 Doku missing an important part...G30 always call an M401 even if you have the Probe defined as P5 or P8. The autocall should only works with P9 ( BL Touch). My Solution was rename the retract and deploy macro and insert in all other Macros where it needed not the M401 and M402 but the M98 P"xxxxx" to do the same job..then G30 work as intended and moves down whereever on the bed i call it. maybe that little info could implemented into the Doku as some other guy had the same Prob.

      fcwiltundefined 1 Reply Last reply Reply Quote 0
      • fcwiltundefined
        fcwilt @Barracuda72
        last edited by

        @barracuda72

        Why are you using G30 Z-99999?

        Frederick

        Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

        Barracuda72undefined 1 Reply Last reply Reply Quote 0
        • Barracuda72undefined
          Barracuda72 @fcwilt
          last edited by

          @fcwilt
          it part of this script AutoZ

          Skip to content
          Search or jump to…
          Pull requests
          Issues
          Marketplace
          Explore
           
          @SvenBarracuda 
          WartyTowel
          /
          Auto-Z-calibration-for-RRF-3.3-or-later-and-Klicky-Probe
          Public
          forked from pRINTERnOODLE/Auto-Z-calibration-for-RRF-3.3-or-later-and-Klicky-Probe
          Code
          Pull requests
          Actions
          Projects
          Wiki
          Security
          Insights
          Auto-Z-calibration-for-RRF-3.3-or-later-and-Klicky-Probe/autoz/autoz.g
          
          Chriss Copy and paste error fixed
          Latest commit 9dfc5cf 8 hours ago
           History
           2 contributors
          @invalid-email-address@pRINTERnOODLE
          97 lines (65 sloc)  2.71 KB
             
           ; ---------- ---------- Auto Z ---------- ----------
           
           ; to use autoz, please place the following near the end of your slicers start gcode
           ; M98 P"/macros/autoz/autoz.g" <<< Place in slicer
          
          
          ; ---------- prepare ----------
          
          
          M98 P"/macros/autoz/scripts/defaults.g" ; load some deefaults which will be overwriten by the "edit_me.g"
          M98 P"/macros/autoz/edit_me.g" ; load your settings
          M98 P"/macros/autoz/scripts/autoz_globals.g" ; load autoz framework
          G29 S2 ; disable mesh
          M290 R0 S0 ; RESET BABY STEPPING
          
          
          ; ---------- probe the nozzle ----------
          
          
          M98 P"/macros/autoz/scripts/autozhop_up.g" ; large z hop incase the nozzle is low and you have a high pin
          M400
          M98 P"/macros/autoz/scripts/use_pin_autoz.g" ; use the z pin
          M400
          M98 P"/macros/autoz/scripts/pin_xy.g" ; go to the z pin
          M400
          M98 P"/macros/autoz/scripts/drive_autoz.g" ; set z drive safe physics
          
          G30 ; zero the z axis to the nozzle
          
          M400
          M98 P"/macros/autoz/scripts/restore_zdrive.g" ; restore the z drive to the state before autoz
          M400
          M98 P"/macros/autoz/scripts/smallzhopup.g" ; move up 2mm
          M400
          
          
          ; ---------- load the clicky ----------
          
          
          M98 P"/macros/autoz/scripts/use_clicky_autoz.g" ; use the clicky probe 
          M400
          M98 P"/macros/autoz/scripts/autozhop_up.g"
          M400
          M98 P"/macros/autoz/scripts/clicky_status.g"
          M400
          M98 P"/macros/autoz/scripts/loadclicky.g" ; pick up and verify clicky
          M400
          M98 P"/macros/autoz/scripts/clicky_status.g"
          
          M400
          M98 P"/macros/autoz/scripts/confirmclicky.g"
          
          M400
          M98 P"/macros/autoz/scripts/pin_xy_clicky.g" ; move the clicky probe switch body over the z pin
          M400
          M98 P"/macros/autoz/scripts/use_pin_autoz.g" ; use the z pin
          M400
          M98 P"/macros/autoz/scripts/drive_autoz.g" ; set z drive safe physics
          M400
          
          
          ; ---------- probe clicky switch body ----------
          
          
          M98 P"/macros/autoz/scripts/probeclicky.g" ; probe the clicky body with the z pin
          M400
          M98 P"/macros/autoz/scripts/calculate.g" ; simple z offset calculation and average
          M400
          M98 P"/macros/autoz/scripts/comptomesh.g"
          M98 P"/macros/autoz/scripts/use_clicky_autoz.g" ; use the clicky probe
          M98 P"/macros/autoz/scripts/autozhop_up.g" ; hop to clear the switch
          M400
          M98 P"/macros/autoz/scripts/bedcenter.g" ; go to the center of the bed 
          M400
          
          G30 ; set Z0 according to the clicky
          
          
          ; ---------- get final result ----------
          
          
          M400
          M98 P"/macros/autoz/scripts/finaloffset.g"
          
          
          ; ---------- finish up ----------
          
          
          M291 T5 R"AutoZ complete" P"Z offset was detected"
          M98 P"/macros/autoz/scripts/restore_zdrive.g" ; restore the z drive to the state before autoz
          M98 P"/macros/autoz/scripts/autozhop_up.g" ; small z hop
          M400
          M98 P"/macros/autoz/scripts/unloadclicky.g" ; unload the clicky probe
          M98 P"/macros/autoz/scripts/bedcenter.g" ; go to the center of the bed 
          M98 P"/macros/autoz/scripts/alldone.g" ; do a happy dance
          
          
          © 2022 GitHub, Inc.
          Terms
          Privacy
          Security
          Status
          Docs
          Contact GitHub
          Pricing
          API
          Training
          Blog
          About
          Loading complete
          
          fcwiltundefined 1 Reply Last reply Reply Quote 0
          • fcwiltundefined
            fcwilt @Barracuda72
            last edited by

            @barracuda72

            Good grief. Seems way too complicated for something so simple but to each their own.

            Just FYI the macros folder is for things you want to appear in the list of "macro" buttons. For support code that is only called via M98 you can put it in the SYS folder.

            I can find no documentation that suggests G30 Z-99999 is a valid command.

            Frederick

            Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

            Barracuda72undefined 1 Reply Last reply Reply Quote 0
            • Barracuda72undefined
              Barracuda72 @fcwilt
              last edited by Barracuda72

              @fcwilt
              G30 Doku: If a "normal" Z parameter is given instead of -9999 or lower, then the bed is not probed, but instead that value is used as if the Z probe had triggered at that height.

              so...a z-99999 is the same as a Z-10000

              anyway..its not the point and i didnt wanted to discuss the macro..its not mine...but it works..even if i had the skill to do it, i would change some parts ( for example just use K0 and K1 instead of re-define the probe for each probing)

              I just wanted to point out that G30 uses the 2 system MAcros and its not documentated...just a row rows of text would be enough that had explained that g30 always calls M401 and M402 no matter what probe type you have defined.
              As i never had a BL Touch in any of my Duet Printer i wasnt aware of.

              fcwiltundefined 1 Reply Last reply Reply Quote 0
              • fcwiltundefined
                fcwilt @Barracuda72
                last edited by

                @barracuda72 said in Strange Behaviour of G30:

                @fcwilt
                G30 Doku: If a "normal" Z parameter is given instead of -9999 or lower, then the bed is not probed, but instead that value is used as if the Z probe had triggered at that height.

                so...a z-99999 is the same as a Z-10000

                Using Z that way only applies when you have a P parameter which in turn means you will have X and Y parameters as well.

                I just wanted to point out that G30 uses the 2 system MAcros and its not documentated...just a row rows of text would be enough that had explained that g30 always calls M401 and M402 no matter what probe type you have defined.

                I suppose that since G30 requires a probe and when you specify that a probe exists it follows that the firmware will call those macros. If they are not needed you would not code them and then they would not be called.

                Perhaps @Phaedrux can be beguiled into adding some to the documentation for G30 regards those macros - he is a fine fellow.

                Frederick

                Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

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