<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Tool Change code</title>
        <description> M218 T1 X0.0 Y0.0 ; reset extruder offset
T[new_tool]
M218 T1 X-18.0 Y0.0 ; set extruder offset
; uncomment section below to use idle temperatures
{IF NEWTOOL=0};M104 S170 T1 ; idle right extruder
{IF NEWTOOL=0};M104 S[extruder0_temperature] T0 ; heat left extruder
{IF NEWTOOL=1};M104 S170 T0 ; idle left extruder
{IF NEWTOOL=1};M104 S[extruder1_temperature] T1 ; heat right extruder

Does this type of code work for the Duet?</description>
        <link>https://reprap.org/forum/read.php?416,752191,752191#msg-752191</link>
        <lastBuildDate>Tue, 08 Sep 2026 17:40:16 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,792271#msg-792271</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,792271#msg-792271</link>
            <description><![CDATA[ Hey Guys.<br />
<br />
Is there a way to learn some simple if statements syntax for the tool change, EX. if this tool is active do this and switch vise versa.<br />
<br />
I am trying to get my 1 nozzle 2 extruders diy 3d-printer to work with simplify3D .<br />
<br />
and I need a certain pull to make sure my filament can load again without being to thick in the end.<br />
<br />
Thanks in advance]]></description>
            <dc:creator>webberen</dc:creator>
            <category>Duet</category>
            <pubDate>Sat, 14 Oct 2017 13:44:03 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,755644#msg-755644</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,755644#msg-755644</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>dc42</strong><br />
I suggest something like this in your start gcode:<br />
<br />
G10 P0 S[first_layer_temperature] R150<br />
<br />
Repeat the G10 command for each tool you are using, and replace the R parameter by whatever standby temperature you want. I think most slicers recognise the first_layer_temperature parameter.</div></blockquote>
<br />
David where would I put the G10 in my start code? Does it replace anything I have now?<br />
<br />
Starting script<br />
 G1 Y268<br />
 G1 X250 F4000 ;Move to purge bin.<br />
 T1<br />
 M109 P1 S[extruder1_temperature] ; Wait for extruder current temp to reach <br />
 G1 E20 F300 ; Purge E(xx) and F(speed)]]></description>
            <dc:creator>joestefano</dc:creator>
            <category>Duet</category>
            <pubDate>Mon, 13 Mar 2017 20:22:06 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,755053#msg-755053</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,755053#msg-755053</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>IMBoring25</strong><br />
