Jump to content
Ultimaker Community of 3D Printing Experts
larnil

Cura and dual extrusion fix suggestion for Makerbot

Recommended Posts

I have used Cura as my favorite slicer for time now for single extrusion.

Cura produces the gcode which I run through GPX-plugin to produce x3g code for my printer.

Printer: Duplicator 4 (Makerbot clone) running Sailfish 7.5 as firmware.

When I wanted to do some dual extrusion everything seemed to be fine. Model was sliced, gcode produced (which looked fine in Cura+Repetier) and x3g loded on printer. First layers first color printed fine, but then problems started. When the extruder switched it started with a big blob, extruding so much filament that the extruder started to miss steps.

A lot of searching later I found a post here on the forum, that Cura does not support dual extrusion on Makerbots. Why? Because Cura developers need feedback from users in order to know how the gcode should look. Well, I'll try to give my 50 cents here.

I've done some searching, checking and trials and found what I believe is what needs to be fixed for Cura to produce dual extrusion gcode for Makerbots and clones.

When Cura produces dual extrusion gcode the E-steps are all added up.

Example - each extruder extrudes 10mm then switches

Start: T0 extrudes 10mm -> E increases from 0 to 10

switch to T1

E-step is 10 and T1 continues 10mm more --> E is now 20

switch to T0

E-step is 20 and T0 continues 10mm more --> E is now 30

So, if extruder0 have extruded 10mm filament and a switch is done then extruder1 continues from 10mm and onward. This is exactly the key problem, and the reason I got blobs when printing.

Makerbots add up E-steps too - but separate for each extruder.

So, if extruder0 have extruded 10mm filament and a switch is done then extruder1 starts from 0 and extrudes continues from 10mm and onward.

Example - each extruder extrudes 10mm then switches

Start: T0 extrudes 10mm -> E increases from 0 to 10 for T0

switch to T1

E-step is 0 for T1 and T1 continues 10mm more --> E is now 10 for T1

switch to T0

E-step is 10 for T0 and T0 continues 10mm more --> E is now 20 for T0

The difference between the 2 E-step calculations adds up more and more and will quickly become huge.

So... if the 'Makerbot flavour' gcode is change to handle the E-step absolute value per extruder instead of as a total for both extruders, then I believe Cura would produce Makerbot dual extrusion friendly gcode.

 

Share this post


Link to post
Share on other sites

Does not work:

G92 does not work with sailfish 7.5 as a extruder reset at layer change. Actually it has the strange impact that the extruder does not change even though an extruder change command it right at the line before. Posts elsewhere on the web suggest the G92 was broken in Sailfish 6.xx and haven't worked properly since.

Works:

Adding up E per extruder instead of a combined total

 

Share this post


Link to post
Share on other sites

Something I noticed in my gcode is that my sailfish 7.7 duplicator uses

G54

M108 T0

M18 A B

And

G55

M108 T1

M18 A B

To switch extruders and use the firmware toolhead offset instead of

M135 T(n)

Even though I've picked the right flavor.

Any chance your converter fixes that too, or can you make it fix that? I'm not using GPX for the files, I'm using ReplicatorG

Share this post


Link to post
Share on other sites

The plugin code below hasn't been tested extensively, but works for me.

 

#Name: Fix E value for Sailfish Firmware#Info: Compute E value per extruder.#Help: TBD#Depend: GCode#Type: postprocessE = [0.0, 0.0]lastE = 0.0tool = 0with open(filename, "r") as f:       lines = f.readlines()with open(filename, "w") as f: for line in lines:   code = list(line.split(";"))[0]   if code.startswith("T0") or code.startswith("M135 T0"):      E[0] = lastE - E[tool]     tool = 0     f.write(line)   elif code.startswith("T1") or code.startswith("M135 T1"):      E[1] = lastE - E[tool]     tool = 1     f.write(line)   elif code.startswith("G0") or code.startswith("G1"):     for part in code.split(" "):        if part.endswith("\n"):         part = part[:-1]       if part.startswith("E"):         lastE = float(part[1:])         f.write('E{0} '.format(lastE - E[tool]))             else:         f.write('{0} '.format(part))     f.write('; {1} {2} {3} {4}\n'.format(part[:-1], tool, lastE, E[0], E[1]))   elif code.startswith("G92"):     for part in code.split(" "):        if part.startswith("E"):         lastE = float(part[1:])         E[tool] = lastE     f.write(line)   else:     f.write(line)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • Our picks

    • Architect Design Contest | Vehicles.
      We're open for entries! - Design and submit your 3D designs of architectural entourage - vehicles - for a chance to win a large filament pack. Presenting an idea, an architectural design or something as big as an urban project isn't easy. A scaled model can really help to get your idea across.
        • Like
      • 14 replies
    • What The DfAM?
      I'm Steve Cox, an experienced engineer familiar with 3D printing. I wanted to share some DfAM guidelines with this community to help and make stronger parts.
      I'm also an Autodesk Certified Instructor for Fusion 360, so many of the images in ...
        • Thanks
        • Like
      • 18 replies
×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!