Problems with macros
-
Hello. I would like to write a macro that pauses my printer, homes the x and y axes, and then resumes.
I have tried creating a macro that calls pause.g, homex.g and homey.g, and then resume.g, but I just got some really bizarre shaking behavior, not at all like running those files from the dashboard. I also just copied and pasted the gcode from those files into one macro and the behavior was just as strange. What am I doing wrong here?
-
How were you calling those macros?
What exactly are you trying to do?
Do you really need to pause?
Is this intended to be doing during a print?To call a pause you'd probably want to call M25, then G28 X, then G28 Y, then M24 to resume.
https://docs.duet3d.com/User_manual/Reference/Gcodes#m25-pause-sd-print
-
@Phaedrux Thank you for your reply! Sometimes my nozzle will rake across a particularly rough patch, and cause a layer skip. I can hear it when this happens, so I press pause, then I re-calibrate the x and y axes, then I resume, and no problem. I was trying to make a macro that can do all 3. I will try doing what you said, M25 then G28 X and Y, then M24.
-
@tylersuard said in Problems with macros:
Sometimes my nozzle will rake across a particularly rough patch, and cause a layer skip.
THAT would be the thing to spend time on. You should not be getting rough patches like that often enough to want to write a macro to work around it.
An occasional ooze or blob is one thing, but as I read your post, if this happens often, let figure what is causing the condition and fix it.
-
Yes solving the rough spots would be the best way to go.
If all you want to do is home the X and Y during a pause, simply add G28 XY to your pause.g macro.