This is my end script. It has retraction, but it's done differently.
Most of the end scripts out there don't address oozing all that well when printing with PETG, which oozes like crazy. I use PETG a lot, so I needed to fix this.
This script is for a QIDI I-Fast with 2 extruders and meant for PETG which oozes like crazy, but doesn't ooze at 170 C or lower.
The main tweaks here that are different from the usual end script is that it retracts the active extruder tool head as usual, but it waits for the retraction to complete, and it does NOT turn the part cooling fans off, but instead turns them up 100%, immediately after retraction is complete, in order to help the active extruder tool cooldown faster to help avoid oozing. It waits for the extruder tools to cooldown with the part cooling fans on at 100%, before it ends. This works quite well actually.
Notice that the script waits for home command (G28) to complete before it ends. And finally it waits for the active tool to lower to 170 C before it turns it off. This is to ensure that the part cooling fans remain on until they are no longer needed. They do help cooldown the extruders and perform, in my opinion, a required step in the end script, which helps reduce oozing.
Code: Select all
G92 E0; Reset extruder to zero.
G1 E-2 F1800 ; Retract 2 mm @ 30 mm/s.
M400 ; Wait for movement to stop.
M106 S255 P0 ; Set part cooling fans to 100% to help cool tools.
{IF "[current_tool]==0"} M104 S0 T1 ; Turn off inactive tool T1, but don't wait for it.
{IF "[current_tool]==1"} M104 S0 T0 ; Turn off inactive tool T0, but don't wait for it.
{IF "[current_tool]==0"} M104 S170 T0 ; Cooldown active tool T0 to prevent oozing, but don't wait for it.
{IF "[current_tool]==1"} M104 S170 T1 ; Cooldown active tool T1 to prevent oozing, but don't wait for it.
G28 ; home XYZ axes
M400 ; Wait for movement to stop.
{IF "[current_tool]==0"} M109 R170 T0 ; Wait for active tool T0 to cooldown.
{IF "[current_tool]==1"} M109 R170 T1 ; Wait for active tool T1 to cooldown.
{IF "[current_tool]==0"} M104 S0 T0 ; Turn off active tool T0.
{IF "[current_tool]==1"} M104 S0 T1 ; Turn off active tool T1.
M106 S0 P0 ; Turn part cooling fans off.
Note that on the I-Fast G-Code command M106 S255 P0 controls both extruder tool part cooling fans. This is not true on a lot of other 3D printers, where the right fan is P0 and the left fan is P1 typically.
Edit: I found out after closer inspection that M109 R170 is not supported on the I-Fast. Option R waits for the cooldown or heat up, option S waits for heat up only. The I-Fast turns off the extruder if option R is used. Dissapointing.