Issues with mix ratio and feedrate
-
I am working on a continuous fiber feeder that injects into a paste extruder, but I can't seem to get the feedrate right when extruding both the paste and fiber at the same time. I have tried both G1 Exxx:xxx F commands, as well as setting a mix ratio then using G1 E F commands. In both instances, I set the feedrate to be the feedrate for the actual material (not the fiber) as it is the larger of the two extrusion distances. My understanding was that the larger of the two distances/E's would be set to the specified feedrate, and the lesser would be 'downclocked' to start and finish at the same time (i.e., extruded at a lower feedrate); but this does not seem to be the case.
When using the same feedrate as I do with normal (non-fiber injected) extrusions, the fiber/paste extrusions do not finish on time. To test the theory that the feedrate needs to be increased when extruding two materials at once, i set the feedrate to 1.7698x its nominal value (due to my mix ratio of 1:0.7698); when I did this, it finished too early.
My question is, what should the feedrate be when extruding two materials? I cannot find much, if any, documentation on this. Or am I going about this completely wrong?
Config with unneccessary parts removed below, firmware is 3.4.4. Note I only using the duet for extrusion and secondary systems, we do not control motion with it.
Thanks!!
; General preferences M575 P1 S1 B57600 ; enable support for PanelDue G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"MRAM" ; set printer name G4 S2 ; wait for expansion boards to start ; Drives M569 P0.3 S1 ; physical drive 0.3 goes forwards M569 P0.1 S1 D0 ; physical drive 0.1 goes forwards M569 P0.2 S1 ; physical drive 0.2 goes forwards M569 P0.0 S1 ; physical drive 0.0 goes forwards M569 P0.4 S1 ; physical drive 0.4 goes forwards M569 P0.5 S1 D0 ; physical drive 0.5 goes forwards M569 P21.0 S1 ; Set vipro toolboard wire feeder stepper drive direction M569 P20.0 S1 D3 ; Set wire cutter toolboard stepper drive direction, turn on stealthchop M584 X20.0 Y0.3 Z0.2 E0.0:0.5:0.1:21.0 ; set drive mapping M350 X16 Y16 Z16 E16:1:1:16 I0 ; configure microstepping with interpolation ;M92 X80.00 Y80.00 Z400.00 E274.00:1594.77:1594.77 M92 X400 Y80.00 Z400.00 E274.00:180:180:383.5 ; set steps per mm M566 X120.00 Y900.00 Z60.00 E120.00:1500000.00:1500000.00:6000.00 ; set maximum instantaneous speed changes (mm/min) M203 X5000 Y6000.00 Z180.00 E6000.00:8000:8000:6000 ; set maximum speeds (mm/min) M201 X100.00 Y500.00 Z20.00 E100.00:10000.00:10000.00:1000.00 ; set accelerations (mm/s^2) M906 X1600 Y300 Z300 E2700:1200:1200:1600 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X-50 Y0 Z0 S1 ; set axis minima M208 X50 Y750 Z750 S0 ; set axis maxima ; Vipro Control M302 P1 ;allow cold extrude M569 P0.1 T21:21:0:0 M569 P0.5 T21:21:0:0 M950 P0 C"out3" ;Vipro Drivers on/off M950 P2 C"out8" ;Vipro Syringe Air Supply M950 P6 C"io8.out" ;UV Lights ; Tools M563 P0 S"Typhoon" D0 H1:0 F0 ; 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 M563 P1 S"Vipro 415" D1 F0 ; define tool 1 G10 P1 X0 Y0 Z0 ; set tool 1 axis offsets G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C M563 P2 S"Vipro 414" D2 F0 ; define tool 2 G10 P2 X0 Y0 Z0 ; set tool 2 axis offsets G10 P2 R0 S0 ; set initial tool 2 active and standby temperatures to 0C M563 P3 S"Both Vipros" D1:2 F0 G10 P3 X0 Y0 Z0 ; set tool 2 axis offsets G10 P3 R0 S0 ; set initial tool 2 active and standby temperatures to 0C M563 P4 S"Wire Feeder" D3 F0 G10 P4 X0 Y0 Z0 ; set tool 3 axis offsets G10 P4 R0 S0 ; set initial tool 3 active and standby temperatures to 0C M563 P5 S"Vipro 415 and Wire Feeder" D1:3 F0 G10 P5 X0 Y0 Z0 ; set tool 4 axis offsets G10 P5 R0 S0 ; set initial tool 4 active and standby temperatures to 0C M567 P5 E1.0:0.7698 ;set mix ratio M563 P6 S"Both Vipros and Wire Feeder" D1:2:3 F0 G10 P6 X0 Y0 Z0 ; set tool 4 axis offsets G10 P6 R0 S0 ; set initial tool 4 active and standby temperatures to 0C
-
@bwoods I'm not sure that I fully understand how your setup works but I'll have a stab at what might be the problem. G1 moves are synchronised. That is to say, they all start and end at the same time. A normal print move would be something like G1 Xn Yn En Fn meaning move a certain distance in X, a certain distance in Y while extruding a certain amount of filament at an overall federate of F. If we just look at XY component, and assume that the X distance and Y distance are both 100mm, then the carriage must move diagonally and the distance will be about 140mm (100 x square root of 2). So the feedrate will apply to that diagonal move. The individual axes (X and Y) will be less than that feedrate because their distances are shorter.
If I understand correctly, you are only using the Duet to control extrusion, so there is no X and Y component. But the same principle of synchronidation will apply to multiple extruders. So you need to think of the extruders in terms of two dimensional space. If you extrude say 100mm from extruder 0 and 50mm from extruder 1, then the distance would be a diagonal line between two points (X0:100, and Y0:50). So the feedrate would apply to that diagonal line (I e a combination of the two extruder move lengths). Which, if I've understood your setup correctly, would explain why you are seeing the extrusion move finish at a different time to what you expect.EDIT. With a mixing ratio of 1:0.7698 The total amount of extruded material would be a combination of both. To apply a specific feed rate to the first extruder, I think the formula would be the square root of (1^2 + 0.7698^2) which becomes the square root of 1.59259 which is 1.26198. Therefore, if you wanted say a feedrate of say 10mm/sec for the first extruder, then you would multiply that 10 by 1.26198 giving a feedrate for the combined dual extrusion move of 12.6198 mm/sec. I could be wrong and you'd need to check my maths, but I think that's right..........
-
@deckingman that makes sense, I'll give that a shot!
And just a bit more background, we are 3D printing with a robotic arm; the robot's motion is controlled with it's own controller and we stream extrusion commands to the Duet. The extrusion commands are calculated on the fly based on the desired layer height and road width, and the expected time it will take for the robot to make it to the next point (calculated by our custom slicer, taking into account the desired movement speed coupled with the robot's accel/decel rates when approaching corners and such). In essence, it is very similar to how a regular printer works, just with a separate controller doing the XYZ commands.@dc42 Because we calculate the flow/feedrate off of the time it will take the robot to move from point to point, supporting the upcoming G93 command for more than just 'CNC specific' systems would be very very useful....
-
@bwoods That sounds like a very difficult thing to do. I can see how you might be able to synchronise your "decoupled" extruders with the robot axis when the feed rate is constant, but how do you synchronise the extruder accelerations and decelerations, with the robot axes accelerations and decelerations?
-
@deckingman short answer is we don't really consider the extruder's acceleration/deceleration; it simply hasn't been an issue for us yet. Slightly longer answer is we queue up extrusion commands before they are required to run; the benefit of this is that we never drop to 0 feedrate so the duet doesn't slow extrusion near the end of the movement, but the downside is that the synchronisation between the robot and the duet is incredibly important and has to be very precise. A good amount of work went into the streaming setup, and we are able to achieve very low latencies with it.
We also only use one actual stepper motor (for the fiber), the paste extruder uses different drives that are better at instantaneous speed changes (i.e., see the M566 settings for extruder drives 2 and 3 in the config).
-
@bwoods Understood. I would hazard a guess that you'd obtain best results by running as near constant speed as is practical (i.e high jerk, high acceleration, lowish speed).
-
@deckingman Your guess would be correct. We run near constant (~15 mm/s movement) speed while taking the hit on surface finish due to it, our application is not about pumping out as many models as possible so it's not a huge deal to us.
Hopefully in the future I'll be able to show publically some of what we are doing; I think it would be interesting to this group, and I'm sure it would bring about discussions about how we can do stuff better...but for now all I can say is we can print conformally with thermoplastics, UV-curable or reaction-curable thermosets, ceramics, pastes, etc., and (hopefully) soon any of those materials with continuous fibers for extra strength. Should be pretty cool....when I finally get it all working correctly lol -
@bwoods You sound like a man after my own heart. There has to be a better way than what is effectively just moving a hot melt glue gun around. I for one would be interested to see what you are up to, as and when you have something that you feel you could share.
Let me know if I was anywhere near the mark with my theory and suggestion about feedrate.
-
@bwoods said in Issues with mix ratio and feedrate:
My question is, what should the feedrate be when extruding two materials? I cannot find much, if any, documentation on this. Or am I going about this completely wrong?
In RRF 3.4, the time taken by an extrusion-only move when mixing is in use should be 60 * E_parameter/F_parameter. So if you have a mix ratio of 1:0.7698 and you execute G1 E100 F3000 then it should extrude 100mm from the first extruder and 76.98mm from the second extruder, in 2.0 seconds. RRF 3.3 was different, it would have taken the total extrusion amount as 176.98mm and taken longer.
-
@dc42 This does not seem to be true, atleast when sending G1 Exxx:xxx Fxxx commands (are these treated differently than G1 Exxx Fxxx commands with a mix ratio defined in the config?)
-
@bwoods yes it's different for G1 commands with multiple E parameters. For those commands, the move time should be based on the total extrusion because the mix ratio sum is not relevant.
BTW, RRF 3.5 supports inverse time mode experimentally.
-
@dc42 I can confirm that works! Does RRF 3.5 support inverse time mode for printing as well? The duet gcode dictionary says it is coming to 3.5 for CNC only.
For anybody that has this issue in the future that wants to use G1 Exxx:xxx instead of a mix ratio, you can calculate the feedrate by adding both E values then dividing by the expected movement time (in my case this is in seconds, so divide my 60 to get it in mm/min).
feedrate := (extruder1_E + extruder2_E) / (movement_time_sec / 60);
-
@bwoods inverse time mode will be supported in all modes, not just CNC.