Welcome! Log In Create A New Profile

Advanced

Tool Change code

Posted by joestefano 
Tool Change code
February 28, 2017 03:34PM
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?
Re: Tool Change code
February 28, 2017 05:22PM
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.

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 [duet3d.com].



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Tool Change code
February 28, 2017 06:55PM
Is the Configuration Tool capable of writing the Tfree, Tpre, & Tpost codes? they seem to be void of any M or G codes.
Re: Tool Change code
March 01, 2017 03:04AM
No, it doesn't populate them, but they are very simple to write.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Tool Change code
March 01, 2017 03:31AM
I'm surprised to see
{IF NEWTOOL=0};

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 )
Re: Tool Change code
March 01, 2017 06:54AM
O Lampe, That code was taken from S3D printer configuration. It was not generated by the Config Tool.
Re: Tool Change code
March 02, 2017 11:12AM
Quote
joestefano
O Lampe, That code was taken from S3D printer configuration. It was not generated by the Config Tool.

Thanks!
I thought it could be something, the slicer would do while slicing. It's not a part of SD-cards tool change codes...

Wondering if slic3r has similar options?
Re: Tool Change code
March 07, 2017 04:38PM
David, "The tfree1.g, tpre1.g and tpost1.g files would be similar, except that tpre1.g would use command M116 P1." is this statement correct in regards to the tpre1 including M116 P1? I thought that M116 P# belongs in the tpost1 file
Re: Tool Change code
March 08, 2017 07:46AM
Quote
joestefano
David, "The tfree1.g, tpre1.g and tpost1.g files would be similar, except that tpre1.g would use command M116 P1." is this statement correct in regards to the tpre1 including M116 P1? I thought that M116 P# belongs in the tpost1 file

You are right, and I have just corrected that wiki page. Thanks for pointing it out.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Tool Change code
March 08, 2017 08:18PM
How does the tfree,tpre & 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.

; tfree1.g
; called when tool 1 is freed
M83 ; relative extruder mode
G1 E-1 F300 ; retract 1mm

; tpost1.g
; called after tool 1 has been selected
M116 P1
M83 ; relative extruder mode
G1 E20 F300 ; undo retraction

; tpre1.g
; called before tool 1 is selected
G1 X250 Y268 F6000 ; move the head away from the print

Starting script
G1 Y268
G1 X250 F4000 ;Move to purge bin.
T1
M109 P1 S[extruder1_temperature] ; Wait for extruder current temp to reach
G1 E20 F300 ; Purge E(xx) and F(speed)
Re: Tool Change code
March 09, 2017 02:40AM
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?

Edited 1 time(s). Last edit at 03/09/2017 02:42AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Tool Change code
March 09, 2017 05:28AM
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.

G90
M83
M106 S0
G1 Y268
G1 X210 F4000 ;Move to purge bin.
T2
M109 P2 S190 ; Wait for extruder current temp to reach
G1 E20 F300 ; Purge E(xx) and F(speed)
G1 E-1.0000 F1800
G1 Z0.200 F1800
; layer 1, Z = 0.2
M104 S190 T1
M104 S190 T3
T2
Re: Tool Change code
March 09, 2017 02:27PM
It's because you are selecting the tool with T2 before using G10 to set the active temperature.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Tool Change code
March 09, 2017 04:43PM
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?
Re: Tool Change code
March 10, 2017 01:50AM
I suggest something like this in your start gcode:

G10 P0 S[first_layer_temperature] R150

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.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Tool Change code
March 11, 2017 11:28AM
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?
Re: Tool Change code
March 11, 2017 01:37PM
Quote
IMBoring25
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?

It has always done that.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Tool Change code
March 13, 2017 08:22PM
Quote
dc42
I suggest something like this in your start gcode:

G10 P0 S[first_layer_temperature] R150

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.

David where would I put the G10 in my start code? Does it replace anything I have now?

Starting script
G1 Y268
G1 X250 F4000 ;Move to purge bin.
T1
M109 P1 S[extruder1_temperature] ; Wait for extruder current temp to reach
G1 E20 F300 ; Purge E(xx) and F(speed)
Re: Tool Change code
October 14, 2017 01:44PM
Hey Guys.

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.

I am trying to get my 1 nozzle 2 extruders diy 3d-printer to work with simplify3D .

and I need a certain pull to make sure my filament can load again without being to thick in the end.

Thanks in advance
Sorry, only registered users may post in this forum.

Click here to login