When I send a dual extrusion gcode from Octoprint, thi only uses one color, but the gcode works fine from SD card
What did you already try to solve it?
I have been reviewing this issue. My Geeetech a20m uses 16 virtual extruders in the firmware.
For my tests, I have put 2 extruders and "Shared Nozzle" in Octoprint settings. Actually, I'm not sure how many extruders I should put in the octoprint extruder number field
I'm using Cura, and I don't know if I have to add something there
Logs
This is part of the serial log;
2020-04-18 18:29:18,553 - Recv: echo:busy: processing
2020-04-18 18:29:18,568 - Recv: T:190.80 /190.00 B:60.14 /60.00 @:41 B@:71 W:0
2020-04-18 18:29:18,740 - Recv: T:190.03 /190.00 B:60.16 /60.00 @:77 B@:68
2020-04-18 18:29:19,455 - Recv: ok
2020-04-18 18:29:19,460 - Send: N27 M10518
2020-04-18 18:29:19,466 - Recv: ok T:190.48 /190.00 B:60.05 /60.00 @:60 B@:82
2020-04-18 18:29:19,479 - Send: N28 M109 T1 S19031
2020-04-18 18:29:19,493 - Recv: echo:M109 Invalid extruder 1
2020-04-18 18:29:19,494 - T1 reported as invalid, reverting to T0
2020-04-18 18:29:19,496 - Recv: ok
2020-04-18 18:29:19,499 - Not queuing T0, that tool doesn't exist according to the printer profile or was reported as invalid by the firmware
2020-04-18 18:29:19,504 - Send: N29 M82*34
2020-04-18 18:29:19,509 - Recv: ok
Logs say: "Invalid extruder 1", but when reverting to T0, logs say that the T0 doesn't exist
The OctoPrint number of extruders in the printer profile is used by OctoPrint to prevent gcode commands that specify a extruder number higher than the number of extruders listed from being sent to the printer. In your case, if there are 16 virtual extruders, then I believe the number of extruders in the OctoPrint profile should be 16 (assuming the printer uses 0-15 to address the virtual extruders).
I'm confused. I believe Recv: echo:M109 Invalid extruder 1 is a response from the printer firmware. The OctoPrint profile "Number of Extruders" is used, for example, to prevent a T1 or a T2 from being sent to the printer if the number of extruders is 1. Since you have Number of Extruders set to 16, OctoPrint allowed the M109 T1 S19031 to be sent, but the printer didn't like it (Note: the N at the beginning is the line number and at the end should be an * followed by the checksum of that line. That doesn't match what you posted but it may have gotten "lost" in the translation). It would be better to upload the entire serial.log instead of editing out what you think is important.
I suggest that you also upload and post a link to the .gcode file. Also some additional details like the slicer being used and (a link to) the model being sliced. In addition, some screenshots of the four OctoPrint printer profile screens.
The more information (i.e. details) you provide to us, the better chance we have of providing a solution to you.
I believe I have been "Peter Principled" but I believe I have collected all the necessary information for someone like @foosel to maybe make sense of it all.
Which would normally explain why the firmware is complaining about a T1 but it doesn't explain to me why the print works when read from the SD card.
A couple of additional questions... Is the firmware in the printer what came with it? Did the printer come with a slicer? If so, which one? I did notice that Ultimaker Cura 4.5 has a printer definition for the A20M which configures the printer as a dual extruder (shared heater is not checked).
Really interesting your comment. I have reviewing the marlin code and I see that:
// This defines the number of extruders
// :[1, 2, 3, 4, 5] #define EXTRUDERS 1
but this is the official marlin code for Geeetech a20m, and dual extruders work fine from SDCard. I don't know if it's because of the virtual extruders and steppers. This is in another part of the marlin code
#define MIXING_EXTRUDER #if ENABLED(MIXING_EXTRUDER) #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands #define GRADIENT_MIX // Apply a gradient between mixes over several layers #endif
Answering your questions:
Is the firmware in the printer what came with it?
I have loaded a new marlin, but it's the official marlin for my printer. I only have changed the language
Did the printer come with a slicer?
No, I'm using Cura
which configures the printer as a dual extruder (shared heater is not checked)?
Shared heater is not checked by default. In my octoprint settings I have checked "Shared nozzle". I don't know if that is the problem
Thank you for your help. Maybe @foosel can help me with that
Finally, I have solved the problem. I had the shared heater not checked in Cura. I have checked it, and my Geeetech a20m is working now with 2 filaments
Any idea how to tell Cura to use the 2nd filament extruder from start to finish, It prints the purge line with the 1st one and then switches to the 2nd one for the print.