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

    Make use of variables

    Scheduled Pinned Locked Moved
    Firmware wishlist
    14
    40
    6.7k
    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.
    • dc42undefined
      dc42 administrators
      last edited by

      I anticipate that the new features would be used almost exclusively in macro files that are used only on printers running RepRapFirmware.

      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

      garyd9undefined 1 Reply Last reply Reply Quote 0
      • garyd9undefined
        garyd9 @dc42
        last edited by

        @dc42 said in Make use of variables:

        I anticipate that the new features would be used almost exclusively in macro files that are used only on printers running RepRapFirmware.

        Then perhaps call it something else (RRF-Code or Duet-Code) with a different file extension and only allow it in macros. I realize that you have a certain expectation of competence of your users, but there's a large potential for something to go wrong when these machines are being used for laser cutters, CNC, etc

        "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

        fmaundefined 1 Reply Last reply Reply Quote 0
        • Googliolaundefined
          Googliola @dc42
          last edited by

          @dc42 From a user perspective, the terminology would cause confusion and additional and maintained documentation , but then the question is how much you weigh user-friendliness.
          If I were in your shoes, I would probably stick to ease and coherence with known / documented guidelines. You might open Pandora box here. People might argue that common (Fanuc) standards are 'better'. Comes down to taste at the end of the day really...

          1 Reply Last reply Reply Quote 0
          • botundefined
            bot
            last edited by bot

            I really like your proposal, dc42.

            I have only one immediate use-case that I would want to employ: check current z height, and raise then lower bed to switch IDEX tools and avoid obstacles near the bed perimeter, if current z height is insufficient to clear said obstacles. This would have to be located in the actual print gcode files, in the tool switching script.

            I don't see any problem with doing this, based on your proposal, but just wanted to mention a use-case that would have the script inside a gcode file for printing.

            edit: Upon further reflection, these commands could be contained in the firmware-based macro tool change scripts. I was thinking of a case of using slicer based tool change scripts, but that would not be necessary. Ignore my stated use case of scripts in a printable gcode file.

            *not actually a robot

            1 Reply Last reply Reply Quote 0
            • Googliolaundefined
              Googliola
              last edited by

              @dc42 Haven't had much time lately to follow up on my feature request. With holidays ahead, this will change soon 🕺 🤞

              Just been wondering how the object model is coming along and if you could make a statement about when / what version it will be implemented.
              Thanks in advance

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

                @googliola said in Make use of variables:

                @dc42 Haven't had much time lately to follow up on my feature request. With holidays ahead, this will change soon 🕺 🤞

                Just been wondering how the object model is coming along and if you could make a statement about when / what version it will be implemented.
                Thanks in advance

                A small amount of the object model is supported in firmware 2.02RC5 along with variable substitution, as a proof of concept. The full implementation is planned for release 2.03.

                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
                • fmaundefined
                  fma @garyd9
                  last edited by

                  @garyd9 said in Make use of variables:

                  @dc42 said in Make use of variables:

                  I anticipate that the new features would be used almost exclusively in macro files that are used only on printers running RepRapFirmware.

                  Then perhaps call it something else (RRF-Code or Duet-Code) with a different file extension and only allow it in macros. I realize that you have a certain expectation of competence of your users, but there's a large potential for something to go wrong when these machines are being used for laser cutters, CNC, etc

                  Didn't follow this thread before... I agree with @garyd9: as no slicer will generate such custom G-Code, if the goal is to use it from macros, I suggest to write a macro language, like Slic3r does, evaluated by the macro pre-processor, and keep a standard G-Code.

                  Frédéric

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

                    The additional facilities will be provided by way of additional (not replacement) syntax and will not affect the ability of RRF to run GCode produced by slicers.

                    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
                    • fmaundefined
                      fma
                      last edited by

                      Yes, I understand, but this means that it will be possible to use this syntax from Slicers (using custom code), which is, IMO, more dangerous than from macros only...

                      Frédéric

                      1 Reply Last reply Reply Quote 0
                      • fmaundefined
                        fma
                        last edited by

                        Maybe another thing to think about is having the possibility to give params to macros...

                        Frédéric

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

                          @fma said in Make use of variables:

                          Maybe another thing to think about is having the possibility to give params to macros...

                          Yes, I will probably include that.

                          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
                          • Ringo1508undefined
                            Ringo1508
                            last edited by

                            Glad I found this topic! Sorry for dragging up an old topic but I don't see any other information on the wiki about this.

                            I'm looking for variable support as well. An example of an immediate want (notice I didn't say need lol) is the ability to call a macro with hotend first layer temperature and bed temperature parameters.

                            My Cartesian machines all will set initial hotend temp to 160° while bed heats up, then do a mesh bed leveling and finally heating up the nozzle to print temp just outside the print area and doing a purge line before it begins the print.

                            Yes I know that I can put this in Slic3r custom gcode for print start, but then I have to manage it for each printer 😁 I'd love to take advantage of just putting the macro call in the custom gcode section.

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