Welcome! Log In Create A New Profile

Advanced

Help needed with Duet firmware and 3 extruder retraction.

Posted by deckingman 
Re: Help needed with Duet firmware and 3 extruder retraction.
April 01, 2016 07:10AM
Further to the pic I posted earlier, I've just created a 300 colour thingy. Details here if anyone is interested [forums.reprap.org]
Help needed with Duet firmware and 3 extruder tool change.
April 12, 2016 08:16AM
Good morning, I am new to this forum, but a regular at the SeeMeCNC forum.

I have just upgraded to the Duet and Duex4 to run the diamond print head on my Rostock V2. It is an awesome board and I love the quality of the prints. I however am having with changing extruders during a print.

I can print off any one of the three extruders, however am having trouble switching tools [I have set up 6 tools (T0-T5) with different mixing ratios - attached is an example]. I am unable to change tools by submitting a T0, T1 or other command (i.e. sending a M567 command) during the print. The only way I have been successful in changing a tool is to pause the print, and select a new tool. However, after I resume, the "old tool" completely unloads the filament (750 cm) despite setting a pause and resume .g files dictating a retraction of 5. If I don't kill the printer the old tool extruder keeps running.

Of note I can only print off the tool selected in the config.g file. This works for all of my 6 tools........ I simply can not change to a different tool without the above problem.

When I simply try to pass the M567 or T0 (or other T1....) code during a print, the print simply stops and is non-responsive (hotEnd and bed maintain temperature)e? I did try to send it via that and it locks up.

Thank you. Any insight is appreciated.
Attachments:
open | download - tfree0.g (137 bytes)
open | download - tpost0.txt (282 bytes)
open | download - tpre0.txt (185 bytes)
open | download - pause.txt (213 bytes)
open | download - resume.txt (170 bytes)
open | download - config.g4-12-2016-2.rtf (7.9 KB)
Re: Help needed with Duet firmware and 3 extruder tool change.
April 12, 2016 09:03AM
I've never tried passing tool commands during a print - mine are always embedded in the gcode file itself. Also, I have no knowledge of the Rostock. However, I suspect that what you need to do is to set the tool operating and standby temperatures at the start of the print. When you change tools, the system will wait for the new tool to reach its operating temperature and the "old" tool to cool to its standby temperature before the print will continue. As we only have one heater, we need to set all the tools to have the same temperatures. There may be some other way of defining tools so that this isn't necessary but I only have limited knowledge. I'm sure someone else will step in if they know of a better way to define tools. My commands are part of the Start G-code that I use with Slic3r so they are amongst the first things that get acted on prior to printing. I set the operating and standby temperature to the same value so that there is no delay when switching tools. The commands I use are

G10 P0 S205 R205 ; set tool 0 to 205 degrees standby and operating temperatures.
G10 P1 S205 R205; same for tool 1
G10 P2 S205 R205; and tool 2

etc...

As an aside, my end g-code contains G10 P0 S-273 R-273, G10 P1 S-273 R-273, etc for all tools which effectively turns the heater(s) off at the end of the print.
Re: Help needed with Duet firmware and 3 extruder retraction.
April 12, 2016 09:56AM
Thank you. This makes sense to set all tools such that operating and standby temps are all the same in each tool! I will make that change and see if then I can pass the command during a print. I could see why the print pauses while it waits for something that isn't going to happen with the diamond head and sharing one heater.

I still need to figure out why the old tool extruder unloads.
Re: Help needed with Duet firmware and 3 extruder retraction.
April 12, 2016 05:34PM
My guess is that the filament position is getting reset on a tool.change. If you send me a sample of the gcode around a tool change, using T commands to do the tool changes, then I can probably work out what is going wrong. However, switching to relative extruder coordinates in your slicer settings will probably fix it.



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: Help needed with Duet firmware and 3 extruder retraction.
April 12, 2016 05:51PM
Awesome. I'm on my mobile right now. I did up load all my gfiles as .txt above. Happy to send them via PM later tonight if needed.

Thanks.
Re: Help needed with Duet firmware and 3 extruder retraction.
April 12, 2016 05:55PM
Yes I looked at those files in case there were any G1 retraction commands in the tool change files without a preceding M83, but the M83 commands were present. What I need to see is the code that your slicer generated in the vicinity of a tool change.



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: Help needed with Duet firmware and 3 extruder retraction.
April 12, 2016 07:21PM
Ok. I will send the G-code of the sliced stl when I get home. As well here is an image of my clicker g codes.
Attachments:
open | download - image.jpeg (220.7 KB)
Re: Help needed with Duet firmware and 3 extruder retraction.
April 13, 2016 12:10AM
Here are the first lines of the g-code of the file that I printed that gave me the issues. If I read correctly the M82 is what the problem is with the crazy retraction. Correct?

