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

    Is it possible to define parameter values globally?

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    3
    5
    164
    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.
    • Perttiundefined
      Pertti
      last edited by

      I have spent hours with my homebuilt toolchanger by tuning tpre#.g and tfree#.g files😧 . Is it possible to define a parameter like _T0_X_collect=-147.1 ? For example:
      G1 X-147.1 Y234 F2000 -> G1 X_T0_X_collect Y234 F2000.
      That would ease tuning since one value must be changed in many lines.
      Thanks for Your interest!😬

      Pertti
      ā€œA winner is just a loser who tried one more time.ā€
      George M. Moore, Jr.

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

        @pertti yes. They're called global variables
        https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands#Section_Global_variable_declaration

        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

        Perttiundefined 1 Reply Last reply Reply Quote 0
        • Perttiundefined
          Pertti @jay_s_uk
          last edited by

          @jay_s_uk Many thanks 😌

          Pertti
          ā€œA winner is just a loser who tried one more time.ā€
          George M. Moore, Jr.

          Perttiundefined 1 Reply Last reply Reply Quote 0
          • Perttiundefined
            Pertti @Pertti
            last edited by

            @pertti By the way, I could not figure out in which file these global declarations should exist in order to function in tpre#.g and tfree#.g files? Perhaps config.g?

            Pertti
            ā€œA winner is just a loser who tried one more time.ā€
            George M. Moore, Jr.

            oliofundefined 1 Reply Last reply Reply Quote 0
            • oliofundefined
              oliof @Pertti
              last edited by oliof

              @pertti I have my globals in a file called variables, and I call that as a macro from config.g before using the first one. There is a bit of an issue with globals in that you can't define one that already exists, so you may need to wrap them in an existence check to set rather than define if you want to reload config.g without restarting the printer.

              <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

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