smartavionics / Cura

3D printer / slicing GUI built on top of the Uranium framework
GNU Lesser General Public License v3.0
174 stars 11 forks source link

Dual extrusion pauses during extruder change for heatup, oozing a blob of filament #79

Open Jdbye opened 3 years ago

Jdbye commented 3 years ago

Application version 20201023

Platform Windows 10

Printer Geeetech A20M

Reproduction steps Print with dual extrusion, single hotend, prime tower enabled, and "prime all extruders used on first layer" enabled.

Screenshot(s) N/A

Actual results On the first extruder change, there is a "M104" (start heating extruder) and "M109" (heat extruder and wait) command inserted, which even though the nozzle is already hot, causes the printer to pause for a few seconds before it moves to the prime tower to prime the new color. Depending on where this happens it can leave a blob of filament attached to the first layer of the print, ruining the print once it tries to print over it and instead drags it along with it, at worst ripping the print loose, at best leaving a significant imperfection in the print. This does not happen on subsequent layers, only on the first nozzle change (which in my case is on the first layer)

Expected results Since the printer is using a shared hotend, there is no need to wait for the nozzle to heat on extruder change. The behavior should be the same as on subsequent layers, where there is no heating gcode inserted on extruder change, and the printer moves immediately to the prime tower to prime the new color.

Project file https://www.dropbox.com/s/5di7g5izgxvv6hh/GA_3C_Lizard_3.3mf?dl=0

Log file https://pastebin.com/rHWtBHBy

Additional information I tried to look if there's a setting that can disable this behavior, as this behavior would make sense if using 2 different temperature filaments (although not recommended on mixing nozzles) but I didn't find one. Also, as it appears to only happen on the first layer, it seems likely that it's not intended behavior. My printer prints very well with dual extrusion/color mixing now apart from that one issue, and it's all thanks to this fork. Thanks for the hard work.

smartavionics commented 3 years ago

Do you have extruders share heater option enabled in the printer setup? Enabling that should zap the extra M10[49]s.

smartavionics commented 3 years ago

I tried loading your project but it didn't load OK so I can't slice your project, sorry.

andymozza commented 3 years ago

I think the dual extrusion changes still let you set different temperatures for each nozzle though right? So it has to pause to get to these temperatures still if they are different, as people still wanted the option to print with two slightly differing filaments - do you have them set the same temp ? ( check all temps including standby temp ). The changes if I remember just remove the cool down of the old tool heater on nozzle change, not the temp change to the new tool if it's different?

smartavionics commented 3 years ago

Hi Andy, thanks for that, I believe you're right, the temps need to be the same for all of the extruders.

Sophist-UK commented 3 years ago

I think that the hot end not in use is allowed to cool to a stand-by temperature (typically about 150C instead of 190C-200C), so when you change extruder then the new hot end has to heat up again to temperature.

It might be possible (via a Post-Processing script) to work back from an extruder change and insert gCode for a partial pre-heat a few seconds earlier.

smartavionics commented 3 years ago

Yes but here there is only one hotend so all the extruders need to have the same printing and standby temps to avoid waits.

andymozza commented 3 years ago

@Sophist-UK if you enable the new shared heater option in the printer settings then the cool down when a tool is not used doesn't happen as this would affect the printing through the only shared heater, but the change in temp set for the individual nozzle printing temperatures would still happen.

Jdbye commented 3 years ago

Do you have extruders share heater option enabled in the printer setup? Enabling that should zap the extra M10[49]s.

Of course. That was the first thing I changed when setting it up.

I tried loading your project but it didn't load OK so I can't slice your project, sorry.

Strange. I just downloaded the file and opened it fine. Are project files printer specific or something? I got the models from here, imported the .stls, set the extruder per model and then merged them, like you would typically do for multi color prints, so if it helps, you can try that: https://www.thingiverse.com/thing:2332398

smartavionics commented 3 years ago

When I load that project file, it fails...

Screenshot_2020-11-16_20-09-39

The log contains this...

