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

    Global Variables Desire

    Scheduled Pinned Locked Moved
    Firmware wishlist
    2
    10
    355
    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.
    • fcwiltundefined
      fcwilt
      last edited by

      Hi,

      It would save me a good deal of time and a bit of frustration, when creating a new set of configuration files, if there was a way to erase all global variables as part of doing a board reset or code re-start.

      Unless there is a way I have not heard about, right now I have to reset the main board which then means I have to re-home the printer and do whatever else needed to restore the state of the printer.

      It's not a big issue to be sure but I would like to have it just the same.

      Thanks.

      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

      moth4017undefined 1 Reply Last reply Reply Quote 0
      • moth4017undefined
        moth4017 @fcwilt
        last edited by moth4017

        @fcwilt

        i manually swap tool heads so have to make a few changes , i use macros to redefine all the changes , i used the cnc kitchen method,

        https://www.cnckitchen.com/blog/tool-swapping-with-the-whambam-mutant-v2-review

        <

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

          @moth4017

          Interesting system - I am going to check it out.

          As to global variables:

          I have one file called create_globals.g.

          It contains some 80 values, most of what is unique to any given printer.

          What that means is I can reuse many commonly needed files not by editing the a multiplicity of files but by editing the values in create_globals.g.

          During development of a new configuration these values may change frequently and the file needs to be executed again which currently I can only do by resetting the board.

          Yes I could include code like some folks which uses exist and either creates or sets the variable. Not elegant.

          So a command to delete all existing global variables would be a boon for me. Not a necessity but just something nice to have.

          Thanks for the feedback - I'm looking forward to giving the mutant system a trial.

          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

          moth4017undefined 1 Reply Last reply Reply Quote 0
          • moth4017undefined
            moth4017 @fcwilt
            last edited by

            @fcwilt i didnt intend to promote the mutant system 🙂 just the way Stephan used the macros to change the settings ..

            <

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

              @moth4017 said in Global Variables Desire:

              @fcwilt i didnt intend to promote the mutant system 🙂 just the way Stephan used the macros to change the settings ..

              Oh...

              No matter - the system looked interesting.

              I was just thinking about such a system a couple of days back as I was replacing the tools in my E3D Tool Changer dealing with all new cabling.

              As to the guys system - I didn't understand why he was creating a new file rather than selecting from a set of existing ones. But many ways to skin cat.

              Thanks.

              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

              moth4017undefined 1 Reply Last reply Reply Quote 0
              • moth4017undefined
                moth4017 @fcwilt
                last edited by

                @fcwilt i have different tool heads on my printer so i need to reconfigure the printer , it takes me about 2 minutes to swap the head, and then i run a macro for that tool head that loads all the parameter's in to tool.g file so i only have to run the macro when i change the tool head ,

                <

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

                  @moth4017 said in Global Variables Desire:

                  @fcwilt i have different tool heads on my printer so i need to reconfigure the printer , it takes me about 2 minutes to swap the head, and then i run a macro for that tool head that loads all the parameter's in to tool.g file so i only have to run the macro when i change the tool head ,

                  Understood.

                  Does the code that gets written to tool.g for any given tool head change frequently?

                  I was thinking settings for any given tool head didn't change often and you only need to select from a set of settings, the settings for the specific tool head being mounted.

                  Yes? No?

                  Thanks.

                  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

                  moth4017undefined 1 Reply Last reply Reply Quote 0
                  • moth4017undefined
                    moth4017 @fcwilt
                    last edited by

                    @fcwilt
                    im not sure i understand your question, but the settings have to change when i change the tool head eg. steps/mm, z offset , max temperature, pressure
                    advance etc etc

                    <

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

                      @moth4017 said in Global Variables Desire:

                      @fcwilt
                      im not sure i understand your question, but the settings have to change when i change the tool head eg. steps/mm, z offset , max temperature, pressure
                      advance etc etc

                      I understand that but generating a new tool.g file when changing a tool head is just one way to deal with the issue.

                      You could have a single file that uses conditional code to access different sections of code, one section for each tool head. Then all you need is a global variable with a suitable value to indicate which tool head is mounted. That value then determines which section of code needs to be executed.

                      Not a big deal out all, just thinking out loud.

                      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

                      moth4017undefined 1 Reply Last reply Reply Quote 0
                      • moth4017undefined
                        moth4017 @fcwilt
                        last edited by

                        @fcwilt originally i was going to put an address on each tool head so that the printer would auto configure , but i didnt have enough inputs free on my control board , so ended up doing the macro route , its still something im going to look at using an analogue input 0v=tool 1, 1v = tool 2 etc this way i only use 1 input .
                        then you could did the setup via global variable's or macros , i like the macro route as all the settings for the too head are in one place .

                        <

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