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

    How can I stop Z moving if Z probe fails

    Scheduled Pinned Locked Moved
    General Discussion
    4
    20
    1.6k
    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.
    • appjawsundefined
      appjaws
      last edited by

      Thank you both.
      I did have the end stop connected to Z and using T2 does reverse the Z by 5mm as indicated in the trigger macro, however, It does not stop the initial movement, the reversal only happens after the move has taken place. So in the case of a probe failure, Z just keeps moving until the hotend or bed has broken.
      I have looked at all G and M codes and can not find any that will stop the current move, other than emergency stop, Is there a way to interrupt the current move and action the trigger macro?

      appjaws - Core XYUV Duet Ethernet Duex5
      firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
      Ormerod 1-converted to laser engraver, Duet wifi
      OpenSCAD version 2024.03.18
      Simplify3D 5.1.2

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

        @appjaws:

        Thank you both.
        ….....................
        I have looked at all G and M codes and can not find any that will stop the current move, other than emergency stop, Is there a way to interrupt the current move and action the trigger macro?

        Ahh, now that you mention it, that rings a bell somewhere at the back of my mind. I can't remember exactly but there was a reason why I abandoned using a macro and resorted to just doing an emergency stop. Maybe that was it. No doubt David will come along and put us both right shortly.

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

        1 Reply Last reply Reply Quote 0
        • timcurtis67undefined
          timcurtis67
          last edited by

          According to the wiki page, wouldn't using T1 cause the printer to pause? That's what you want to happen if the switch gets tripped. Have you tried that?

          1 Reply Last reply Reply Quote 0
          • appjawsundefined
            appjaws
            last edited by

            As I understand it, activating pause will run the pause macro but will not run the trigger macro, also, how would I recover from the pause, without the head moving to the original paused position?

            Maybe I will just have to use the emergency stop T0 and wait for the firmware to reboot.

            appjaws - Core XYUV Duet Ethernet Duex5
            firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
            Ormerod 1-converted to laser engraver, Duet wifi
            OpenSCAD version 2024.03.18
            Simplify3D 5.1.2

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

              Yes, pause.g is just another macro so I'd have thought that if the machine waits for the move to complete before running a trigger macro, then you'd get the same behaviour running the pause.g macro. No doubt David will put us all right.

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

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

                @appjaws:

                Maybe I will just have to use the emergency stop T0 and wait for the firmware to reboot.

                It's not a big deal to use that. Let's face it, with this "fall back switch" you'll only see this emergency stop if the Z probe fails so it won't be often - hopefully never.

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

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

                  @appjaws:

                  Thank you both.
                  I did have the end stop connected to Z and using T2 does reverse the Z by 5mm as indicated in the trigger macro, however, It does not stop the initial movement, the reversal only happens after the move has taken place. So in the case of a probe failure, Z just keeps moving until the hotend or bed has broken.
                  I have looked at all G and M codes and can not find any that will stop the current move, other than emergency stop, Is there a way to interrupt the current move and action the trigger macro?

                  A move can only be terminated by a trigger from the Z probe during a probing move, or an endstop switch trigger during a G1 S1 move, or an emergency stop, or running out of power. If you use 1.20 series firmware then you could instead use M913 Z0 to set the Z motor current to zero when a trigger occurs. However, a normal trigger doesn't have the same priority as a T0 so there might still be a delay in some cases.

                  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
                  • appjawsundefined
                    appjaws
                    last edited by

                    Thanks for all of the help.
                    I'll use T0 and forget the trigger file

                    appjaws - Core XYUV Duet Ethernet Duex5
                    firmware 3.5.0-rc.4 Web Interface 3.5.0-rc.4
                    Ormerod 1-converted to laser engraver, Duet wifi
                    OpenSCAD version 2024.03.18
                    Simplify3D 5.1.2

                    1 Reply Last reply Reply Quote 0
                    • timcurtis67undefined
                      timcurtis67
                      last edited by

                      Thank you all, This has been a good learning post. I wonder if the pause is after the programmed move is finished or after the planner buffer(?) is empty? Meaning that it completes several moves before the pause takes place?

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

                        @appjaws,
                        Paul. Off topic I know but another tip in case you don't already do it, is to lower the motor currents at the start of homing. You'll need to play around to find the right value but you are looking to find the minimum that you can home reliably at. Then if the worse happens and every switch fails, a head crash won''t do too much damage. (Don't forget to put the motor currents back up again at the end of homing).
                        Also, I added extra micro switches to X and Y and Z axes maxima and wired them all in series with the Z min so if any one triggers, it'll initiate an emergency stop. This is just for when I'm playing around and attempt to move beyond the axes limits before I've homed the printer. Oh and finally, I added big red emergency stop button and wired that to another estop. It's not a true emergency stop because it doesn't cut power, so wouldn't be much use in the event of a fire. But have an RCD conveniently placed that I can easily trip in that eventuality.

                        @timcurtis
                        Tim. I wasn't ignoring you - just don't know the answer to your question šŸ™‚ My guess would be just the current move buy David will confirm or otherwise.

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

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

                          @timcurtis67:

                          Thank you all, This has been a good learning post. I wonder if the pause is after the programmed move is finished or after the planner buffer(?) is empty? Meaning that it completes several moves before the pause takes place?

                          The trigger file starts running asynchronously with respect to commands already being executed, with a few caveats:

                          • If multiple trigger events other than T0 are pending, only one can be executed at a time. So you might have to wait until the previous trigger macro completes.
                          • There might be another process accessing the SD card at the time.
                          • If the trigger macro commands any movement or uses any command that affects movement (other than M906 and M913 in firmware 1.20 and later), all the moves already in the movement queue are completed first.

                          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
                          • timcurtis67undefined
                            timcurtis67
                            last edited by

                            Thank you for the clarification David.
                            My goal is to rig up a simple filament out switch with the pause command. At least until the filament monitors are ready for sale.

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

                              See the description of M591 in the GCode wiki.

                              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
                              • First post
                                Last post
                              Unless otherwise noted, all forum content is licensed under CC-BY-SA