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 !
-
@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
-
@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?
-
@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
-
@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
-
@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
-
@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
-
@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
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