New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tool 0 not selected at start of GCode #1819
Comments
Can't you put a T0 command in the start G-code? |
That's what I've done, and I think it'll work. It just seems to me that Cura should always be sure to select the correct tool in a multi-extruder setup. |
Would it be possible to put a Tx command ,for the 1st extruder that is going to be used, at the very beginning of the file? So even before the heating codes that Cura generates. This would solve a couple of issues, but would require that the heating codes generated by Cura must all have Tx in them. |
Also, putting the T0 in your start gcode will give an issue, when you start your print with T1 |
We can only do this if we're sure that no printer at all has any problem with the |
Putting heating codes in the start gcode, on a multi extruder setup, does not work as Cura does not know what extruder is going to be used 1st when generating the start gcode, and therefore puts in a default temp(usually 210 degrees). Therefore you need Cura to put in the heatercodes. this happens before the start gcode.
Which results with an unheated T0 if T1 is the active extruder. When heating is done correct, all heaters are heated, which is correct and wanted behavior as we want to clean all nozzles before use. But it would be silly if only T1 is going to be used and all other heaters stay hot. This will even damage hardware.
This works if you always start with a skirt/brim or something else made with T0.
But now the extruder that is going to be used is also cooled down. If you use T1 (or any other extruder except T0) as 1st extruder, Cura sees this as a toolchange and starts with a heatup code for that extruder. So Cura should always do a toolchange between start gcode and actual print code. Then temps will always be correct. So 3 thing need to be done to have a correct working general purpose start: Ideas?? |
I think all of these problems are already solved by putting T0 in your start gcode. |
Except that this introduces two unnecessary tool changes, and heats up the unused extruder from 0 to standby temperature at the start. The use case for this is that some people use multiple-extrusion as redundancy or just easy material switching. When one nozzle breaks down, you can still continue printing if you just use the other one. You won't ever need to switch to the broken nozzle if you just single-extrusion print on the other nozzle. |
Our project manager just removed this from our planning because it's older than 12 weeks. |
is it as simple to fix as Ultimaker/CuraEngine#633 says? |
Is that just a nice way of saying that you're not going to fix it because you haven't fixed it yet? This is still an issue. Yes, I can put T0 in my start gcode, but what if I actually want to use T1 because it already has the filament loaded that I want? Now I have to go change my start gcode. Not very user friendly. |
How about including this in your start gcode: |
if you don't use skirt, brim or raft?
Or, Cura could just select the proper tool and all of those features can
still be used. I fail to see the difficulty in fixing this.
|
Or, you can ignore people who try to be helpful and think of solutions to fix your problem. |
I'm not ignoring you. I'm simply pointing out that the list of caveats to
your solution is unacceptable.
Cura is starting to go the way of form over function. 3.0 looks nice, but
still has the same issues under the hood because fixing simple things like
this are being ignored.
|
And where exactly did you point out a list of caveats? I do work on the frontend. I can help you find a solution that works through the frontend. I was trying to find a solution that does not require you to wait at least 2 months for a new release, if it gets attention at all. Chances of this getting fixed in the backend look slim, because the issue does not affect Ultimaker printers. |
Isn't that a list of caveats?
And I appreciate that, I really do. Keep in mind that this issue has been open for over 5 months already, and it's just frustrating when you get the following:
Why is age the sole reason for dropping an issue? If anything, the older issues should get higher priority. |
One exception is not a list of caveats. I was suggesting something above, and if that worked it could be turned into a more full-fledged solution. Note that I have no affiliation with Ultimaker (anymore), so I am not involved in what issues get dropped. |
The code in the backend where it probably should happen is here: If I understand this issue correctly, just having the same T0 for "Marlin" flavor would only partially solve the problem, because it would still heat up hotend 0 even if you only print with hotend 1. A proper solution would be for this code (https://github.com/Ultimaker/CuraEngine/blob/master/src/FffGcodeWriter.cpp#L410) to only heat the used extruders (see |
In some printers switching extruder is a physical action, which depends on the previous extruder. It is then needed to always have a previous extruder defined, because changing extruder depends on the previous extruder. That means that a starting extruder must be assumed. When the printer starts it must have extruder zero selected. According to this reasoning you may want to file a bug report at the firmware rather than at Cura. Solving this in Cura is harder than you might think and I don't think ultimaker is going to spend time in making third party machines work with Cura. Pull requests are always welcome of course! |
I have not even tried compiling this, but its an implementation of my above assumptions: @smartavionics, you are much more versed in CuraEngine than I am, could you have a look if this would work? |
Hi @fieldOfView, I tried compiling your code and there's a { } mismatch. When I inserted the required { where I thought it would go it still doesn't compile. The code currently looks like this:
And the compilation fails like this:
So I assume that extruder_is_used needs to be declared somewhere, in the class? Also you are referencing extruder_nr after it goes out of scope and I don't know what your intentions is there, either. I am willing to help with this but I know nothing about multiple extruders so all I can do is take orders! |
Sorry, like I said I had not even compiled the code. I was asking more about the logic. I'll have a go at compiling and testing the code before asking for more feedback ;-) |
Not a problem, here's how I imagine the main part of that code should look (it compiles OK):
At the top of the function, it now looks like this:
|
I'm not sure I fully understand this — if a print is completed using extruder 1, the printer may still be on extruder 1 as the active extruder has not been changed (and there is no reason for the printer to reset the extruder at the end of the print). Can you cite a printer that has the behaviour you describe? I believe the correct solution would be something in between the suggestion in #633 and the PR cited by @fieldOfView above:
|
The Ultimaker 3 has this. I don't know much about other dual extruder machines, but there might also be other printers for which changing nozzles depends on the previous nozzle. The Ultimaker 3 takes care of the current nozzle being T0 at the start. |
@BagelOrb I figure this it the case on the UM3 because it has some mechanism to shift the active nozzle down. However, in both of these cases, setting the nozzle to the same as current should be a no-op to the printer — which means setting the nozzle to the start nozzle at the beginning of the print (as described in my above comment) would make sense. If the already-set nozzle is reselected, the printer would do nothing — and if the other nozzle was selected, the printer would switch it. Basically what I'm saying is that assuming that the printer firmware resets the current tool/extruder to T0 before/after each print is a bad idea and that it is better to treat it as an uninitialized variable and explicitly set it. |
I think that already happens for the UM3 - just to be sure. For some machines that might not work. Some machines might interpret a T0 as "Go and heat T0 up". I'm not sure. Either way just make a PR and it might very well be merged. |
@BagelOrb sounds good. I mainly don't want to break printers which behave in ways I'm not familiar with and I don't have to test (therefore my question about tool changes being dependent). Rather than always putting T0 at the beginning, I'd have it only be generated with setExtruder/switchExtruder, if the extruder is previously uninitialized — which should avoid the "Go and heat T0 up" problem. |
Some machines might interpret a T0 as "Go and heat T0 up"
I think RepRapFirmware is the only firmware that does anything like that,
and only if active and standby temperatures have been set via G10.
|
I have created a PR out of my code from above, after testing the code some more. Ultimaker/CuraEngine#640 |
Another bug around how Cura assumes the extruder starts as T0: Ultimaker/CuraEngine#676 |
With Cura 2.5 in a dual-extruder setup, if a part is sliced using the first extruder, a T0 command is never placed in the corresponding GCode. This can be an issue if the print is started with the printer having T1 as the active extruder.
The text was updated successfully, but these errors were encountered: