Zakm0n
Posts: 3
Joined: Thu Aug 27, 2015 5:42 am

Need help writing custom GCODE for tool change on duplicator

I want to write some GCODE to help get my dual extrusion to work better. The parts I am printing only require the second extruder in the last 15% of the print, so while the extruder is inactive, I'd like to have it's heater turned off to prevent ooze. Once it reaches the layer that triggers the tool change, I'd like to lift the extruder until the newly activated one reaches temp, then drop and continue printing. Anyone know how to accomplish this?
JoeJ
Posts: 1435
Joined: Sun Feb 16, 2014 10:52 am

Re: Need help writing custom GCODE for tool change on duplic

So you just need to lift the extruder and then heat it up at a specific layer.

So to lift the extruder, I would use these 3 commands

Code: Select all

G91 ; switch to relative distances
G1 Z30 F3000 ; lift extruder by 3cm
G90 ; switch back to absolute distances (since that's likely what the rest of your gcode is using)
And to drop is very similar

Code: Select all

G91
G1 Z-30 F3000 ; drop extruder by 3cm
G90
And in between you just need to heatup the extruder

Code: Select all

M104 S200 T1 ; set extruder 1 temp to 200C
M109 S200 T1 ; wait for extruder 1 to reach 200C before continuing
So just insert that code wherever you want it. You will also want to make sure that the software isn't heating up your extruder at the beginning, so make sure that the temperature or extruder 1 is zero at the start (click Temperature tab to edit that).

If you need more help, I would suggest reading this handy guide: http://reprap.org/wiki/G-code

Return to “General Discussion and Tips”