Dual Extruders and Retraction

Have questions or comments about Simplify3D, Slic3r, Cura, Reptier, etc? Or wondering about which CAD software to use...discuss it here...
LonV
Posts: 44
Joined: Wed Apr 09, 2014 8:40 pm

Dual Extruders and Retraction

Post by LonV » Wed Jun 24, 2015 5:40 pm

Hey guys,

I've been working to get my dual extruder (Chimera) working and operational and I always seem to hit this one snag. The snag is that in the starting gcode both of my nozzles are primed and ready to go, but the software doesn't have a built in way to recognize this and start with a retract on the first idle nozzle. After the first layer (which is messy because of the drippings of the "inactive" nozzle) everything is fine because it retracts properly.

I know that I could retract in my starting Gcode, but this assumes that I can predict which extruder will be first (which isn't always predictable). Also, even if I can verify in the generated Gcode which extruder is first and add a retract, it seems like eventually it will mess something up. Like it will under-extrude that first layer after the idle one is made active...or, with Simplify, it will over-extrude leaving a blob. Plus there are lots of resets (G92 E0) that happen that are out of my control after the starting Gcode is executed.

Any thoughts? How are people dealing with this?

Thanks,

Lon

FYI, I'm currently using Simplify3D 3.0.

User avatar
Tim
Posts: 1205
Joined: Thu Apr 10, 2014 2:19 pm
Location: Poolesville, Maryland
Contact:

Re: Dual Extruders and Retraction

Post by Tim » Wed Jun 24, 2015 6:20 pm

At least in S3D v3.0, when you specify the skirt, you can specify which extruder will produce it (I don't recall that being an option before). Whichever extruder draws the skirt should be the first one to be active (at least if they implemented it correctly).

LonV
Posts: 44
Joined: Wed Apr 09, 2014 8:40 pm

Re: Dual Extruders and Retraction

Post by LonV » Wed Jun 24, 2015 7:25 pm

As I said, even when it's predictable, I end up with odd results by retracting the "idle" extruder first. For example, Simpify doesn't know that I've done that so it doesn't extrude an equivalent distance. Again this is just for the first layer.

-Lon

jsc
Posts: 1864
Joined: Thu Apr 10, 2014 4:00 am

Re: Dual Extruders and Retraction

Post by jsc » Wed Jun 24, 2015 9:18 pm

I know what you're talking about, I've had the same issue. I think you can fix it manually in the startup code by retracting the idle extruder in absolute coordinates. That is, do your regular priming, then send G90 to enter absolute mode. Select the idle tool ("T1", say) and retract by -10. Hopefully when it is next selected it will zero itself out properly. Haven't tested this.

Also, upgrade to S3D 3.0. It looks like they've vastly improved the dual extruder support.

User avatar
Tim
Posts: 1205
Joined: Thu Apr 10, 2014 2:19 pm
Location: Poolesville, Maryland
Contact:

Re: Dual Extruders and Retraction

Post by Tim » Wed Jun 24, 2015 11:57 pm

jsc wrote:Also, upgrade to S3D 3.0. It looks like they've vastly improved the dual extruder support.
Speaking of which, I previously was using some gcode in the "Tool change" tab under "Scripts" that's supposed to run every time the extruders are swapped:

Code: Select all

T[old_tool]
G92 E0
G1 F2400 E-6
G92 E0
T[new_tool]
G92 E0
G1 F2400 E6
G92 E0
I noticed that the default dual extruder setting in Simplify3D 3.0.0 has nothing in this gcode script block. Is it not necessary? Is anybody else using a script like this? Does it have any bearing on the matter under discussion?

jsc
Posts: 1864
Joined: Thu Apr 10, 2014 4:00 am

Re: Dual Extruders and Retraction

Post by jsc » Thu Jun 25, 2015 2:16 am

Even in the last version, there is a specialized tool change retraction distance checkbox that I think you're intended to use instead.

User avatar
Tim
Posts: 1205
Joined: Thu Apr 10, 2014 2:19 pm
Location: Poolesville, Maryland
Contact:

Re: Dual Extruders and Retraction

Post by Tim » Thu Jun 25, 2015 3:37 am

jsc wrote:Even in the last version, there is a specialized tool change retraction distance checkbox that I think you're intended to use instead.
Apparently I was trying to do it the hard way. I didn't notice it doing anything weird like doubling the retraction distance, so I guess if you put a script there it overrides the default tool change method. But I think I will trust their internally-generated code from now on.

Now that I think about it, I also encountered this problem with the failure to retract the inactive nozzle after initial idle, just didn't do it enough times to know what I was looking at. Now that S3D knows how to do ooze shields and wipe towers and such, I have an incentive to try again.

User avatar
Tim
Posts: 1205
Joined: Thu Apr 10, 2014 2:19 pm
Location: Poolesville, Maryland
Contact:

Re: Dual Extruders and Retraction

Post by Tim » Thu Jun 25, 2015 4:04 pm

I set the left (primary) extruder to draw the skirt, disabled the skirt on the right extruder, and specified 8 skirt outlines. The left extruder started by retracting, then extruded back again while drawing the skirt outlines. But then the right extruder was not retracted. And there was a much worse problem: The right extruder draws 62mm to the right of where it should be. This occurs if I specify tool1 to be +31mm offset OR if I specify it to be -31mm offset. If you ask me, this is a serious error in Simplify3D. I'm coming to the conclusion that they have switched the concepts of "right" and "left". I'm going to try going against intuition and treat right as left and left as right, and see if that fixes things. Maybe the guys at Simplify3D have their M2 facing backwards or something.

User avatar
Tim
Posts: 1205
Joined: Thu Apr 10, 2014 2:19 pm
Location: Poolesville, Maryland
Contact:

Re: Dual Extruders and Retraction

Post by Tim » Thu Jun 25, 2015 4:31 pm

I give up. I've done about 10 false starts, and it is never correct. As far as I can tell, S3D is just wrong, wrong, wrong. It always retracts the left extruder first and then immediately starts printing with the same extruder, and the right extruder always prints 62mm offset to the right. Nothing I change in the process parameters is making any difference to that. It's just totally wrong.

User avatar
Tim
Posts: 1205
Joined: Thu Apr 10, 2014 2:19 pm
Location: Poolesville, Maryland
Contact:

Re: Dual Extruders and Retraction

Post by Tim » Thu Jun 25, 2015 8:00 pm

Okay, so I didn't give up.

First, my problem with the X offset was partially due to the firmware. The Smoothieboard firmware defines the X offset for the 2nd extruder backwards; that is, the value is the X offset that needs to be applied to position the 2nd extruder where the 1st extruder used to be. I'm pretty sure this is backwards from Marlin. But that raises the question of why there is an extruder offset in Simplify3D, and what does it do. It doesn't appear to do anything.

I looked at the G-code produced from slicing, and here's what I see for a default layer change:

Code: Select all

G92 E0
G1 E-12.0000 F600
; layer 10, Z = 0.98
T1
; tool H0.200 W0.400
; inner perimeter
G1 X97.983 Y109.311 F18000
G1 E-0.5000 F600
G92 E0
This is the default layer change code inserted by Simplify3D, and as far as I can tell, you can't change it unless you write your own script in the Gcode "scripts" tab. What the above is doing is to retract the active toolhead by 12mm, switch tools (in this example, from T0 to T1), then retract the new tool head by 0.5mm (this is a restart distance. May not be a good choice, but that's settable in the process parameters). The problem here is that I don't see anything that recovers the 12mm distance that it retracted. In fact, it looks like that "Extra restart distance" is not "extra", it's the total restart distance, and should be set to +12mm (plus or minus whatever else is needed, which is probably a small positive amount to make up for whatever dripped out of the nozzle while it was idle).

Now I get the correct retraction and restart. But what I see is that the first tool change for each tool assumes that the tool is not retracted, and so does not do the restart. This is what you (Lon) reported---that the first layer is put down with the 2nd extruder nozzle un-retracted and therefore oozing all over the place. It's hard to believe that the Simplify3D developers didn't notice this. . .

There is a hack solution to this: put the retraction/extrusion in the gcode "tool change" script. I did this, and it does solve the problem by forcing the retract and re-extrude on every layer including the first. However, it also wants to run its own built-in code. The only way to disable that is to go to the "Advanced" tab and set the retraction and "extra" restart distances to zero. The code gets inserted, but doesn't do anything.

Almost there. . . But, it's still not right. At the end of the start code, the last tool is T1, so before the first layer, it should be doing a T1 to T0 tool change. But it's not; it's stupidly doing a T0 to T0 tool change, apparently unaware of either the fact that T1 is active, or that T0-to-T0 is not actually a tool change. But the T0-to-T0 change is not a serious problem, it just retracts T0 and then extrudes T0 by the same amount. But it's failing to do the T1 retraction, so that will need to be put in the start code. Now, when I preview the gcode, it looks okay to me. It does that one extra useless retract-extrude cycle on the left extruder, but that's the only weird artifact.

In summary:

(1) Make sure that the left (primary) extruder and only the left extruder is drawing the skirt.
(2) In the Advanced tab, set the "tool change retraction" distances (both the retract and restart) to zero
(3) In the Scripts tab, use this for the "tool change" script:

Code: Select all

T[old_tool]
G92 E0
G1 F1200 E-6
G92 E0
T[new_tool]
G92 E0
G1 F1200 E6
G92 E0
Note that the extrude/restart distance (-6/6) and the speed (1200) are hard-coded in the script. If you want to change them, they have to be changed in the script.

(4) In the Scripts tab, for the "Starting script":

Code: Select all

...
G1 X140 Z0.25 ; Lift
G90 E0 ; Zero extruder
G1 F1200 E-6 ; Initial retraction
G90 E0 ; Zero extruder
I am only showing the last line of the default starting script ("Lift"), and the three lines I added that retract the right extruder. Although I should note that the X distance to move the extruder for the purge is not correct in the Simplify3D default starting script. . . it's set to 200, which puts the extruder on top of the glass plate while it's trying to purge. The amount should be 208.

Again, the retraction distance and speed are hard-coded, and in particular, the distance must match the distances put in the tool change script.

This leaves only one small issue, which is that although you can force which tool goes first with the skirt setting, you can't know which tool will be the last one active, and whichever one is the last inactive one will be retracted at the end of the print. You will either need to manually readjust before the next print, or just make sure that the purge cycle is good for at least the amount of the tool change retraction.

But it works! I'm printing now a piece with PVA support and eSUN wood filament. The wood is extremely drippy, which will make for an interesting test. But the first layer worked out just right, and the retractions and restarts are working the way they ought to.

I know that was kind of complicated, so if you have any doubts, concerns, or questions, just ask.

Post Reply