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

    G29/mesh.g in 3.2beta2 usage?

    Scheduled Pinned Locked Moved
    Beta Firmware
    pre post g-code macro
    3
    9
    410
    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.
    • Murmeltierundefined
      Murmeltier
      last edited by Phaedrux

      In my project, I have to park first my Tool before a G29 can be executed.

      If a soloution availible to send a pre or post code for a specific G-Command

      e.g.

      macro-g29.g
      T-0 ; park tool
      do somthing else
      G29 ; execute the real G29 command
      do somthing else

      1 Reply Last reply Reply Quote 0
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by

        You could use bed.g macro, which is called by G32. Then inside bed.g you can do whatever commands you want, including G29.

        I think in fw 3.2 there will also be a macro called mesh.g which would be called by G29 if present, providing analogous functionality to G32/bed.g

        Z-Bot CoreXY Build | Thingiverse Profile

        Murmeltierundefined 1 Reply Last reply Reply Quote 0
        • Murmeltierundefined
          Murmeltier
          last edited by

          @Phaedrux said in pre or post code for G-Code:

          bed.g macro

          Thank's Phaedrux - but this don't help. I use this macro already, that's fine - but if someone else call a g29 (eg. a start script from a slicer, or duet's WEB-Interface or...) then - crash..... if a tool is grabbed at this time.

          G32 s not a problem - because i can park my tool first in bed.g....

          I have to make sure, that NEVER a tool is loaded when a G29 command is executed. Otherwise my system has a mechanical crash...

          1 Reply Last reply Reply Quote 0
          • Murmeltierundefined
            Murmeltier @Phaedrux
            last edited by

            @Phaedrux said in pre or post code for G-Code:

            mesh.g

            Thank's - I found this

            In RepRapFirmware 3.2 and later, mesh.g is run in response to a G29 command with no parameters. If file mesh.g is not found then it behaves like G29 S0 instead.

            I have to update first ..

            I'll try it out and give feedback... !

            1 Reply Last reply Reply Quote 0
            • Phaedruxundefined
              Phaedrux Moderator
              last edited by

              As part of the mesh.g you could have a conditional statement saying if a tool is loaded, undock it then run g29.

              Z-Bot CoreXY Build | Thingiverse Profile

              1 Reply Last reply Reply Quote 0
              • Murmeltierundefined
                Murmeltier
                last edited by

                i agree with you... but this dont work.

                my system upgrade to 3.2-beta2 is done.

                without a mesh.g file everything is like it was before.

                with a new mesh.g file (only one line in it with "g29") i get the error

                G29 Error: Push(): stack overflow

                maybe a Stack overflow occurs when iu run a recursive macro ?

                1 Reply Last reply Reply Quote 0
                • jay_s_ukundefined
                  jay_s_uk
                  last edited by

                  I think calling of mesh.g is broken in beta 2 with an SBC attached if thats what you have.

                  Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                  1 Reply Last reply Reply Quote 0
                  • Murmeltierundefined
                    Murmeltier
                    last edited by

                    @jay_s_uk said in pre or post code for G-Code:

                    I think calling of mesh.g is broken in beta 2 with an SBC attached if thats what you have.

                    I don't necessarily think so ...

                    In mesh.g I should probably use "G29 S0" (this works).

                    But if someone calls "G29 S0" directly, mesh.g is not executed ... and the problem is there again.

                    1 Reply Last reply Reply Quote 0
                    • Phaedruxundefined
                      Phaedrux Moderator
                      last edited by

                      Moved to the beta firmware forum and updated the title for @chrishamm to see

                      Z-Bot CoreXY Build | Thingiverse Profile

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