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

    stop movement when endstop is triggered

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    4
    8
    382
    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.
    • tom33undefined
      tom33
      last edited by

      Hi,

      I would like to allow movement when the axis is not homed but I also would like to stop the movement is the end-stop is triggered.
      Is there a way to do that ?

      For example In smoothie there is the function "alpha_limit_enable"

      Thanks !

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

        @tom33 said in stop movement when endstop is triggered:

        Hi,

        I would like to allow movement when the axis is not homed but I also would like to stop the movement is the end-stop is triggered.
        Is there a way to do that ?

        For example In smoothie there is the function "alpha_limit_enable"

        Thanks !

        Unless something has changed since my last testing for this it will require a change in the firmware.

        @dc42 could provide the complete answer.

        Frederick

        Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

        kb58undefined 1 Reply Last reply Reply Quote 0
        • kb58undefined
          kb58 @fcwilt
          last edited by

          @fcwilt Fredrick, I've seen posts by some advanced users where they're directly accessing the Duet firmware. Are there not global flags for X, Y, and Z homing? If so, it seems like these flags could be could be temporarily loaded with "Homed" and the extruder moved as desired. Or are these flags unavailable?

          Scratch-built 350mmx350mm coreXY, linear rails, ballscrews, 3 Z axis, Duet3 6HC, v3.3, Tool Board v1.1, BondTech LGX + Mosquito hot end

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

            @kb58 said in stop movement when endstop is triggered:

            @fcwilt Fredrick, I've seen posts by some advanced users where they're directly accessing the Duet firmware. Are there not global flags for X, Y, and Z homing? If so, it seems like these flags could be could be temporarily loaded with "Homed" and the extruder moved as desired. Or are these flags unavailable?

            Well you can always use M564 to enable/disable movement when an axis is not homed. It also can be used to enable/disable movement past the M208 limits.

            The problem, at least when I last tested, is that there is no way (or was no way) to detect endstop activation during a move unless it uses H1, H3 or H4.

            Frederick

            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

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

              @fcwilt said in stop movement when endstop is triggered:

              The problem, at least when I last tested, is that there is no way (or was no way) to detect endstop activation during a move unless it uses H1, H3 or H4.

              Unless you redefine it as a trigger when not being used as an endstop for homing.

              https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M581_Configure_external_trigger

              Z-Bot CoreXY Build | Thingiverse Profile

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

                @phaedrux said in stop movement when endstop is triggered:

                Unless you redefine it as a trigger when not being used as an endstop for homing.

                I haven't tried that in a while but when I last tried it the trigger code didn't execute until the movement completed.

                I intended to test again today to see if the behavior has changed since that earlier test - but I haven't found the time - yet.

                Frederick

                Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

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

                  @fcwilt said in stop movement when endstop is triggered:

                  the trigger code didn't execute until the movement completed.

                  This may be improved by increasing the segmentation of long moves using M669 S T

                  https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_Parameters_for_Cartesian_CoreXY_CoreXZ_CoreXYU_CoreXYUV_MarkForged_kinematics_RRF_2_03_and_later_only

                  Z-Bot CoreXY Build | Thingiverse Profile

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

                    @phaedrux said in stop movement when endstop is triggered:

                    @fcwilt said in stop movement when endstop is triggered:

                    the trigger code didn't execute until the movement completed.

                    This may be improved by increasing the segmentation of long moves using M669 S T

                    https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_Parameters_for_Cartesian_CoreXY_CoreXZ_CoreXYU_CoreXYUV_MarkForged_kinematics_RRF_2_03_and_later_only

                    I will try that.

                    It may be that my memory is faulty regards triggers and moves and my past testing - that would not be the first time - getting old is not fun.

                    I just tested a trigger under 3.3 and it does fire while the move is underway.

                    However I could not find any way to abort the move. M0 and M1 finish any moves in the buffer so that doesn't work.

                    I tried having a trigger set a global variable exit_loop. I installed a sensor on the X axis to fire the trigger. Then I created this macro

                    G90
                    G1 X0 ; just moving to a start position
                    G91
                    while iterations < 10
                      G1 X10
                      if {global.exit_loop} = 1
                        break
                    G90
                    

                    The problem there, of course, is the loop quickly does all 10 iterations, putting all 10 moves in the buffer, and the loop is finished long before the trigger is ever fired.

                    I added a G4 command at the bottom of the loop, which worked in the sense that the loop was still going by the time the trigger fired and was able to terminate the loop but the result was move, wait, move, wait, etc which is likey not going to be acceptable.

                    I'm glad to test any ideas you might have.

                    Frederick

                    Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

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