<p>I own a delta 3D printer. The problem is that, at the beginning of a print the extruder outputs dirty filament. I want a clean filament flow at the start of my prints!</p>

<p>How can I make the hotend exit the print surface (glass plate) by 10mm, extrude the bad filament and go back to printing again? Can this be done with G-code?</p>

<p>My Z high is 190&nbsp;mm and the glass plate diameter is 120&nbsp;mm. I'm using Marlin + Ramps 1.4. </p>

<p>I'm using Repetier-Host and CuraEngine as Slicer, but I really would like a G-code that can work on multiple environments like Cura and Repetier. I just want to add it to the start G-code and print!</p>

[{'answer_id': 2610, 'author': 'StarWind0', 'author_id': 2146, 'author_profile': 'https://3dprinting.stackexchange.com/users/2146', 'pm_score': 3, 'selected': False, 'text': '<p>A lot of slicers will have a Wipe option. Here are some examples:</p>\n\n<ul>\n<li><p>See <a href="https://jinschoi.github.io/simplify3d-docs/" rel="nofollow noreferrer">Unofficial Simplify3D Documentation</a>. Go to the section talking about <em>Wipe Nozzle</em>, under the heading <strong>Extruder Tab</strong></p>\n\n<blockquote>\n  <p>Two more ooze-fighting options are Coast at end and Wipe nozzle. Coast turns off the extruder the specified distance before it normally would, to drain what would have oozed as the end of a line. This can help with ooze-induced blobs at the end of lines, but if turned up too high will lead to gaps in your print walls. Changes to this setting will be visible as gaps in the g-code preview.</p>\n  \n  <p>Wipe has the nozzle retrace over the start of a perimeter line at the\n  end of a perimeter for the specified distance with the extruder off,\n  to leave any ooze behind before proceeding. It is similar to Coast in\n  that it moves the extruder without extruding, but wipe occurs after\n  the end of the line while coast occurs before.</p>\n</blockquote></li>\n<li><p>Slic3r has some sort of coasting. But I think in their docs the option is there: <a href="http://manual.slic3r.org/expert-mode/fighting-ooze" rel="nofollow noreferrer">Slic3r Manual - Fighting Ooze</a></p>\n\n<blockquote>\n  <p>Wipe before retract - Moves the nozzle whilst retracting so as to reduce the chances of a blob forming.</p>\n</blockquote></li>\n</ul>\n\n<p>As you asked for G-Code here you go:</p>\n\n<ul>\n<li><p><a href="http://forums.reprap.org/read.php?4,620368" rel="nofollow noreferrer">Reprap Forum - Wipe nozzle via GCODE</a></p>\n\n<p>Example</p>\n\n<pre><code>;Sliced at: {day} {date} {time}\n;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Filament cost: {filament_cost}\n;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line\n;M109 S{print_temperature} ;Uncomment to add your own temperature line\nG21        ;metric values\nG90        ;absolute positioning\nM82        ;set extruder to absolute mode\nM107       ;start with the fan off\nG28 X0 Y0  ;move X/Y to min endstops\nG28 Z0     ;move Z to min endstops\nM117 Auto-level...\nG29        ;auto-level\n;G92 Z-.01 ; Lower = Z Pos, Lift = Z Neg\nM117 Preparing...\nG1 Z10.0 F{travel_speed} ;move the platform down 15mm\nG92 E0                  ;zero the extruded length\nG1 F100 E30              ;extrude 10mm of feed stock\nG92 E0                  ;zero the extruded length again\nG1 F{travel_speed}\n;Put printing message on LCD screen\nM300 S900 P160         ;start beep\nM300 S1000 P160\nM300 S2000 P160\nM0    ;Wait for the user\nM117 Printing...\n</code></pre></li>\n<li><p><a href="https://forum.lulzbot.com/viewtopic.php?t=2921" rel="nofollow noreferrer">Lulzbot forum - Start GCODE Script for Wipe</a>, in particular <a href="https://forum.lulzbot.com/viewtopic.php?t=2921#p17782" rel="nofollow noreferrer">this post</a>:</p>\n\n<p>Example</p>\n\n<pre><code>G91 ; switch to relative positioning\nG1 Z10 ; safe raise of z axis to ensure probe doesn\'t hit bed clamp\nG90 ; switch back to absolute positioning\nG28 ; home all axes\nG29 ; level print bed\nG1 X298 Y137 Z2 F5000 ; move to wait position right hand side of the table\nG1 Z0.4 ; position nozzle\nG1 E25 F300 ; purge nozzle\nM400 ; wait for purge to complete\nG1 X285 F1200 ; slow wipe\nG1 Z0.5 F1200 ; lift\n</code></pre></li>\n</ul>\n\n<p>That should get you started.</p>\n'}, {'answer_id': 2611, 'author': 'Tom van der Zanden', 'author_id': 26, 'author_profile': 'https://3dprinting.stackexchange.com/users/26', 'pm_score': 4, 'selected': True, 'text': "<p>You can achieve this using the <code>G1</code> command. I don't know your exact printer, but you should be able to use something like this (add to the start G-code in your slicer):</p>\n\n<pre><code>G1 X0 Y62 Z0.2 F9000 ; Move slightly past edge of bed\n\nG92 E0 ; Zero extruder position\n\nG0 E1 F100 ; Extrude 1mm of filament\n\nG92 E0 ; Zero again\n\nG1 X0 Y0 F9000 ; Move back to center of bed\n</code></pre>\n\n<p>The first line moves the extruder to slightly past the edge of the bed (since the diameter is 120, the radius is 60, and 62 is slightly past the maximum radius). I've set Z to 0.2mm to avoid hitting the plate, but you might be able to lower this.</p>\n\n<p>The next 3 lines zero the extruder position, extrudes 1mm of filament, and resets it to zero (when starting a print the slicer expects E to start at 0).</p>\n\n<p>The final line moves back to the bed center. This might not be neccesary (you might be able to replace this line with just <code>G1 F9000</code> to set the feedrate back to something that makes sense for travel moves) because you don't need to move back explicitly: the slicer will take care of moving the head in position to start the print.</p>\n"}, {'answer_id': 3469, 'author': 'Nicu Surdu', 'author_id': 5567, 'author_profile': 'https://3dprinting.stackexchange.com/users/5567', 'pm_score': 3, 'selected': False, 'text': '<p>Slic3r, and all other slicers that I saw, have an option called <code>Skirt</code> that enables your printer to print a number of lines around your object before it starts printing the object itself.</p>\n\n<p>This should ensure that both the nozzle is filled with filament and the printer got rid of any burned / dirty filament when it starts printing your object.</p>\n\n<p>If you use Slic3r as standalone, you have to activate expert mode in the preferences. If you use it through Repetier-host it should already be in expert mode.</p>\n\n<p>You can see all available options in the <a href="http://manual.slic3r.org/expert-mode/skirt" rel="noreferrer">Slic3r documentation for Skirt</a>.</p>\n'}]
['https://3dprinting.stackexchange.com/questions/2607', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/3791/']