This is a gcode snippet after some editing:
;FLAVOR:Repetier
;TIME:72843
;MINX:-84.923
;MINY:-120.182
;MINZ:0.3
;MAXX:89.004
;MAXY:109.561
;MAXZ:209.25
;MKSPREVIEWPROCESSED
; Postprocessed by [MKS WiFi plugin](https://github.com/Jeredian/mks-wifi-plugin)
; simage=0
; gimage=0
;Generated with Cura_SteamEngine 5.2.1
M82 ;absolute extrusion mode
G21 ; units to mm
G90 ; bas pos
M82 ; extruder to abs mode
M107 T0 ; fan off
M190 S70 ; wait for bed temp
M109 S215 T0 ; wait for extruder temp
; G28 ; move to origin (home)
G92 E0 ; set to position (extruder)
G0 E3 F200 ; move, extruder at feedrate
G92 E0 ;
G92 E1876.45723 ; set initial extruder amount
G0 F600 X-50.577 Y27.487 Z72 ; manual move
M107 ; fan off
G0 F600 X-50.577 Y27.487 Z69.45
G0 F7200 X-38.06 Y31.35
Stop the current printing in the air.
Keep the build plate heated, so it doesn't delaminate while fixing the gcode.
Replace the empty filament spool, and extrude some filament.
Jog the printer down to the current height of the print
Note the z value for the last printed layer
Open the gcode for the file
Leave the first 24 or so lines. They look like this:
;FLAVOR:Repetier
;TIME:72843
;MINX:-84.923
;MINY:-120.182
;MINZ:0.3
;MAXX:89.004
;MAXY:109.561
;MAXZ:209.25
;MKSPREVIEWPROCESSED
; Postprocessed by [MKS WiFi plugin](https://github.com/Jeredian/mks-wifi-plugin)
; simage=0
; gimage=0
;Generated with Cura_SteamEngine 5.2.1
M82 ;absolute extrusion mode
G21 ; units to mm
G90 ; bas pos
M82 ; extruder to abs mode
M107 T0 ; fan off
M190 S70 ; wait for bed temp
M109 S215 T0 ; wait for extruder temp
G28 ; move to origin (home)
G92 E0 ; set to position (extruder)
G0 E3 F200 ; move, extruder at feedrate
G92 E0 ;
Trim out Lines that start with
; LAYER 0
G0 F600 X-50.577 Y27.487 Z0
; ...
G0 F600 X-50.577 Y27.487 ZXXX
until you find the line that mentions zXXX
where XXX is the height you jogged to earlier.
Consider going a layer higher than the jogged position.
Do a call to set the absolute extruder position before the first G0
or G1
line
G92 E0 ;
G92 E1876.45723 ; set initial extruder amount, do this on the line after G92 E0 ;
If you omit this step you will extrude for several minutes while waiting for the print to go, and make a spagetti mess.
Sit nearby and when you hear the spool run out, pause the print.
Install a filament runout sensor and feed into that before the extruder motor.
Note that you should have an active heating drybox inline before this, and let it move in a flexible way otherwise you
will snap your filament.