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

    Multiple choice conditionnal gcode

    Scheduled Pinned Locked Moved
    Gcode meta commands
    4
    7
    418
    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.
    • Krohm Koalaundefined
      Krohm Koala
      last edited by Krohm Koala

      Hi, I wanted to know if it could be possible and Interesting to add a possibility to add a way to ask some choice with custom text (or not) as I.e. when changing filament with a macro to do an all-in-one unloading/loading, ask what type of filament you are charging, or maybe, do a preheat gcode that ask for what type of filament or things like that ^^
      I hope I'm understandable πŸ˜‚ my English is not always as good as I thought 😁

      1 Reply Last reply Reply Quote 0
      • arhiundefined
        arhi
        last edited by

        There is M291 that allow you to display custom message and wait for response

        Not really a "multiple choice" it's more

        • no buttons
        • Close button
        • OK button
        • OK and Cancel buttons

        so "multiple choice" would be Ok and Cancel πŸ™‚

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

          There is already a request to extend M291 to allow Yes, No and Cancel buttons, which is under consideration for inclusion in RRGF 3.02. This suggestion appears to be a useful generalisation of 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

          arhiundefined 1 Reply Last reply Reply Quote 1
          • arhiundefined
            arhi @dc42
            last edited by

            @dc42 said in Multiple choice conditionnal gcode:

            There is already a request to extend M291 to allow Yes, No and Cancel buttons, which is under consideration for inclusion in RRGF 3.02. This suggestion appears to be a useful generalisation of that.

            Yes would be cool to have number of custom txt buttons instead of only few, but what would be also super useful IMO would be the "result" variable after M291. ATTM the S3 will stop execution of a macro and on "ok" macro will continue or macro will abort on "cancel". Would be useful to have return variable set so we can if return...

            1 Reply Last reply Reply Quote 0
            • Krohm Koalaundefined
              Krohm Koala
              last edited by

              I know about the m291 ^^ this was for the purpose of executing a specific gcode accordingly to the choice you made or maybe for what I want, something like a gcode command that display the different filament you've configure to let you choose the one you want as for my examples for filament changing or preheat ^^

              1 Reply Last reply Reply Quote 0
              • OwenDundefined
                OwenD
                last edited by OwenD

                What you’re asking for is probably not possible within the confines of the duet firmware and would take considerable effort to code even if it was.
                The dialogs would have to work on panel due, DWC and RPi
                Falls under the law of diminishing returns I think.
                If your usage case is just preheat and load/unload these are easily taken care of by clicking on the appropriate macro.
                However you could easily present your dialog boxes on an RPi using most any language and have that app run the appropriate macro or post process the file before launching it.

                What I suggested for M291 was to enable you to skip over choices when iterating through arrays.
                This is far less work to implement and in fact would work in your case, however you would have to say NO to each choice till you got to the filament you wanted to load.

                1 Reply Last reply Reply Quote 0
                • Krohm Koalaundefined
                  Krohm Koala
                  last edited by

                  Yes i think it'll be easy to get around, i just search ease x) but with your suggestion, i think it'll will be easy to do a bit of meta to ask which type of filament you are loading one by one πŸ™‚

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