Dan
......................

; Generated with MatterSlice 1.0
; filamentDiameter = 1.75
; extrusionWidth = 0.5
; firstLayerExtrusionWidth = 0.4
; layerThickness = 0.2
; firstLayerThickness = 0.2
; automatic settings before start_gcode
G21 ; set units to millimeters
M107 ; fan off
T0 ; set the active extruder to 0
; settings from start_gcode
M104 S228
M190 S100
M109 S228
G28
; automatic settings after start_gcode
T0 ; set the active extruder to 0
G90 ; use absolute coordinates
G92 E0 ; reset the expected extruder position
M82 ; use absolute distance for extrusion
; Layer count: 225
; LAYER:0
M107
G0 F18000 X1.06 Y-23.574 Z0.2
; TYPEconfused smileyKIRT
G1 Z0.2
G1 F6600 E0
G1 F720 X2.127 Y-23.502 E0.03557
G1 X3.211 Y-23.378 E0.07186
G1 X4.3 Y-23.203 E0.10854
G1 X5.399 Y-22.972 E0.14589
G1 X6.498 Y-22.686 E0.18367
G1 X7.6 Y-22.342 E0.22206
G1 X8.696 Y-21.939 E0.2609
Re: Help needed with Duet firmware and 3 extruder retraction.
April 13, 2016 12:13AM
What is interesting is that in Matter control Slicer the custom G-codes does not detail this M82 command. Not sure where I can change Matter control Slicer to remove that g-code.

Thanks again, very helpful........ if all agree that this is the issue.

Dan
Re: Help needed with Duet firmware and 3 extruder retraction.
April 13, 2016 06:34PM
What I need to see is the code around a tool change part way into the print, not the start of the print.

slic3r has a checkbox called "Relative E distances" or something like that. Using that will probably solve the problem.



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: Help needed with Duet firmware and 3 extruder retraction.
April 13, 2016 09:05PM
Quote
dc42
What I need to see is the code around a tool change part way into the print, not the start of the print.

slic3r has a checkbox called "Relative E distances" or something like that. Using that will probably solve the problem.

I was using an old slice file that was sliced for a single tool. Thus, there are no tool changes in the g-code. What I was trying to do was to pause the print, change the tool by selecting another then resuming the print. Thus, there are not tool changes beyond the first tool section in the g-code.

Is this appropriate???? Am I thinking correctly about all of this..........??????
Re: Help needed with Duet firmware and 3 extruder retraction.
April 13, 2016 11:10PM
What are the codes that you insert into your print g-code to make a tool change?
Re: Help needed with Duet firmware and 3 extruder tool change.
April 13, 2016 11:12PM
Quote
deckingman
I've never tried passing tool commands during a print - mine are always embedded in the gcode file itself. . ..

What are the codes that you insert into your print g-code to make a tool change?
Re: Help needed with Duet firmware and 3 extruder retraction.
April 14, 2016 02:44AM
If you are going to do a manual tool change in the middle of a print, using different extruders on the two tools, then you must use relative extruder coordinates in the gcode file.



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: Help needed with Duet firmware and 3 extruder retraction.
April 14, 2016 06:56AM
Quote
dc42
If you are going to do a manual tool change in the middle of a print, using different extruders on the two tools, then you must use relative extruder coordinates in the gcode file.

Thanks. Of note, I did try to upload my print g-code for your review, however, it was too large. I would need to zip it if it was still important to review.

To summarize my task list. There are two issues I need to work through. I do see value in making manual tool changes and love the idea of inserting the proper codes into a print to make automatic changes. What I need to read and detail, is exactly what each of the parameters are for both situations if different. Reading reading reading!!!

Thus:

For Manual (on the fly) Tool Changes:
  • Do i need to pause, make the tool change then resume (can I set up a macro to run and make a change?)?
  • What are the exact g-codes needed in my config.g and tool change files?
  • What are the necessary setting for my slicer?
  • What are the necessary codes to be entered in a sliced print file to allow manual tool changes?

For Automatic Tool Changes (at defined print layers):
  • What are the exact g-codes needed in my config.g and tool change files, are they different than a manual change?
  • What are the necessary setting for my slicer?
  • What are the necessary code lines in the sliced print file to make the tool change (can I manually enter code into and existing file to switch tools)
  • Where should these lines of code be inserted?

