Need some guidance on pausing a macro until I provide input
-
I've got to be missing something. I'm trying to run the following example code:
G1 H2 X30 Y30 F6000
; insert macro pause here
M25
G1 H2 X50 Y50 F6000
However, it always returns "Error: Cannot pause print, because no file is being printed!"
I'm not printing anything. I'm just putting a macro together to level my bed and need to pause so I can check the bed height. After I've done that I'd like to continue the macro by clicking resume (or something similar). I've tried M226 as well and, although I didn't receive an error, it didn't have any effect. I'm unable to use G4 because I don't know the duration of the pause.
Any guidance would be appreciated.
-
M25 is only for use during a print.
I suggest you use M291 in blocking mode (>S3)
https://docs.duet3d.com/User_manual/Reference/Gcodes#m291-display-message-and-optionally-wait-for-responseM291 R"Wait" P"Check bed height. Press OK to continue" K{"OK","Abort"} S4 if (input == 1) echo " cancelled" M99
-
@OwenD said in Need some guidance on pausing a macro until I provide input:
M291 R"Wait" P"Check bed height. Press OK to continue" K{"OK","Abort"} S4if (input == 1) echo " cancelled" M99
Thanks so much! I'm using firmware version 3.46 (I'm not aware if 3.5 is stable enough), so I had to change it a little bit. I couldn't go higher than S3 and it wouldn't accept the "input" value. I ended up using the following:
G1 H2 X30 Y30 F6000
M291 R"Wait" P"This is a pause. Press OK to continue" K{"OK","Abort"} S3
G1 H2 X50 Y50 F6000
This works great so far! Thank you again!
-
-