Notifications
Clear all

G-Code for filament retraction  

  RSS
Ira S
(@ira-s)
Trusted Member
G-Code for filament retraction

Hi,

Whenever I finish a print and go back and start another print, some filament oozes out of the nozzle while the extruder is pre-heating. Once pre-heating is done, I wipe it off, but I have to watch and be sure to do this or the string of filament winds up as part of the print somewhere.

I'd like to add a command in Printer Settings, Custom G-Code, End G-Code to retract the filament 3mm or so automatically at the end of each print. On my previous printer that seemed to take care of the problem. And, given that the MK3 does an initial extrude strip to insure filament is flowing, the retraction won't hurt anything.

Can someone tell me what the G-Code would be to retract 3mm of filament (relative).

Thanks.

Posted : 17/10/2018 12:03 am
33edc
(@33edc)
Active Member
Re: G-Code for filament retraction

I see this is very old, I would also like to find some information about this issue.

Posted : 03/02/2019 12:45 am
Ira S
(@ira-s)
Trusted Member
Topic starter answered:
Re: G-Code for filament retraction

I added the following and it works very well

In Printer Settings, Custom G-Code, in the End G-Code block, just above the M84 line

M83 ; set to relative
G1 E-4 F900 ; retract 4mm at 15mm/sec

Posted : 03/02/2019 1:07 am
OldCoder and 33edc liked
33edc
(@33edc)
Active Member
RE: G-Code for filament retraction
Posted by: ira.s3

I added the following and it works very well

In Printer Settings, Custom G-Code, in the End G-Code block, just above the M84 line

M83 ; set to relative
G1 E-4 F900 ; retract 4mm at 15mm/sec

Thank You! Worked as I was hoping.   I still wish Prusa would add this to Slicer as an advanced setting option with warnings like they have on their other settings. 

Posted : 21/07/2019 12:28 am
TeeBell
(@teebell)
Trusted Member
RE: G-Code for filament retraction

What do you do when you change filament before a print? It would not have done a retraction before you start the next print.

 

Posted by: @ira-s

I added the following and it works very well

In Printer Settings, Custom G-Code, in the End G-Code block, just above the M84 line

M83 ; set to relative
G1 E-4 F900 ; retract 4mm at 15mm/sec

 

Posted : 14/06/2022 5:52 pm
Rob Ludwick
(@rob-ludwick)
Active Member
RE: G-Code for filament retraction

@TeeBell  

If you're changing filament by hand you can run the extruder (E-Axis) forward a few mm.  Pull off the extruded plastic, then roll back the extruder.

Settings -> Move Axis -> Extruder.

Posted : 18/09/2022 9:17 pm
CatEye
(@cateye)
Active Member
RE: G-Code for filament retraction

Thank you. Worked well. 

Posted by: @ira-s

I added the following and it works very well

In Printer Settings, Custom G-Code, in the End G-Code block, just above the M84 line

M83 ; set to relative
G1 E-4 F900 ; retract 4mm at 15mm/sec

 

Posted : 16/07/2023 9:10 pm
Share: