Stop movement immediatly
-
I want my endstop configured to stop movement immediatly in all case, whether I manually move it, or move it when running a file or macro.
After homing I reconfigure my endstops with: M581 X T2 S1 ;Reconfigure endstop to be used as limit switches (triggers). Triggers macro trigger2.g
In trigger2.g I tried all options:
;M291 P"X limit switch triggered" R"trigger2" S0 ;M0 ;Stop after buffer is completed ;M25 ;Pause print from SD card. ;M1 ;Sleep after buffer is completed ;M226 ;Gcode initiated pause M18 X ;Disable stepper motor, and resets homing does not work immideatly ;M84 X ;Stops the x motor, idle hold and resets homing, Does not works immediatly ;M112 ;Emergency stop, everyhting shuts down immediatly
But only M112 reacts instantly, and that is not what I want.
M18 X kind of does what I want, but I need the axis to stop, I do not want to reinitialize homing.Any suggestions?
-
@D-J-Klomp a bit hacky, but maybe setting motor current to 0 can work? you will still lose position so I think you won't be able to avoid rehoming.
-
@D-J-Klomp if you want to pause and maintain position, then try increasing the segmentation.
-
@D-J-Klomp Rather than post code with a semicolon in front of it, which is confusing as this is a comment in RRF code, please try using the 'Code' format from the toolbar above where you compose your message. The icon for this looks like this:
</>
This will create a paragraph enclosed by three back-ticks before it, and three after:```
Place your code between them, eg:M291 P"X limit switch triggered" R"trigger2" S0 M0 ;Stop after buffer is completed M25 ;Pause print from SD card. M1 ;Sleep after buffer is completed
In the message editor, this looks like:
```
[code here]
```
Formatting code clearly and correctly will help us help you.
Ian
-
@T3P3Tony Yeah this is a workaround that I am familiar with and is already enforced, but that only works for printed files. I do not like it that much since I need to set limitations to what my colleagues develop and it makes the file much larger than they have to be. One problem is that it does not work for manual movement which I would also like.
-
@oliof Indeed a bit hacky but might work, I will try this.
-
similar tot his thread;
https://forum.duet3d.com/topic/35152/emergency-stop/11
Did you try M0?