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

    Is there a way to check if we are in G90 or G91 mode ?

    Scheduled Pinned Locked Moved
    Gcode meta commands
    3
    7
    478
    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.
    • psychotik2k3undefined
      psychotik2k3
      last edited by

      I have a macro that i call from my gcode.

      some of my slicers autogenerate the gcode from some parameters (calibration tests mostly) but they are working in relative mode.

      what i want to do is on my macro check if i'm in relative or absolute coordinate mode, change to absolute, do the code of the macro
      and then set back to absolute or relative according to the value i read at the beginning of my macro.

      thanks

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

        @psychotik2k3

        Read these:

        M120

        M121

        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

        psychotik2k3undefined 1 Reply Last reply Reply Quote 0
        • psychotik2k3undefined
          psychotik2k3 @fcwilt
          last edited by

          @fcwilt ok thanks i will try that.

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

            @psychotik2k3 you do t need to worry about whether you were in relative or absolute mode, because that will be restored automatically when the macro finishes.

            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

            psychotik2k3undefined 2 Replies Last reply Reply Quote 1
            • psychotik2k3undefined
              psychotik2k3 @dc42
              last edited by

              @dc42 oh ok so i really have to check about that because i was counting on the fact that some macro set absolute coordinates.
              thx

              1 Reply Last reply Reply Quote 0
              • psychotik2k3undefined
                psychotik2k3 @dc42
                last edited by

                @dc42 is this restore behavior only for a code that is on the macro folder or is it the same if my code is in sys folder ?

                thanks

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

                  @psychotik2k3 it is for all macros. When any macro starts executing, various parameters are saved and then restored when the macro finishes or aborts. The list of these parameters includes the relative/absolute axis movement flag, the relative/absolute extrusion flag, the feed rate, the inches/mm flag, and the plane selected for arc moves.

                  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