Frankly, the current start gcode and end gcode suck. The start gcode causes plastic to get all over the bed, attach to the nozzle, and is just inefficient time wise for starting prints.
The end gcode is also pretty bad, leaving no room to clean nozzles, or letting plastics bend up and stick to the nozzle when they cool (Very prevalent with PETG and TPU).
Here is the following GCode I use that minimizes mess, eases cleaning, and streamlines the the printer start state and end states. I think something similar to the following should be part of the default settings. Input is welcome to try to get this as generic as possible for most printer setups:
Start GCode
M115 U3.3.1 ; tell printer latest fw version
M83 ; extruder relative mode
M140 S[first_layer_bed_temperature] ; set bed temp, continue on
M104 S{first_layer_temperature[0]-70} ; set extruder temp to 70° less than the target temp to prevent oozing, continue on.
G28 X Y Z; Home All Axis, dont do mesh bed leveling.
G1 Z150 X125 Y-2 F{machine_max_feedrate_y[0]60} ; get head above bed to keep PINDA probe cool (needed for MK2), move nozzle up and away from left side camera to make cleaning easier. I don't want to raise all the way because this might cause new filament spools to come undone which can tangle.
M190 S[first_layer_bed_temperature] ; wait for bed temp.
G28 Z ; home z without mesh level again, as bed temp has changed
G80 ; mesh bed leveling
M104 S[first_layer_temperature] ; set extruder temp to first layer temp, continue on
G1 Y-3.0 F{machine_max_feedrate_y[0]60} ; go outside print area
M109 S[first_layer_temperature]; wait for extruder temp
G92 E0
G1 X60.0 E9.0 F{machine_max_feedrate_e[0]6}; intro line part 1. mm/min.
G1 X100.0 E12.5 F{machine_max_feedrate_e[0]6}; intro line part 2. mm/min.
G92 E0
End GCode
G4 ; wait for buffer to clear
G92 E0; set extruder value back to 0
G1 E-2 F700; Retract a little. 700mm/min
M140 S0 ; turn off heatbed
M107 ; turn off fan
G1 X125 Y210 F4800; Bring print surface forward as fast as possible per min, center x to try to keep filament on spool and hotend cable off usb plug
G1 E10 F700; Crank out some plastic to weigh down the plastic thread. This prevents material from curling up as it cools, sticking to hotend. 700mm/min
G1 E-2 F700; Retract a little. 700mm/min
M104 S0 ; turn off hotend
G1 Z205 F1200; Raise to top. Because this is centered in previous gcode, the filament spool should be directly above, so the risk of unraveling the spool should be lower.
M84 ; disable motors
M104 S180 ; set extruder temp to a value below what most filaments will use to prevent leaking, TPU leaks on anything higher than 180
This could be replaced with e.g. M104 S{first_layer_temperature[0]-40} ; set extruder temp to 40° less than the target temp to prevent oozing to make it more generic
@mloidl Perfect! Just what I was looking for. Anything to save time when getting the printer ready to go is a good addition. Updated the original code.
@jindrichbenes is looking into it
On Tue, Aug 7, 2018 at 7:43 AM, GreatGrizzly notifications@github.com
wrote:
@mloidl https://github.com/mloidl Perfect! Just what I was looking for.
Anything to save time when getting the printer ready to go is a good
addition. Updated the original code.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/prusa3d/Slic3r/issues/1126#issuecomment-410939919,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFj5I8w245Hm2uqsDfD0kBP8klI0VhZBks5uOSj8gaJpZM4VxNOG
.
@GreatGrizzly I like your improvements a lot in theory, I'll try them out together with some of my improvements surely soon.
The goal is of course to eliminate any and all ooze in a fully automated manner before and after each print, but I don't imagine that is practically possible even with any amount of retraction. However, the next best goal, that is to make cleaning predictable (which in turn eliminates any and all ooze not in a fully automated manner but with manual intervention), is very much doable as you have done.
I've found the intro line to be quite effective in cancelling previous retractions, so I'd be much more liberal with retractions at the end of prints to save a bit of filament and make cleaning easier. Namely, I'd replace:
G1 E10 F900; Crank out some plastic to weigh down the plastic thread. This prevents material from curling up as it cools, sticking to hotend.
With something like:
G1 E10 F900; Crank out some plastic to weigh down the plastic thread. This prevents material from curling up as it cools, sticking to hotend.
G1 E-20 F2000; Retract to limit further oozing
The exact feedrate and amount to ensure that the intro line succeeds should of course be tested.
The reason I am not retracting so much is I don't want to clog the hot end
by pulling plastic into the top where it can't be reheated. I found that
with my MK3, 3 mm retraction is the absolute max I can do.
Ideally we would want to continuously retract filament until the filament
hardens completely. This is extremely difficult to get right. I think just
using a little extra filament is worthwhile than risking clogging the extruder with incorrect retraction settings.
A reason why I don't include variables in the end code is because I want an
end code that I can copy into the "cancel end code" text box in octoprint.
On Tue, Aug 14, 2018, 11:13 AM Ayberk Özgür notifications@github.com
wrote:
@GreatGrizzly https://github.com/GreatGrizzly I like your improvements
a lot in theory, I'll try them out together with some of my improvements
surely soon.The goal is of course to eliminate any and all ooze in a fully automated
manner before and after each print, but I don't imagine that is practically
possible even with any amount of retraction. However, the next best goal,
that is to make cleaning predictable (which in turn eliminates any and all
ooze not in a fully automated manner but with manual intervention), is very
much doable as you have done.I've found the intro line to be quite effective in cancelling previous
retractions, so I'd be much more liberal with retractions at the end of
prints to save a bit of filament and make cleaning easier. Namely, I'd
replace:G1 E10 F900; Crank out some plastic to weigh down the plastic thread. This
prevents material from curling up as it cools, sticking to hotend.With something like:
G1 E10 F900; Crank out some plastic to weigh down the plastic thread. This
prevents material from curling up as it cools, sticking to hotend.
G1 E-20 F2000; Retract to limit further oozingThe exact feedrate and amount to ensure that the intro line succeeds
should of course be tested.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/prusa3d/Slic3r/issues/1126#issuecomment-412966164,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APF2tpH9NkagWFWu86p0XOFOKEjhBE7kks5uQxNYgaJpZM4VxNOG
.
The reason I am not retracting so much is I don't want to clog the hot end
by pulling plastic into the top where it can't be reheated.
Fair enough, I see your point. Having just tried your start gcode, I can say that waiting for full temperature at (0,-3,0) effectively traps the oozed filament between the nozzle and the bed, which does not get dragged along when the intro line starts. In the end you're left with a totally clean nozzle at start of the layer 0 skirt.
Thanks for testing this. Ideally for the start code I would want to nozzle to rest entirely against the bed, minimizing the blob that forms when heating to working temperature. This would be difficult to gauge as the distance from the hotend to the bed is different for every printer.
In older iterations of the end code I pushed the nozzle against the bed to "plug" it. This prevented leaking... but caused the nozzle to stick to the bed.
@bubnikv What is the parameter to get the bed X and Y size values? The tooltip says its rect_size for both values.
Now, having tried out your end gcode, I see two potential problems with it:
G1 E10 F900 seems too much (although I'm still in the process of testing it), the extra bit to weigh down is actually a 40-50mm long line and touches the bed. This causes that long line to incline on one side, also pulling the bit that's still on the nozzle to that side as well. It's a minor issue but I'm thinking of something more like G1 E5 F900 instead. I'll try and report.I actually forgot another problem associated with (1) above: At the start of the print, the homing procedure raises the Z a bit first, which causes it to go off limits since it was parked at 205 at the end of the previous print. I'd expect this to cause extra wear on the Z axis over time. It seems like a good idea to park Z at something like max(layer_z, 195) at the end of prints.
1a. That makes sense. I never had unraveling with my spools before, but Z change should definitely be first, to tighten the roll before X/Y movements.
1b. The reason I put Z205 is I am assuming I cant go any lower because something that was printed might be at the maximum Z height of the printer. The chances that someone uses the full z axis for a print is rare...but its a possibility. As for wear on the motors...I haven't considered that. I don't know how significant this would be as the MK3 is built to skip steps for homing procedures.
I am not sure of the logic for why z homing raises Z before lowering. The only thing I could think of is if the nozzle is below zero when it starts. But if that's the case, the probe will be on...indicating that its too close to the bed. @bubnikv Could this be a potential bug?
I edited the start code to home z first, than do X and Y.
After some testing, it appears that the Z axis cant be homed before X and Y. This is built into the printer firmware itself. The parameter is Z_SAFE_HOMING. So we are stuck with my current implementation.
I'm not sure either of the logic behind the initial Z raise when homing; it could make sense from the perspective of clearing the extruder from any potential object on the bed surface, but I'm guessing it's supposed and assumed to be totally clear before each print.
For now I'll go with something like G1 Z{max(layer_z, 150)} F1200 at the end of prints as I don't have the requirement to push unparameterized gcode from somewhere else. The exact amount is to be determined by whether any filament unravels from the spool at the start of the next print.
Regarding the start g-code, at the point where you move the head at 0,-3,0 in order to trap any oozed filament between the bed and the nozzle.
I've used this technique on a MK2 for about 9 months. It worked. But then the PEI has got unstuck from the bed at this corner and later it broke.
I don't now if this is still possible on a MK3 flexible steel plate.
Very interesting point. Maybe we could offset the waiting point and intro line by something like +50 on the x axis to not stress the corner too much?
@Panayiotis-git I've offset the ooze trap and intro line X coordinates by +75, my intro gcode looks like this:
M115 U3.3.1 ; tell printer latest fw version
M83 ; extruder relative mode
M140 S[first_layer_bed_temperature] ; set bed temp, continue on
M104 S{first_layer_temperature[0]-70} ; set extruder temp to 70° less than the target temp to prevent oozing, continue on.
G28 W ; home all without mesh bed level
G1 Z150 X125 Y-2 F{machine_max_feedrate_y[0]60} ; get head above bed to keep PINDA probe cool (needed for MK2), move nozzle up and away from left side camera to make cleaning easier. I don't want to raise all the way because this might cause new filament spools to come undone which can tangle.
M190 S[first_layer_bed_temperature] ; wait for bed temp.
G28 Z ; home z without mesh level again, as bed temp has changed
G80 ; mesh bed leveling
M104 S[first_layer_temperature] ; set extruder temp to first layer temp, continue on
G1 X75.0 Y-3.0 F{machine_max_feedrate_y[0]60} ; go outside print area
M109 S[first_layer_temperature]; wait for extruder temp
G92 E0
G1 X135.0 E9.0 F{machine_max_feedrate_e[0]9}; intro line at max mm/s
G1 X175.0 E12.5 F{machine_max_feedrate_e[0]9}; intro line at max mm/s
G92 E0
M221 S{if layer_height==0.05}100{else}95{endif}
Although still close to the edge, I think this location would provide relatively better heat dissipation compared to the corner, extending the PEI coating lifetime.
Otherwise, I've found this intro to be quite robust so far. As long as the nozzle is clean from the previous print (which can be done easily when it's cold thanks to the end code) I can simply start the new print and walk away. No preheating, no ooze cleaning in real time. I'd like to see at least this performance in the official start/end gcode.
I found that heating the pinda probe itself to a temp higher than it would usually ever be when starting a print reduced the z height variance more than probing a hot bed with a pinda that may, or may not be warm already. For instance, when you start a new print shortly after finishing one, the pinda is warm. When starting a new print on a dead cold printer, the pinda is cold. This DOES make a difference. So before mesh bed leveling, I move the nozzle to bed center and then heat the bed to 60. I also preheat the nozzle to 130. So mesh leveling is done with consistent hot temps. I do not have to change my z height when changing filament types UNLESS a specific filament prefers to be squished or not squished on the first layer.
First of all, we were unable to replicate the issue, during testing, the nozzles practically didn't leave ooze on bed. Secondly, letting nozzle cool down and heat up again added some 75 seconds to start print time, That can be unpleasant to some users, to which, mesh bed leveling takes too long already as it is. Third issue would be, that should there be any leftover plastic on cooled nozzle, this plactic could compromise the mesh bed leveling. This does not happen with hot nozzle.
Still, we will continue looking into this issue to come up with a solution.
@jindrichbenes:
during testing, the nozzles practically didn't leave ooze on bed
Seriously, I find it very hard to believe that you didn't have ooze during the initial heat up at the start of the print, which is a normal phenomenon unless measures are taken against it. Without manual cleaning during the limited time when the print is about to start (while the nozzle is hot BTW), this gets on the bed and the first few layers very easily. What's worse, it tends to curl up and get on the nozzle, polluting it over time. This is true for all the filaments I tested so far, including the Prusa filament that came with the printer. If you really need, I can provide a video of exactly this happening.
letting nozzle cool down and heat up again added some 75 seconds to start print time, That can be unpleasant to some users, to which, mesh bed leveling takes too long already as it is.
The start routine does not cool down the nozzle in any way, the temperature deltas are the same, and the time should be very similar. If you're referring to the cooling after the print ends, it will happen enough in any case while the object(s) is(are) removed from the bed and the intro line is cleaned. But seriously, given that FDM prints still usually take on the order of hours, if 1-2 minutes extra (which ensures a clean first layer) bothers a user, they should probably give up 3D printing.
should there be any leftover plastic on cooled nozzle, this plactic could compromise the mesh bed leveling
Mesh bed leveling is not done with a cold nozzle, 140+ degrees is still enough for the filaments to be quite compliant. In any case, the nozzle should be cleaned after the print is done and the nozzle cools down, and the ooze stops completely (which easily happens until the object(s) is(are) removed from the bed and it is cleaned). If the nozzle is cold to the touch, it can be easily done by hand as well.
I'm honestly suspecting that you're testing other gcodes than the ones given in this issue...
@tjcolejr I did not test this but it does make sense to "preheat" to known temperatures and calibrate/level with those.
What's more, I realized that first_layer_temperature[0]-70 is not completely enough to keep PETG from oozing (160 degrees), there's just a little bit that comes out but still there is ooze. I think a global 140 (or maybe 150 degrees, needs to be tested) would be better in the end.
The oozing during mesh bed leveling using the standard gcode is simply not debatable. It has been a complaint for at least 2 years. And if the variance of the pinda's accuracy due to temperature wasn't an issue, then the pinda 2 would not have a temperature sensor. Heating the pinda and bed to a consistent temperature well above ambient prior to probing eliminates the temperature variable.
From: Ayberk Özgür notifications@github.com
Sent: Monday, September 3, 2018 9:24:47 AM
To: prusa3d/Slic3r
Cc: Tom Cole; Comment
Subject: Re: [prusa3d/Slic3r] End Code and Start Code Improvements (#1126)
@jindrichbeneshttps://github.com/jindrichbenes:
during testing, the nozzles practically didn't leave ooze on bed
Seriously, I find it very hard to believe that you didn't have ooze during the initial heat up at the start of the print, which is a normal phenomenon unless measures are taken against it. Without manual cleaning during the limited time when the print is about to start (while the nozzle is hot BTW), this gets on the bed and the first few layers very easily. What's worse, it tends to curl up and get on the nozzle, polluting it over time. This is true for all the filaments I tested so far, including the Prusa filament that came with the printer. If you really need, I can provide a video of exactly this happening.
letting nozzle cool down and heat up again added some 75 seconds to start print time, That can be unpleasant to some users, to which, mesh bed leveling takes too long already as it is.
The start routine does not cool down the nozzle in any way, the temperature deltas are the same, and the time should be very similar. If you're referring to the cooling after the print ends, it will happen enough in any case while the object(s) is(are) removed from the bed and the intro line is cleaned. But seriously, given that FDM prints still usually take on the order of hours, if 1-2 minutes extra (which ensures a clean first layer) bothers a user, they should probably give up 3D printing.
should there be any leftover plastic on cooled nozzle, this plactic could compromise the mesh bed leveling
Mesh bed leveling is not done with a cold nozzle, 140+ degrees is still enough for the filaments to be quite compliant. In any case, the nozzle should be cleaned after the print is done and the nozzle cools down, and the ooze stops completely (which easily happens until the object(s) is(are) removed from the bed and it is cleaned). If the nozzle is cold to the touch, it can be easily done by hand as well.
I'm honestly suspecting that you're testing other gcodes than the ones given in this issue...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/prusa3d/Slic3r/issues/1126#issuecomment-418114536, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AX2cNk8hCl6AaXjVdSb1q_B_kZukJ1prks5uXS2fgaJpZM4VxNOG.
@tjcolejr:
The oozing during mesh bed leveling using the standard gcode is simply not debatable. It has been a complaint for at least 2 years.
Moreover, it is a problem common to practically all printers, ones with bowden extruders being more susceptible. It is simply due to gravity, pressure buildup within the chamber, thermal expansion when heating up and possibly other factors.
Tried running this code on my MK2 and latest slic3r won't export after slicing.
Failed to process the custom G-code template start_gcode
Parsing error at line 4: Invalid utf8 sequence
M104 S{first_layer_temperature[0]-70} ;
I guess that's not available at the firmware level that us MK2 users are stuck with.
Tried running this code on my MK2 and latest slic3r won't export after
slicing.
By my mistake, you received Slic3r profiles incompatible with your current
Slic3r. Sorry about that. The best for you is to update your slic3r:
https://github.com/prusa3d/Slic3r/releases
On Mon, Sep 3, 2018 at 5:11 PM joeynuggetz notifications@github.com wrote:
Tried running this code on my MK2 and latest slic3r won't export after
slicing.
Failed to process the custom G-code template start_gcode
Parsing error at line 4: Invalid utf8 sequence
M104 S{first_layer_temperature[0]-70} ;I guess that's not available at the firmware level that us MK2 users are
stuck with.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/prusa3d/Slic3r/issues/1126#issuecomment-418141814,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFj5I8ASMtH_LNYoSMJKwyA3hJCaJMHpks5uXUaWgaJpZM4VxNOG
.
I'm already running 1.41.0.
@joeynuggetz Try manually typing in the line that is giving you trouble instead of copying and pasting.
I work mostly with PETG on my mk3 which lives up to its reputation of oozing and stringing. I always have oozing and stringing during leveling. Two observations that I hope can be fitted into the above discussion.
First, every print leaves a string from the end of the print to the home position so please consider a retraction at the end of the print.
Second, almost every print leaves a string from the end of the first line to the start of the print. Again, a retraction should help.
Shouldn't this issue be in the Slic3r Settings section?
https://github.com/prusa3d/Slic3r-settings
@mwhincup I have an issue open there as well. Issue #45
I am getting a lot more traction and interest here though.
@hawalter What changes do you propose? I have been updating the code in my original post over time as I have been experimenting.
@GreatGrizzly I am new to 3D printing, slic3r and Gcodes so I will have to use english instead of gcodes.
In slic3r->Printer Settings->Extruder 1 under the Retraction section, there are numerous retraction parameters. In short, apply them every time after filament extrusion and before a move.
In particular, retract
at the end of the first strip and before the move to either the brim or the build.
at the end of the brim (if there is one) and before the move to start the build.
at the end of the build and before the move to home.
I am wondering (hoping!) if the retraction before the home will reduce the pressure in the extruder and cause less oozing for the next bed leveling.
@jindrichbenes You said you could not replicate the oozing. Did you try PETG?
I also realized that enabling the fan at 100% at the end of the print to speed up cooling might be a good way to reduce oozing by getting to <150C as fast as possible.
@hawalter I am not quite following you. It might be better for you to post some gcode to explain what you mean.
@ayberkozgur That sounds like a good idea, though I wonder if setting the fan to full speed might have the plastic swing up and stick to the hotend.
That's a possibility but I doubt the fan would be powerful enough. I'm
planning to test it soon.
On 24.10.18 23:59, GreatGrizzly wrote:
>
@hawalter https://github.com/hawalter I am not quite following you.
It might be better for you to post some gcode to explain what you mean.@ayberkozgur https://github.com/ayberkozgur That sounds like a good
idea, though I wonder if setting the fan to full speed might have the
plastic swing up and stick to the hotend.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/prusa3d/Slic3r/issues/1126#issuecomment-432842918,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB4gDKC0y23RH7Xq3O3ITGF-qF0zYHQZks5uoOK_gaJpZM4VxNOG.>
Ayberk Özgür,
Postdoctoral Researcher
CHILI Laboratory, EPFL
www.ayberkozgur.com
Is there any planned work on this issue?
@GreatGrizzly I ended up here googling for _rect_size slic3r_ : have you found the answer? Anyone?
I searched the code and tried x_max, y_max, rect_size[0], rect_size.x but to no avail
@apphead Did you find a solution? I am also interested in it.
Hi everyone, after a lot of trial and error I finally found what I call "The Holy Grail" of the start and end G-Codes! lol ;p
I extracted some ideas of this post (thanks for that!).
It is clean after the mesh bed leveling and clean after the end of the printing.
I used PETG for the testings at 230° C and 250° C.
The code under 230° C also goes very well with PLA at 215° C.
My printer is a Prusa MK2.5S
I found that the secuential retractions are better than the continuous retractions for this purpose (having the nozzle 100% clean).
The first time as start and end retractions are not balanced, the intro line will have too much extrusion at the begining, on the second printing retractions will be balanced and the intro line will be OK
Using 230° C
Start G-Code:
M862.3 P "[printer_model]" ; printer model check
M862.1 P[nozzle_diameter] ; nozzle diameter check
M115 U3.9.1 ; tell printer latest fw version
G90 ; use absolute coordinates
M83 ; extruder relative mode
M104 S160 ; set extruder leveling temp
M140 S[first_layer_bed_temperature] ; set bed temp
M190 S[first_layer_bed_temperature] ; wait for bed temp
M109 S160 ; wait for extruder leveling temp
G28 W ; home all without mesh bed level
G80 ; mesh bed leveling
G1 Z{first_layer_height + z_offset} ; Lower to print first layer
M104 S[first_layer_temperature] ; set extruder temp
M109 S[first_layer_temperature] ; wait for extruder temp
G92 E0.0
G1 E7.5 F700
G1 X60.0 E9.0 F1000.0 ; intro line
G92 E0.0
G1 E-0.5 F900; Retract a little. 900mm/min
End G-Code:
G4 ; wait
G92 E0 ; set extruder value back to 0
G1 E-1 F700 ; Retract 700mm/min
M104 S0 ; turn off temperature
M140 S0 ; turn off heatbed
M107 ; turn off fan
{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+5, max_print_height)}{endif} ; Move print head up
G1 E-0.5 F700 ; Retract 700mm/min
G4 P300
G1 E-0.5 F700 ; Retract 700mm/min
G4 P300
G1 E-0.5 F700 ; Retract 700mm/min
G4 P300
G1 E-0.5 F700 ; Retract 700mm/min
G4 P300
G1 E-0.5 F700 ; Retract 700mm/min
G4 P300
G1 E-0.5 F700 ; Retract 700mm/min
G4 P300
G1 E-0.5 F700 ; Retract 700mm/min
G4 P300
G1 E-0.5 F700 ; Retract 700mm/min
G4 P300
G1 E-0.5 F700 ; Retract 700mm/min
G4 P300
G1 E-0.5 F700 ; Retract 700mm/min
G4 P300
{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+50, max_print_height)}{endif} ; Move print head up
G1 E-2 F700 ; Retract 700mm/min
G4 P300
G1 X0 Y200 F3000 ; home X axis
M900 K0 ; reset LA
G4 P15000
M84 ; disable motors
Using 250° C
Start G-Code:
M862.3 P "[printer_model]" ; printer model check
M862.1 P[nozzle_diameter] ; nozzle diameter check
M115 U3.9.1 ; tell printer latest fw version
G90 ; use absolute coordinates
M83 ; extruder relative mode
M104 S160 ; set extruder leveling temp
M140 S[first_layer_bed_temperature] ; set bed temp
M190 S[first_layer_bed_temperature] ; wait for bed temp
M109 S160 ; wait for extruder leveling temp
G28 W ; home all without mesh bed level
G80 ; mesh bed leveling
G1 Z{first_layer_height + z_offset} ; Lower to print first layer
M104 S[first_layer_temperature] ; set extruder temp
M109 S[first_layer_temperature] ; wait for extruder temp
G92 E0.0
G1 E15 F700
G1 X60.0 E9.0 F1000.0 ; intro line
G92 E0.0
G1 E-0.5 F900; Retract a little. 900mm/min
End G-Code:
G4 ; wait
G92 E0 ; set extruder value back to 0
G1 E-4 F700 ; Retract 700mm/min
M104 S0 ; turn off temperature
M140 S0 ; turn off heatbed
M107 ; turn off fan
{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+5, max_print_height)}{endif} ; Move print head up
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
G1 E-0.5 F700 ; Retract 700mm/min
G4 P150
{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+50, max_print_height)}{endif} ; Move print head up
G1 E-2 F700 ; Retract 700mm/min
G4 P150
G1 X0 Y200 F3000 ; home X axis
M900 K0 ; reset LA
G4 P15000
M84 ; disable motors
Hope it helps!
@ayberkozgur @apphead @GreatGrizzly @wolfgangmauer
Settings are better discussed in https://github.com/prusa3d/PrusaSlicer-settings/issues
I bet a duplicate of this discussion is to be found there.
Closing.
Most helpful comment
This could be replaced with e.g.
M104 S{first_layer_temperature[0]-40} ; set extruder temp to 40° less than the target temp to prevent oozingto make it more generic