2020-11-16 20:09:02,633 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=3.5) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,633 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0.4) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,634 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0.0001) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,634 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_gcode_flavor != "UltiGCode") for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,635 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_height) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,635 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,635 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,636 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0.001) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,636 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=10) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,636 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=4) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,637 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=False) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,637 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_width) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,638 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_nozzle_offset_x) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,638 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_depth) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,638 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_nozzle_offset_y) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,638 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=False) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,661 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=3.5) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,661 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0.4) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,662 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0.0001) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,663 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_gcode_flavor != "UltiGCode") for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,663 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_height) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,664 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,665 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,665 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0.001) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,666 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=10) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,666 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=4) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,667 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=False) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,667 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_width) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,667 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_nozzle_offset_x) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,668 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_depth) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,668 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_nozzle_offset_y) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,668 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=False) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,678 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=3.5) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,679 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0.4) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,679 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0.0001) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,680 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_gcode_flavor != "UltiGCode") for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,681 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_height) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,682 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,683 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,683 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=0.001) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,684 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=10) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,684 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=4) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,685 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=False) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,685 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_width) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,685 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_nozzle_offset_x) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,685 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_depth) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,686 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=machine_nozzle_offset_y) for setting: invalid syntax (eval, line 1)
2020-11-16 20:09:02,686 - ERROR - [MainThread] UM.Settings.SettingFunction.__init__ [67]: Parse error in function (=False) for setting: invalid syntax (eval, line 
Jdbye commented 3 years ago

When I load that project file, it fails...

Screenshot_2020-11-16_20-09-39

The log contains this...

Could it be because I've modified the Geeetech A20M definitions/extruders (in main Cura folder) to increase the extruders to 5 (for virtual extruders)? I've attached the modified files: geeetech_A20M.def.zip

smartavionics commented 3 years ago

Could it be because I've modified the Geeetech A20M definitions/extruders (in main Cura folder) to increase the extruders to 5 (for virtual extruders)?

Perhaps, I don't know.

Now, have you seen what has been written above about ensuring that all the extruders have been configured to have the same printing and standby temperatures? When that is done, do you still see any M109s that shouldn't be there?

Jdbye commented 3 years ago

Could it be because I've modified the Geeetech A20M definitions/extruders (in main Cura folder) to increase the extruders to 5 (for virtual extruders)?

Perhaps, I don't know.

Now, have you seen what has been written above about ensuring that all the extruders have been configured to have the same printing and standby temperatures? When that is done, do you still see any M109s that shouldn't be there?

I've just double checked, everything is identical. Both the filament settings, and the extruder specific settings. Can you see if you are able to load the project with the modified definitions/extruders files?

smartavionics commented 3 years ago

Can you please provide a sample gcode file, I'll just take a look at that, thanks.

Jdbye commented 3 years ago

Can you please provide a sample gcode file, I'll just take a look at that, thanks.

Sure. GA_3C_Lizard_3.zip

smartavionics commented 3 years ago

My hunch is that because your start gcode contains M104/M109, cura is failing to realise that the temperature is already 210 when it gets to the first tool change. Could you please comment out/remove the M104/M109 in the start gcode and then see if the M104/M109 still get generated before the first tool change. Thanks.

Jdbye commented 3 years ago

My hunch is that because your start gcode contains M104/M109, cura is failing to realise that the temperature is already 210 when it gets to the first tool change. Could you please comment out/remove the M104/M109 in the start gcode and then see if the M104/M109 still get generated before the first tool change. Thanks.

Thanks. That has indeed solved it, but it's not without complications. Since now Cura inserts its own heating G-code before my start G-code, the nozzle will be hot when the bed leveling code is running, so it's going to ooze and maybe leave behind filament on the bed, which can cause the print not to adhere to the bed correctly if I'm not paying attention for a few minutes at the start of every print. With my old G-Code, the timing is perfect so that the nozzle doesn't get hot enough to melt the filament until it's parked in the home position after the bed leveling, and after it's heated up it only needs to move a little bit to the right to prime the nozzle and wipe to get rid of any strings, so it doesn't ooze much, which has worked very well to avoid having to pay constant attention at the start of prints.

It's certainly better than oozing during the print though, so it will work for now. Is this behavior easy to change, so that I won't need this workaround in the future?

smartavionics commented 3 years ago

So at the moment, when the start gcode contains M10[49], cura doesn't output its own M10[49] and assumes the temperature is still 0 and therefore does the wait when the extruder change occurs. I think there's an argument for making cura assume the temperature is the printing temperature (the temp set in the profile) even if it doesn't output the initial temperature setting gcode. That would then stop the subsequent wait on extruder change. It would be then up to the user to ensure that the temperature set in the profile matches the temperature used in the start gcode. I will ponder this...

Jdbye commented 3 years ago

The strange thing is that there is code in Cura that's supposed to handle this. It just doesn't seem to be working correctly in this particular scenario. It's not just any M104/M109 command that works to stop Cura inserting its own heating G-code. It has to specifically contain {material_print_temperature_layer_0} So they clearly thought of this already, and it seems like an oversight that it works as expected in other cases but not on the first nozzle change. Or maybe since the official version is not optimized for mixing hotends anyway, then it was never really an issue there.

smartavionics commented 3 years ago

I have created a new CuraEngine.exe that contains a fix for this issue, could you please drop that into your Cura installation and try it out. You can find it at https://www.dropbox.com/s/nd0f0cyp4gceyix/CuraEngine.exe?dl=0

Jdbye commented 3 years ago

Sorry for the late reply. I tried your fix and it seems to slice correctly. I haven't tested printing with it yet, as I haven't been printing anything with color mixing, it's not something I use often. I will update when I do, but looking at the G-code I see no reason why it wouldn't work correctly.

smartavionics commented 3 years ago

Hi, you may wish to install the latest release (https://github.com/smartavionics/Cura/releases/tag/20201121) which contains the above mentioned fix and a few other changes.

Jdbye commented 3 years ago

Will do. And thanks for coming up with a fix so quickly!