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

    How to pause a program/macro?

    Scheduled Pinned Locked Moved
    General Discussion
    5
    12
    958
    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.
    • handyandyundefined
      handyandy
      last edited by

      I am trying to write a program/macro to make determining the trigger height of my IR Z probe easier. At the moment I enter each of the following lines manually...

      M561;cancel any previous
      M208 S1 Z-3; allow extra Z beyond home
      G0 X140 Y105; position to centre of bed
      G91; set relative mode
      G1 Z-0.02; I repeat this move as necessary to just grip paper between bed and nozzle
      G92 Z0; sets the final position as Z0
      G90; set absolute mode
      G1 Z5; up 5mm
      G30 S-1; probe the bed and read off the trigger height from machine status Z value

      Ideally I would like to write a program for this that pauses operation after the G91 so that I can enter G1 Z-0.02 manually into the command box and send it as many times as necessary then somehow resume the code.
      I don't want to use pause.g or resume.g for this.

      deckingmanundefined 1 Reply Last reply Reply Quote 0
      • deckingmanundefined
        deckingman @handyandy
        last edited by deckingman

        @handyandy I've never used it myself but I see that M291 (Display message and optionally wait for response) now has the option to display jog buttons to quote "allow the user to adjust the head position on the specified axis". https://duet3d.dozuki.com/Wiki/Gcode#Section_M291_Display_message_and_optionally_wait_for_response

        So, possibly you could use M291 after your G91 and before your G92 Z0. Maybe with the S2 parameter and Z1 which, if my understanding is correct, ought to bring up the jog buttons . Having never used it, I don't know what resolution the jog button will give you and/or whether that can be set to 0.02.

        Edit. Or simply use M291 to give you the message box in "blocking mode", then adjust the Z height as you do now, then press enter or use M292 to resume the macro.

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        1 Reply Last reply Reply Quote 1
        • handyandyundefined
          handyandy
          last edited by

          Unfortunately that does not work. It just stops the program but does not allow any user inputs whilst stopped. Press ok and it just continues. ☹

          1 Reply Last reply Reply Quote 0
          • handyandyundefined
            handyandy
            last edited by

            Apologies - That does work! I was just putting Z and the line end and not Z1
            Thanks alot

            deckingmanundefined 1 Reply Last reply Reply Quote 1
            • deckingmanundefined
              deckingman @handyandy
              last edited by deckingman

              @handyandy said in How to pause a program/macro?:

              Apologies - That does work! I was just putting Z and the line end and not Z1
              Thanks alot

              Oh brilliant! Hoped it would work but it's not something I have personal experience of using. Is that using the jog buttons? If so, what resolution does it give you for jogging Z?

              Edit - or does it just allow you to use the "normal" jog buttons that DWC and/or panel due provide?

              Ian
              https://somei3deas.wordpress.com/
              https://www.youtube.com/@deckingman

              wilrikerundefined 1 Reply Last reply Reply Quote 0
              • wilrikerundefined
                wilriker @deckingman
                last edited by wilriker

                @deckingman said in How to pause a program/macro?:

                If so, what resolution does it give you for jogging Z?

                Edit - or does it just allow you to use the "normal" jog buttons that DWC and/or panel due provide?

                It will give you separate jog buttons included in the dialog that share the resolution of the normal ones. Only thing is that you cannot change the values in the dialog so the resolution must be set beforehand.

                EDIT: Just run

                M291 S3 Z1 R"Jog Buttons" P"Give me jog buttons!"
                

                and you'll see. It won't bite. 😉

                EDIT2: If necessary you can even get jog buttons for as many axes as you like. Just add the appropriate axis names to the command (each followed by the number 1).

                Manuel
                Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                with probably always latest firmware/DWC (incl. betas or self-compiled)
                My Tool Collection

                deckingmanundefined 1 Reply Last reply Reply Quote 0
                • deckingmanundefined
                  deckingman @wilriker
                  last edited by deckingman

                  @wilriker For info, I do use M291 a lot - just never used the jog buttons before. I would have tried it but for reasons other than fear of being bitten, I am unable to do so right now☺

                  Edit..........but thanks for confirming that the resolution of the jog buttons is inherited from DWC.

                  Ian
                  https://somei3deas.wordpress.com/
                  https://www.youtube.com/@deckingman

                  1 Reply Last reply Reply Quote 0
                  • GaryKundefined
                    GaryK
                    last edited by

                    Hi!
                    This is really a nice thing with the query pops. What I unfortunately find very bad about the jog buttons is the division 0.05 >0.5,... better would be 0.01>0.10,..,

                    On my PanelDue 7i completely different values are displayed 0.02>0.2,... The buttons don't work.
                    Firmware 1.22.1(28b1).
                    In the browser the buttons work as they should.
                    What is the reason for this?
                    Is there also a possibility to say in the dialogs go to line,... I have a huge collection of macros, but I only checked a few.

                    Sorry about my bad English!

                    wilrikerundefined 1 Reply Last reply Reply Quote 0
                    • wilrikerundefined
                      wilriker @GaryK
                      last edited by

                      @garyk said in How to pause a program/macro?:

                      What I unfortunately find very bad about the jog buttons is the division 0.05 >0.5,... better would be 0.01>0.10,..,

                      As I mentioned above you can configure the values of the jog buttons. Though not inside the dialog. Just go to the normal jog buttons on the Machine Control tab and right-click them. This will open a dialog to enter a new value for this button (and its corresponding +/- button). The buttons in the M291 dialog share the same values.

                      If you are happy with the values you have to save them via Settings -> Apply Settings or they will be lost upon reload of DWC.

                      As to your PanelDue question I am out of that because I don't have a PanelDue.

                      Manuel
                      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                      with probably always latest firmware/DWC (incl. betas or self-compiled)
                      My Tool Collection

                      1 Reply Last reply Reply Quote 0
                      • GaryKundefined
                        GaryK
                        last edited by GaryK

                        Thanks for the info! I didn't know this feature yet. Maybe there is a manual for the Panel Due. I must say that I own my board only since last week and I am enthusiastic about it.
                        I just tested something and changed the jog buttons in the browser.
                        On the panel only the values of X and Y are taken over. At Z are the 0.5,... steps still available. In the Jog menu under the tab "movement", the buttons work however as already mentioned with Z 0.05 although 0.01 was set.
                        Seems to be a bug?
                        The bug is known see also:
                        https://forum.duet3d.com/topic/9480/paneldue-request-m291-x-y-jogmenue-like-in-webinterface
                        Sry!

                        1 Reply Last reply Reply Quote 0
                        • Phaedruxundefined
                          Phaedrux Moderator
                          last edited by

                          I've found that if you start a macro on the DWC, the jog buttons that show up on the panel due will not work. However, if you start the macro on the PanelDue, they will. Also, it doesn't seem like the PanelDue movement increments are obtained from the DWC. If I start the macro from the DWC, the job buttons will take their resolution from the DWC settings, but the Panel due will still be 0.2, 2, etc.

                          Z-Bot CoreXY Build | Thingiverse Profile

                          wilrikerundefined 1 Reply Last reply Reply Quote 0
                          • wilrikerundefined
                            wilriker @Phaedrux
                            last edited by wilriker

                            @phaedrux said in How to pause a program/macro?:

                            I've found that if you start a macro on the DWC, the jog buttons that show up on the panel due will not work.

                            That sounds like a bug.

                            Also, it doesn't seem like the PanelDue movement increments are obtained from the DWC. If I start the macro from the DWC, the job buttons will take their resolution from the DWC settings, but the Panel due will still be 0.2, 2, etc.

                            But that sounds normal/expected since DWC and PanelDue are completely separate communication channels to the Duet. I think they don't even know about each other's existence.

                            Manuel
                            Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                            with probably always latest firmware/DWC (incl. betas or self-compiled)
                            My Tool Collection

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