Software Pause, Change Filament gcode

I have been experimenting with gcode to move to a park position, retract, wait for intervention, home, and resume and this is where I’m at. Seems to work well for my needs when manually inserted into the Gcode. Octoprint will execute up to the M0 command then pause and wait for operator to hit resume. Extruder and bed stay at set temp. I’d like some criticism or ideas on how to streamline the code. I’m aware of the M600 command but the beeping drives me crazy.

				;Pause Code
G91				;Set Relative Mode
G1 E-5.000000 F500	;Retract 5mm
G1 Z15 F300			;move Z up 15mm
G90				;Set Absolute Mode
G1 X20 Y20 F9000		;Move to hold position
G91				;Set Relative Mode
G1 E-40 F500		;Retract 40mm
M0				;Idle Hold
G90				;Set Absolute Mode
G1 F5000			;Set speed limits
G28 X0 Y0			;Home X Y
M82				;Set extruder to Absolute Mode
G92 E0			;Set Extruder to 0

I may add a M300 beep in there to alert the operator that action is needed.

The question is, can you move the extruder off part, change filament, then move extruder back and have it hit the exact same spot it was before you stopped things?

Having tried this manually, I know it’s a crap-shoot.

I had FAR better results just pausing the print inside an area of infill, changing filament, and then continuing the print.

Any time I moved the extruder head mid-print, I never got it back without a visible offset.

The attached pic was done by just pausing the print in the infill and NOT moving the head away at all. Worked out very well.

Good luck and please post pics of your results.

The homing sequence for X and Y takes care of any movement that may have happened when changing filament. Even if you manually move the carriage. As long as there is no unaccounted for z movement all will be well with the world. Going back to absolute mode after homing will start the next layer perfectly.

Add this code just before the layer you want the color changed.

Hi… I am relatively new to 3D printing and have been playing with my Lulzbot mini for a few weeks now. Can someone explain actually how to do this pause. How do I edit the gcode? I only see start/end gcode. Am using Cura (the version from Ultimaker, not the Lulzbot modded one). Can’t figure out where/how to add a pause command, and how to get that new gcode loaded.

Any advice would be much appreciated. Thanks

It has to be manually edited into the gcode once the slicer has generated it.