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

    Math and Variables in gcode

    Scheduled Pinned Locked Moved
    General Discussion
    3
    6
    1.1k
    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.
    • binterryan76undefined
      binterryan76
      last edited by

      im sorry if this has been asked before but I am playing around with the idea of making a printer that has 3 z motors that can automatically mechanically level the bed. This will likely involve probing three locations on the bed and storing the distance traveled at each position in a variable then rotating each motor by a certain value. calculating that value will at least require multiplication and will probably require all three . can this be done with a macro or will it require customizing the firmware or is there some other method like a c++ standalone function that could rewrite the macro since it is just a text file? thanks and sorry again if this has been asked before.

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

        What you're talking about already exists as automatic bed leveling with independent lead screw motors using the G32 bed probing command.

        https://duet3d.dozuki.com/Wiki/Setting_up_automatic_probing_of_the_print_bed

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 1
        • whosrdaddyundefined
          whosrdaddy
          last edited by

          Here is the doc how to configure indepent Z motors:
          https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_

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

            For the life of me I couldn't find it.

            https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors

            Z-Bot CoreXY Build | Thingiverse Profile

            1 Reply Last reply Reply Quote 1
            • binterryan76undefined
              binterryan76
              last edited by

              oh awesome. Thank you very much!

              I guess the main and more general question is still unanswered but I assume you cannot store variables and do math within a macro?

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

                Not currently.

                Z-Bot CoreXY Build | Thingiverse Profile

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