Simultaneous dual extrusion
-
Hi there,
I made a dual extrusion setup (basically using T0/T1 tools) but I'm not sure how the Gcode should look like. Both are mounted on the same carriage.
I'd like to be able to control both extruders indepedently and simultaneously. In other words, I would like to send an extrusion command with T1 like G1 E4000 F100 (continuous extrusion) and simultaneously print with T0 while letting T1 do its job.
I've heard about M605 command. Is it how I'm supposed to do it?
.gcode:
; Enable simultaneous extrusion for both extruders M605 P0 S1 D0 ; Set extruder 0 to simultaneous extrusion mode M605 P1 S1 D0 ; Set extruder 1 to simultaneous extrusion mode ; Start extrusion from both T0 and T1 simultaneously T1 ; Select extruder 1 (T1) G1 E4000 F300 ; Extrude continuously from T1 T0 ; Select extruder 0 (T0) G1 X0 Y0 Z0.2 F1200 ; Move to starting position G1 X10 Y0 E10 F140 ; Move to (10,0), extrude 10mm with T0 G1 X10 Y10 E20 F140 ; Move to (10,10), extrude 20mm with T0 G1 X0 Y10 E30 F140 ; Move to (0,10), extrude 30mm with T0 G1 X0 Y0 E40 F140 ; Move to (0,0), extrude 40mm with T0
As I'm making my own custom gcode, I'd like to see how I'm supposed to organize the .gcode file. Would you have any other examples?
Thanks for your light!
Tim
-
@Timothee-Leblond I am not aware of M605. Where did you pick that up?
If you want to command both extruders at once and make them extrude at the same time, create a tool that is mapped to both extruders, select it, and run something like
G1 E12:34
to command 12mm of movement for the first extruder and 34mm for the second one.In case you want to have the second extruder extruding while the first one does something else, have a look at the docs for multiple motion systems: https://docs.duet3d.com/en/User_manual/RepRapFirmware/Multiple_motion_systems
-
@chrishamm Thank for your answer!
I found that command on RepRap a while back but apparently it's not used anymore according to this post: https://forum.duet3d.com/topic/20073/duet3-new-idex-setup
What do you mean exactly by a tool that is mapped for both extruders? Can you give me an example of your config.g?
Let me explain. I have 2 extruders mounted on the same carriage - thus, they will follow the same path. However, these extruders are actually working at different rates which is the reason why I'd like to control them indepedently (only for extrusion commands).
Additionaly, one of them is set to extrude the same amount of material than the printing path length so the extrusion value is known in advance. i.e if my path is 4000mm long, extrusion will be E4000. That's why I'm wondering if I could have one unique command like T1 G1 E4000 F100 at the beginning and In the meantime being able to control the other extruder T0?
Thank you!
-
@Timothee-Leblond Well, I don't know if you have a mixing nozzle or two individual ones. But the configtool lets you generate the corresponding commands easily, see https://configtool.reprapfirmware.org. Each section has a "Preview" option to see what commands are required for the corresponding configuration. If you assign two extruders to one tool and select that (e.g.
T0
), then you can specify a mixing ratio using M567 and indeed command both extruders like so:config.g:
M563 P0 ... D0:1 ; define tool 0 M567 P0 E1:1 ; set mixing for both extruders to 100% and 100%
and to extrude
T0 G1 X100 Y100 F3000 G1 X150 Y150 E40 F600
-
I have a specific mixing nozzle. The problem is that E values for the second extruder are not calculated through my slicer. So I don't have an E value for each G1 command... I only know the amount as it should be equal to my path length.
If I use the mixing tool, can you tell me if my following theory is correct? I designed a path that is 4720mm long. After slicing, the total amount of material extruded by E1 is E94. E2 should in theory extrude 4720mm of my second material. The gcode contains 670 G1 commands. This means E1 should extrude E0.14 per steps and E2 around E7 per steps. This gives me a ratio of 0.02:1. Does it seem right? If yes, is it the ratio I should indicate in my M567 command?
Please note that both extruders have different steps-per-mm.
Thank you for your help,
-
@Timothee-Leblond I have a couple printers with mixing extruders. In your last example with a mixing ratio of 0.02:1 Your printer will take the E value from the running gcode and you will get a total extrusion of 1.02 from a single nozzle. Not much different than setting the extrusion multiplier in the slicer to 1.02 on a normal printer. You might want to keep the total of all the extruder motors = to 1.00 when you add them both up in your M567 so that your commanded total extrusions are exactly what the running gcode specified.
If you have set the E-steps correctly on each motor then total extrusion should be accurate to what is commanded in the running gcode.
You can set M567 0.02:0.98 in the gcode file, in a macro, or in the command line as the print is running and it will change.
I don't recommend a setting one or the other motor at 0.00 as the motor at 1.00 will try to push some filament back up the unused side and could cause a blockage similar to heat creep.
I set both extruders to 0.50:0.50 in config.g just in case I accidentally send a print job without specifying the mix ratio.; Tools M563 P0 D0:1 H1 F1 S"Dual" ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C M567 P0 E0.50:0.50 ; set mixing ratios for tool 0 Dual
Geoff
-
Thanks for your message!
I will try using your suggested ratio of 0.02:0.98 with the mixing tool.
However, do you think my calculation is correct? Is it the way you would do it as well?
Appreciated!
-
@Timothee-Leblond I'm the last guy you want to do calculations for you.
I picked those numbers from the top of my head since they sounded close to what you wanted and are also useful to my mixing nozzles when trying to get a mostly pure color without clogs.
Geoff
-
Hello,
I'm coming back as I tried using mixing ratios. It seems this technique is not working very well for my setup. Indeed, both of my extruder should work independently as they should be unrelated. One is a standard extruder but the other mainly acts as an infinite screw. Its speed should not be calculated based on the same parameters as the main extruder.
For example, in the scenario of a mixing ratio, when I change the extrusion multiplier, all E values are impacted and so are both extruders. No matter the ratio, they are impacted. However, this should be only true for the main extruder only (and not the second one).
So my question is how would you control an extruder as well as an independent infinite screw, knowing that both should run at the same time? Do you think mapping the second extruder as an axis would work?
Thank you.
-
This post is deleted! -
undefined T3P3Tony referenced this topic
-
@Timothee-Leblond the mixing approach will work if you always want the same ratio of extrusion between the two extruders. If not, then another possibility is for you to write a GCode post-processor that adds the second E value. For example, if the slicer outputs this:
G1 Xxxx Yyyy E3.2
and you calculate from the XY coordinates of that move and the previous one that the path length of that G1 move is 12mm, then
G1 Xxxx Yyyy E3.2:12.0
would be appropriate.
-
I got it. And yes it is the kind of output I have from the slicer for the first extruder.
However, what I want from the second extruder is to deposit a specific length of material along the path. The only information I know is the total length (for example 4700mm). I had the idea of writing a short program that would distribute the length based on the number of move but this is not convenient as it would deposit the same length no matter how long the moves are. Also, the rate of extrusion is calculated to be the same as the printing speed as it is a continuous material.
That's why the ideal scenario would have been to send a long-distance command like G1 E4700 F300 in parallel to the regular commands. Any thoughts?
Thank you,
Timothee
-
@Timothee-Leblond bear in mind that when the XY direction changes between G1 moves there will often be a deceleration and acceleration around that direction change. Short moves between direction changes may not even reach the requested speed. So a constant extrusion rate from the second extruder may not be what you want.
Writing a post-processor is not difficult. It's been done several times before, usually written in Python.
If you are an OEM looking to build a machine with a new feature, feel free to get in touch to discuss how we might help with this. If you are wanting to lay down fibre as well as extruded plastic then I believe there are patents covering that.
-
Why not define a "mixing extruder" from the XY-axes and the constant extruder? The mixing ratio would be fix and the current motion speed would also adjust extrusion speed.
BTW: an extrusion amount of eg. 4700mm wouldn't be even close to infinite. If you want to go the infinite screw route, you can define axes upto +/- 2^31 steps length. That would be enough to print a whole week.
-
I'm working at very low speed for now so I did not face this problem yet to be honest - but thanks for the tip.
So from what I understand, there is no way I can send 2 G1 commands in parallel to deposit with my different extruders? I know it sounds weird but I think it might be worth trying different ways...
About the processor, what would you suggest starting with?
PS: I'm not an OEM but I'm developing a new machine for research purposes. I don't know if it is of interest to you, but let me know if it is the case.
Thank you very much!
-
I'm sorry but could you please give me an example or explain a bit deeper what you're thinking about? I'm not sure to understand.
I agree with you, it was just an example of a "long extrusion command" in contrast to 1.2.
Thanks!