Speaking of G10, is there a reason it waits until the specified tool is activated to implement active and standby temperature changes since I upgraded to the 1.17 branch?</div></blockquote>
<br />
It has always done that.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Duet</category>
            <pubDate>Sat, 11 Mar 2017 13:37:09 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,755033#msg-755033</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,755033#msg-755033</link>
            <description><![CDATA[ Speaking of G10, is there a reason it waits until the specified tool is activated to implement active and standby temperature changes since I upgraded to the 1.17 branch?]]></description>
            <dc:creator>IMBoring25</dc:creator>
            <category>Duet</category>
            <pubDate>Sat, 11 Mar 2017 11:28:14 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,754670#msg-754670</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,754670#msg-754670</link>
            <description><![CDATA[ I suggest something like this in your start gcode:<br />
<br />
G10 P0 S[first_layer_temperature] R150<br />
<br />
Repeat the G10 command for each tool you are using, and replace the R parameter by whatever standby temperature you want. I think most slicers recognise the first_layer_temperature parameter.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Duet</category>
            <pubDate>Fri, 10 Mar 2017 01:50:59 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,754632#msg-754632</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,754632#msg-754632</link>
            <description><![CDATA[ Does G10 belong in the starting script? Can I write starting code in the config file if so do I need a starting script in the slicer? Do you explain anywhere the correlation between the slicer and the firmware?]]></description>
            <dc:creator>joestefano</dc:creator>
            <category>Duet</category>
            <pubDate>Thu, 09 Mar 2017 16:43:38 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,754597#msg-754597</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,754597#msg-754597</link>
            <description><![CDATA[ It's because you are selecting the tool with T2 before using G10 to set the active temperature.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Duet</category>
            <pubDate>Thu, 09 Mar 2017 14:27:39 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,754457#msg-754457</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,754457#msg-754457</link>
            <description><![CDATA[ Yes I am. When the slicer switches extruders does the firmware override the starting script? I am happy with what happens when it switches from Ex1 to Ex2 and from Ex2 to Ex3. I cant figure out why no matter which Ex is chosen to print first it attempts to purge cold. <br />
<br />
G90<br />
M83<br />
M106 S0<br />
G1 Y268<br />
G1 X210  F4000   ;Move to purge bin.<br />
T2<br />
M109 P2 S190       ; Wait for extruder current temp to reach <br />
G1 E20 F300    ; Purge E(xx) and F(speed)<br />
G1 E-1.0000 F1800<br />
G1 Z0.200 F1800<br />
; layer 1, Z = 0.2<br />
M104 S190 T1<br />
M104 S190 T3<br />
T2]]></description>
            <dc:creator>joestefano</dc:creator>
            <category>Duet</category>
            <pubDate>Thu, 09 Mar 2017 05:28:09 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,754425#msg-754425</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,754425#msg-754425</link>
            <description><![CDATA[ Your tpost1.g file says to extrude 20mm of filament after heating it to operating temperature. This seems excessive to me, especially as your tfree1.g file only retracts 1mm. Or are you doing some sort of purge at that point?]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Duet</category>
            <pubDate>Thu, 09 Mar 2017 02:40:05 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,754389#msg-754389</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,754389#msg-754389</link>
            <description><![CDATA[ How does the tfree,tpre &amp; tpost interact with the starting code of my S3D slicer. I have 3 extruders on a multi stl print `and everything is working properly except when the 1st extruder moves to the purge bin and just before it turns on to heat it try's to extrude about a couple of mm. I looked through the g code and cant find where it is coming from. Doesn't matter which extruder prints first.<br />
<br />
; tfree1.g<br />
; called when tool 1 is freed<br />
M83               ; relative extruder mode<br />
G1 E-1 F300     ; retract 1mm<br />
<br />
; tpost1.g<br />
; called after tool 1 has been selected<br />
M116 P1<br />
M83               ; relative extruder mode<br />
G1 E20 F300       ; undo retraction<br />
<br />
; tpre1.g<br />
; called before tool 1 is selected<br />
G1 X250 Y268 F6000    ; move the head away from the print<br />
<br />
Starting script<br />
G1 Y268<br />
G1 X250 F4000   ;Move to purge bin.<br />
T1<br />
M109 P1 S[extruder1_temperature]       ; Wait for extruder current temp to reach <br />
G1 E20 F300    ; Purge E(xx) and F(speed)]]></description>
            <dc:creator>joestefano</dc:creator>
            <category>Duet</category>
            <pubDate>Wed, 08 Mar 2017 20:18:59 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,754207#msg-754207</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,754207#msg-754207</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>joestefano</strong><br />
David, <span style="color:#FF0000">"The tfree1.g, tpre1.g and tpost1.g files would be similar, except that tpre1.g would use command M116 P1."</span> is this statement correct in regards to the tpre1 including M116 P1? I thought that M116 P# belongs in the tpost1 file</div></blockquote>
<br />
You are right, and I have just corrected that wiki page. Thanks for pointing it out.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Duet</category>
            <pubDate>Wed, 08 Mar 2017 07:46:09 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,754073#msg-754073</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,754073#msg-754073</link>
            <description><![CDATA[ David, <span style="color:#FF0000">"The tfree1.g, tpre1.g and tpost1.g files would be similar, except that tpre1.g would use command M116 P1."</span> is this statement correct in regards to the tpre1 including M116 P1? I thought that M116 P# belongs in the tpost1 file]]></description>
            <dc:creator>joestefano</dc:creator>
            <category>Duet</category>
            <pubDate>Tue, 07 Mar 2017 16:38:58 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,752660#msg-752660</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,752660#msg-752660</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>joestefano</strong><br />
O Lampe, That code was taken from S3D printer configuration. It was not generated by the Config Tool.</div></blockquote>
<br />
Thanks!<br />
I thought it could be something, the slicer would do while slicing. It's not a part of SD-cards tool change codes...<br />
<br />
Wondering if slic3r has similar options?]]></description>
            <dc:creator>o_lampe</dc:creator>
            <category>Duet</category>
            <pubDate>Thu, 02 Mar 2017 11:12:43 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,752318#msg-752318</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,752318#msg-752318</link>
            <description><![CDATA[ O Lampe, That code was taken from S3D printer configuration. It was not generated by the Config Tool.]]></description>
            <dc:creator>joestefano</dc:creator>
            <category>Duet</category>
            <pubDate>Wed, 01 Mar 2017 06:54:34 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,752271#msg-752271</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,752271#msg-752271</link>
            <description><![CDATA[ I'm surprised to see <pre class="bbcode">
{<b>IF</b> NEWTOOL=0};</pre>
<br />
I've been searching the gcode wiki page up and down to find any conditional commands. Where can I read more about it? ( syntax and all )]]></description>
            <dc:creator>o_lampe</dc:creator>
            <category>Duet</category>
            <pubDate>Wed, 01 Mar 2017 03:31:52 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,752268#msg-752268</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,752268#msg-752268</link>
            <description><![CDATA[ No, it doesn't populate them, but they are very simple to write.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Duet</category>
            <pubDate>Wed, 01 Mar 2017 03:04:33 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,752229#msg-752229</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,752229#msg-752229</link>
            <description><![CDATA[ Is the Configuration Tool capable of writing the Tfree, Tpre, &amp; Tpost codes?  they seem to be void of any M or G codes.]]></description>
            <dc:creator>joestefano</dc:creator>
            <category>Duet</category>
            <pubDate>Tue, 28 Feb 2017 18:55:09 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,752207#msg-752207</guid>
            <title>Re: Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,752207#msg-752207</link>
            <description><![CDATA[ RepRapFirmware uses G10 to set the tool offsets, not M218. Normally you only set up tool offsets once in config.g, not in the tool change code.<br />
<br />
RRF runs tool change files automatically when you change tools, and has a separate active and standby temperature for each tool (these are also set using G10). With tool change files, you don't need any tool change code in the slicer at all, except for a T command to select the new tool. See [<a href="https://duet3d.com/wiki/Configuring_RepRapFirmware_for_a_Cartesian_printer#Tool_change_files" target="_blank"  rel="nofollow">duet3d.com</a>].]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Duet</category>
            <pubDate>Tue, 28 Feb 2017 17:22:05 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?416,752191,752191#msg-752191</guid>
            <title>Tool Change code</title>
            <link>https://reprap.org/forum/read.php?416,752191,752191#msg-752191</link>
            <description><![CDATA[ M218 T1 X0.0 Y0.0 ; reset extruder offset<br />
T[new_tool]<br />
M218 T1 X-18.0 Y0.0 ; set extruder offset<br />
; uncomment section below to use idle temperatures<br />
{IF NEWTOOL=0};M104 S170 T1 ; idle right extruder<br />
{IF NEWTOOL=0};M104 S[extruder0_temperature] T0 ; heat left extruder<br />
{IF NEWTOOL=1};M104 S170 T0 ; idle left extruder<br />
{IF NEWTOOL=1};M104 S[extruder1_temperature] T1 ; heat right extruder<br />
<br />
Does this type of code work for the Duet?]]></description>
            <dc:creator>joestefano</dc:creator>
            <category>Duet</category>
            <pubDate>Tue, 28 Feb 2017 15:34:39 -0500</pubDate>
        </item>
    </channel>
</rss>
