Prevent retraction that is happening before print starts?

Prevent retraction that is happening before print starts?  

New Member

Hi there,

I'm having some trouble with PrusaSlicer start code.

I'm using a purge line startup, but the slicer is performing a retraction before starting the print, which causes problems. I see which lines of gcode to remove to get the behaviour I'm looking for, but can't figure out how to configure it to stop inserting them.

I use the same startup procedure on other slicers and haven't run into this problem before. I'm loving PrusaSlicer and would like to figure this out so I can switch.

; generated by PrusaSlicer 2.2.0+win64 on 2020-07-01 at 19:23:56 UTC

G28 ; home all axes
G1 Z2 F5000 ; lift nozzle
G1 X180 Y40 F10000;
G1 Z0 F5000 ; lift nozzle
M190 S55;
M109 S220;
G92 E0;
G0 E7 Y0 F500;
G0 E2 F200;
G0 E1 F100;
G4 P700; wait
G1 X175 Y0 F10000;
G21 ; set units to millimeters
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
G92 E0
; Filament gcode
G1 Z0.250 F7800.000
G1 E-4.00000 F2400.00000
G92 E0
G1 X60.693 Y69.725 F7800.000
G1 E4.00000 F2400.00000
G1 F420.000
G1 X60.518 Y68.815 E4.03528

When I remove the lines highlighted in red, the print starts flawlessly. It purges and then starts the print without a drip or string in sight. If I set retraction to 0, I get the same good behaviour, but that obviously causes other problems with the print.

Any ideas how I can stop this from happening? -- To essentially have no retraction before the print starts? I'm at the point of writing a script to remove those lines after generating gcode, but would rather stick to something more official and robust if possible.

Thanks for any help and insight!

Posted : 01/07/2020 8:43 pm
Noble Member

Can you save a project (save as .3mf) and then zip it up and attach it.  That way we can see what all your printer settings are and can generate gcode using your setup.

Posted : 01/07/2020 10:00 pm
New Member

Sure thing, here it is. Thanks for the help!


Posted : 01/07/2020 11:23 pm
Illustrious Member

Prusa made recent firmware changes which affect how changes to relative or absolute positioning gcode commands affect extrusion that may be playing into this. Are you getting a lot of retraction when you try this? I notice you're using the following:

G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
G1 E-4.00000 F2400.00000

With the extruder in absolute mode, it is trying to reposition (retract) to the -4 position. I use relative extruder moves throughout the prime line routine

For Cura, I have to set the extruder to relative for the prime line, but insert an M82 for absolute extruder mode during the print

My notes and disclaimers on 3D printing and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan...
Posted : 01/07/2020 11:26 pm
New Member

Sorry for the delay, finally had a chance to play around with it.

Thank you for the help!

Changing to absolute distances did the trick, and I'm printing without a skirt again 🙂 

Posted : 18/07/2020 7:32 pm
New Member


Thanks for the file

Posted : 21/07/2020 6:05 am

Please Login or Register