@dc42 said in G-code trouble, filament completely retracts:
@Bridge-Of-Don said in G-code trouble, filament completely retracts:
We are using 'AstroPrint' as a method of slicing and it appears to use 'CURA
It's a feature of Cura that even if you set it to use relative extrusion, it switches back to absolute extrusion before running code that you supplied in the slicer configuration. So, unless this has been changed, you will need to include M83 in your slicer end gcode.
Been away for a short while and nobody else seems willing, but I found that there is an option to set the 'Start' & 'End' code within AstroPrint (and I guess CURA?) so it will always use those bespoke settings for our printer.
This seems to have cured the issue as simply added the M83 command , and whilst there tidied/edited a few of the deafult settings to make for a cleaner start and stop.
Our bespoke ending code now looks like this
G4 ; Wait
M220 S100 ; Reset Speed factor override percentage to default (100%)
M221 S100 ; Reset Extrude factor override percentage to default (100%)
G91 ; Set coordinates to relative
M83 ; RELATIVE extrusion mode
G1 F1800 E-3 ; Retract filament 3 mm to prevent oozing
G1 F3000 Z20 ; Move Z Axis up 20 mm to allow filament ooze freely
(although this still gets a string, which we can live with)
G90 ; Set coordinates to absolute
G1 X0 Y280 F1000 ; Move extruder to the back for easy print removal
M84 ; Disable stepper motors
; End of GCode
M82 ;absolute extrusion mode
M104 S0
;End of Gcode