What am I not thinking about or what are the limits and just not possible.

Edited 1 time(s). Last edit at 04/14/2016 06:56AM by 3D-Print.
Re: Help needed with Duet firmware and 3 extruder retraction.
April 14, 2016 06:11PM
I think you just need a Tn command, or alternatively you could send a M567 command to change the tool mix ratio. Take a look at this thread [forums.reprap.org] which was started by the same person who started this thread.



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: Help needed with Duet firmware and 3 extruder retraction.
April 14, 2016 10:29PM
Thank you, the python script function is quite nice. I still not sure from this how to structure the change commands. I left this message as well in the other thread.
.....................

Of note: The successes!!!!!! spinning smiley sticking its tongue out
  • If I pause and then change tools by clicking on the web-interface "heater 1" and then selecting another tool, this now works to change the extruder and color. i think this now works since I reset my standby temp on my to my active temp (i.e. G10 P0 S228 R228). I think this is because each tool shares the same heater, thus tool 1 will never reach standby temp and thus, allow tool 2 to start....... Agree???? Correct!!!
  • If I change T0 to T1 in the first lines of the sliced g-code, this starts the print with the appropriate tool color and works beautifully.

My remaining issues: eye rolling smiley
  • I can send the M567 P1 or M567 P2 command during a print and it will acknowledge the command (little blue box) and show the mixing ratios, however will not change the tool. This does absolutely nothing to the print. I have attached the zip file of the calibration print if you want to review.
  • If I sent a T# (1, 2, 3. 4. 5) in the command line, the printer simply stops and I have to reset via an "Emergency Stop" to restart.


Thus, I know the commands are correct, but what else do I need to do to such that the printer actually changing extruders with the M567 (or T# command) command in the print g-code file?

Edited 4 time(s). Last edit at 04/14/2016 10:37PM by 3D-Print.
Attachments:
open | download - BandAidT0T1T29.gcode copy.zip (386.4 KB)
Re: Help needed with Duet firmware and 3 extruder retraction.
April 15, 2016 02:03AM
What I meant was to send an M567 command to set new mixing ratios for the current tool.

I'll look into why sending a Tn command during the print doesn't work.



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: Help needed with Duet firmware and 3 extruder retraction.
April 15, 2016 07:06AM
Sending the M567 to change the mixing ratio of a sellected and active tool makes more sense. This I know I can do!!! Awesome. I will try this and see what happens.

As I think about it I don't really need to do a retraction and unretract with the diamond head since oozing from another head is not an issue. Simply change the extruders ratios from the command line or drop the M567 code into the print gcode!smileys with beer

Edited 1 time(s). Last edit at 04/15/2016 07:08AM by 3D-Print.
Re: Help needed with Duet firmware and 3 extruder retraction.
April 15, 2016 07:10AM
Quote
dc42
What I meant was to send an M567 command to set new mixing ratios for the current tool.

I'll look into why sending a Tn command during the print doesn't work.

If I also click on the "heater 1" link on the web interface it also locks up the system as described above.
Re: Help needed with Duet firmware and 3 extruder retraction.
April 15, 2016 01:12PM
Quote
3D-Print
Sending the M567 to change the mixing ratio of a sellected and active tool makes more sense. This I know I can do!!! Awesome. I will try this and see what happens.

As I think about it I don't really need to do a retraction and unretract with the diamond head since oozing from another head is not an issue. Simply change the extruders ratios from the command line or drop the M567 code into the print gcode!smileys with beer

How have you defined your tools? Have you enabled mixing as well as setting ratios? This is how my tools are defined in my config.g.

M563 P0 D0:1:2 H1 ; Define tool 0 with all 3 extruders
G10 P0 S-273 R-273 ; Set tool 0 operating and standby temperatures (initially to be off). No x y offset needed as it's the same nozzle
M567 P0 E1:0:0 ; Set mixing (for tool 0 I use all extruder 1)
M568 P0 S1 ; Turn on mixing
M563 P1 D0:1:2 H1 ; Define tool 1 with all 3 extruders
G10 P1 S-273 R-273 ; Set tool 1 operating and standby temperatures
M567 P1 E0:1:0 ;Set mixing (for tool 1 I use all extruder 2)
M568 P1 S1 ; Turn on mixing
M563 P2 D0:1:2 H1 ; Define tool 2, with all 3 extruders
G10 P2 S-273 R-273 ; Set tool 2 operating and standby temperatures
M567 P2 E0:0:1 ; Set mixing (for tool 2 I use all extruder 3)
M568 P2 S1 ; Turn on mixing
M563 P3 D0:1:2 H1 ; Define tool 3 with all 3 extruders
G10 P3 S-273 R-273 ; Set tool 3 operating and standby temperatures
M567 P3 E0.34:0.33:0.33 ; Set mixing (for tool 3 I use equal proportions of all 3 extruders)
M568 P3 S1 ; Turn on mixing

Then in my start gcode (i.e. what slic3r puts at the beginning) I have

M83; Set extruder to relative
G10 P0 S205 R205 ; Set tool 0 operating and standby temperatures to 205 degrees (for PLA)
G10 P1 S205 R205 ; Set tool 1 operating and standby temperatures
G10 P2 S205 R205 ; Set tool 2 operating and standby temperatures
G10 P3 S205 R205 ; Set tool 3 operating and standby temperatures

and my end gcode has

G10 P0 S-273 R-273 ; Set tool 0 operating and standby temperatures to minus 273 which effectively turns it off
G10 P1 S-273 R-273 ; Do the same for the other tools.
G10 P2 S-273 R-273
G10 P3 S-273 R-273

So we have 4 tools which all share the same heater (and nozzle) so the only difference is the extruder, or combination of extruders. As the mixing ratio is initially defined in config.g, it can then be changed "on the fly".

There is no need to do anything else on tool change. Providing the tools all have the same operating and standby temperatures, there will be no delay when changing tools.

Edited 2 time(s). Last edit at 04/15/2016 01:13PM by deckingman.
Re: Help needed with Duet firmware and 3 extruder retraction.
April 15, 2016 01:28PM
Quote
deckingman
Quote
3D-Print
Sending the M567 to change the mixing ratio of a sellected and active tool makes more sense. This I know I can do!!! Awesome. I will try this and see what happens.

As I think about it I don't really need to do a retraction and unretract with the diamond head since oozing from another head is not an issue. Simply change the extruders ratios from the command line or drop the M567 code into the print gcode!smileys with beer

How have you defined your tools? Have you enabled mixing as well as setting ratios? This is how my tools are defined in my config.g.

M563 P0 D0:1:2 H1 ; Define tool 0 with all 3 extruders
G10 P0 S-273 R-273 ; Set tool 0 operating and standby temperatures (initially to be off). No x y offset needed as it's the same nozzle
M567 P0 E1:0:0 ; Set mixing (for tool 0 I use all extruder 1)
M568 P0 S1 ; Turn on mixing
M563 P1 D0:1:2 H1 ; Define tool 1 with all 3 extruders
G10 P1 S-273 R-273 ; Set tool 1 operating and standby temperatures
M567 P1 E0:1:0 ;Set mixing (for tool 1 I use all extruder 2)
M568 P1 S1 ; Turn on mixing
M563 P2 D0:1:2 H1 ; Define tool 2, with all 3 extruders
G10 P2 S-273 R-273 ; Set tool 2 operating and standby temperatures
M567 P2 E0:0:1 ; Set mixing (for tool 2 I use all extruder 3)
M568 P2 S1 ; Turn on mixing
M563 P3 D0:1:2 H1 ; Define tool 3 with all 3 extruders
G10 P3 S-273 R-273 ; Set tool 3 operating and standby temperatures
M567 P3 E0.34:0.33:0.33 ; Set mixing (for tool 3 I use equal proportions of all 3 extruders)
M568 P3 S1 ; Turn on mixing

Then in my start gcode (i.e. what slic3r puts at the beginning) I have

M83; Set extruder to relative
G10 P0 S205 R205 ; Set tool 0 operating and standby temperatures to 205 degrees (for PLA)
G10 P1 S205 R205 ; Set tool 1 operating and standby temperatures
G10 P2 S205 R205 ; Set tool 2 operating and standby temperatures
G10 P3 S205 R205 ; Set tool 3 operating and standby temperatures

and my end gcode has

G10 P0 S-273 R-273 ; Set tool 0 operating and standby temperatures to minus 273 which effectively turns it off
G10 P1 S-273 R-273 ; Do the same for the other tools.
G10 P2 S-273 R-273
G10 P3 S-273 R-273

So we have 4 tools which all share the same heater (and nozzle) so the only difference is the extruder, or combination of extruders. As the mixing ratio is initially defined in config.g, it can then be changed "on the fly".

There is no need to do anything else on tool change. Providing the tools all have the same operating and standby temperatures, there will be no delay when changing tools.

Thank you,

I have exactly like you have except I did not have the G10 code in my start and end gcode. I will add this and see if that helps with some of my troubles.

Thanks,
Re: Help needed with Duet firmware and 3 extruder retraction.
April 15, 2016 01:48PM
Quote
deckingman
M563 P0 D0:1:2 H1 ; Define tool 0 with all 3 extruders

I was curious how your extruders are pluged into the Duet and Duex4 since you have set up drives 0, 1 and 2. I am set up on 2, 3 and 4 since I could not get the first Duex4 terminal to work. Likely due to my set up.

Thanks,
Re: Help needed with Duet firmware and 3 extruder retraction.
April 15, 2016 06:30PM
Quote
3D-Print
Quote
deckingman
M563 P0 D0:1:2 H1 ; Define tool 0 with all 3 extruders

I was curious how your extruders are pluged into the Duet and Duex4 since you have set up drives 0, 1 and 2. I am set up on 2, 3 and 4 since I could not get the first Duex4 terminal to work. Likely due to my set up.

Thanks,

Perhaps you have a Duet 0.8.5 and deckingman has a Duet 0.6? The numbering of the DueX4 drivers and heaters depends on which version of Duet it is paired with.



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: Help needed with Duet firmware and 3 extruder retraction.
April 15, 2016 10:08PM
Quote
dc42

Perhaps you have a Duet 0.8.5 and deckingman has a Duet 0.6? The numbering of the DueX4 drivers and heaters depends on which version of Duet it is paired with.

I do indeed have the 0.8.5.
Re: Help needed with Duet firmware and 3 extruder retraction.
April 15, 2016 10:18PM
Awesome results today. I was successful in sending the M567 P0 E0.0:1.0:0.0 command during a print from the web interface with seamless change of the mixing ratio from extruder #1 to extruder #2.

I also placed this M567 into the print gcode file and was able to change the mixing ratio and color with the command. I set up second change later in the print and changed from M567 P0 E0.0:1.0:0.0 to M567 P0 E0.0:0.0:1.0. When it made this change the extruder steppers did make a high pitch noise and the print paused for about 30 seconds. I was about to kill the printer when it started again with the correct color.

Not sure why. Am trying again to see it it repeats.

Addendum: Added the print file. and a few lines around the M567 code.

G1 Z15.3
G0 F18000 X4.792 Y-16.543
G0 X0.058 Y19.203
G0 X0.006 Y19.6
G0 X0.042 Y19.332
G0 X0.042 Y19.332
G0 X-0.001 Y19.711
G0 X-0.001 Y19.711 Z15.2

M567 P0 E0.0:1.0:0.0 ;#################################
; LAYER:75
G0 X-0.001 Y19.711
G0 X-0.001 Y19.134
; TYPE:WALL-INNER
G1 Z15.2

Edited 2 time(s). Last edit at 04/15/2016 10:46PM by 3D-Print.
Attachments:
open | download - BandAidT0T1T2-13.gcode copy.zip (386.5 KB)
Re: Help needed with Duet firmware and 3 extruder retraction.
April 15, 2016 10:56PM
I tried it again and it starts printing layer 75, then stops and makes the high pitch sound. The pause last almost exactly 30 seconds later (I have a movie of this) it restarts printing with the new mix ratio.

What if I added an M400 code before and after the M567 code?

Edited 3 time(s). Last edit at 04/15/2016 11:03PM by 3D-Print.
Re: Help needed with Duet firmware and 3 extruder retraction.
April 16, 2016 02:09AM
Are you still using absolute extruder coordinates in your slicer settings? If so, change to relative.



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: Help needed with Duet firmware and 3 extruder retraction.
April 16, 2016 03:43AM
Quote
dc42
Quote
3D-Print
Quote
deckingman
M563 P0 D0:1:2 H1 ; Define tool 0 with all 3 extruders

I was curious how your extruders are pluged into the Duet and Duex4 since you have set up drives 0, 1 and 2. I am set up on 2, 3 and 4 since I could not get the first Duex4 terminal to work. Likely due to my set up.

Thanks,

Perhaps you have a Duet 0.8.5 and deckingman has a Duet 0.6? The numbering of the DueX4 drivers and heaters depends on which version of Duet it is paired with.

I have no idea which version of Duet I have - it's whatever RepRapPro supplied with the kit. While we are already way off topic, how can I tell? Also, can you point me to somewhere that explains the differences / advantages of the 0.8.5 vs 0.6. Many thanks.

Edited 1 time(s). Last edit at 04/16/2016 03:43AM by deckingman.
Sorry, only registered users may post in this forum.

Click here to login