Mix Extruder scripts do not execute properly
I don't believe this is necessarily a bug, but if it is my error, I sure can't spot it.
Last July, I installed a Cyclops clone and setup mix profiles and virtual extruders for the two steppers feeding the 2 to 1 hotend. Things seemed to work OK as far as I tested it, but recently I started to take a close look and tried to shorten the number of mix ratios in another printer profile I wanted to create.
I found that the first mix ratio in the list of mix ratios didn't execute properly; it was like it was ignored or substituted with something else. From mix ratio 2 until the end of the list everything worked as specified. I looked at the examples carefully and setup a different printer profile with new a short list of mix profiles, and the results were the same. I tried a clean install of Repetier Host on the Win 8.1 partition of the printer PC (default is Win 10). Since RH was operated from that partition at one time, I scrubbed the registry of remnants of Host before installing RH. I tried running a current version of RC Marlin FW on the printer and still received the same results, the first mix profile did not execute as written.
The script for the mix ratios is below. Whatever is written into position 1 will not work properly. I have less than 16 extruders defined in each of the printer setups I have tried, but I have not found any mention of a restriction or requirement on the number of extruders. The firmware used was Repetier Dev 1.0 from mid-July 2016.
----------------------------------------
; Mix ratios are WRT EXT 0
; Extruder 0
; Mix 97 03
M163 S0 P97
M163 S1 P3
M164 S0
; Mix 90 10
M163 S0 P90
M163 S1 P10
M164 S1
; Mix 80 20
M163 S0 P80
M163 S1 P20
M164 S2
; Mix 70 30
M163 S0 P70
M163 S1 P30
M164 S3
; Mix 60 40
M163 S1 P40
M163 S0 P60
M164 S4
; Mix 50 50
M163 S1 P50
M163 S0 P50
M164 S5
; Mix 40 60
M163 S0 P40
M163 S1 P60
M164 S6
; Mix 30 70
M163 S0 P30
M163 S1 P70
M164 S7
; Mix 20 80
M163 S0 P20
M163 S1 P80
M164 S8
; Mix 10 90
M163 S0 P10
M163 S1 P90
M164 S9
; Extruder 1(0)
; Mix 03 97
M163 S0 P03
M163 S1 P97
M164 S10
; Extruder 0 FULL
M163 S1 P00
M163 S0 P100
M164 S11
; Extruder 1 FULL
M163 S1 P100
M163 S0 P00
M164 S12
Comments
There aren't any indications of an error from either the printer or Repetier Host. I tried a simple two entry setup, and the first one failed. If I remember correctly, the wrong stepper is energized when the first virtual extruder is selected.
I
I setup a different computer to use with my printer. It never had any 3D printer stuff installed on it.
In printer setup, I set it for one heater for all extruders, defined two virtual extruders and brought over all my Slic3r profiles from the original setup. The firmware is set up for a MIX extruder.
In my test cases, I am using 0/1 and 1/0 ratios for the test virtual extruders, so I can easily see what is being driven. When I ran my quick test print with no filament, it behaved as before, when I select the first virtual extruder, stepper motor #2 is driven. If I select the second virtual extruder and slice it, then stepper motor #2 will drive as you would expect it to.
I added a third virtual extruder, such that extruders number 2 and 3 select stepper motors 1 and 2. It works as it should!
If I slice an object with virtual extruder 1 it drives stepper 2 no matter whether the script is 0/1 or 1/0. Virtual extruders 2 and 3 work as the script describes.
This is beginning to look like a real bug somewhere. Depending upon how people define their extruders, I wouldn't be surprised that it hasn't been detected before now, if there is something in my setup that is aggravating things. In my case when I had a 13 extruders defined for a cyclops, I probably couldn't have realized the difference between the first mix setting and the second.
In the present and the recent past, I am only using 0/1 or 1/0 ratios because I replaced the mix hotend with a Y in the path between the steppers and hotend. I'll switch the FW to a shared heater when this gets sorted out. I want to get to some sore of resolution, even if it involves making virtual extruder 1 a dummy, so that I can switch back to a cyclops if a need arises.
I'm using Repetier FW Dev 1.0 dated 3/24/17.
I used Marlin briefly just to see if it made any difference in the handling of the virtual extruders. I also tried it as a dual extruder with a shared hotend.
Prior to trying Marlin, I was using Repetier Dev 1.0 from July of 2016
The only thing that is common in the PC I just setup is the Slic3r profiles and RH mix script, as well as the printer with recent repetier FW. If I remember correctly, when I looked at the G Code resulting from the first virtual extruder, it did NOT contain a T command, which I assume means that it is supposed to use T0 (which is correct for the extruder used). If I used any other virtual extruder, a T command defined the extruder I will verify this on the new machine later in the day, when I'm fully awake.
If I am doing something incorrectly, then I duplicated it when I setup the new PC.
That's good news, I suppose. I had a passing thought that Slic3r was about the only other thing that was suspect.
You said: "If you use only one extruder slic3r omits T0 and will use the current extruder which must not be T0!"
That doesn't seem to be the case as I understand it. In the short 3-virtual-extruder script below, it doesn't make any difference whether the ratio is 1/0, 0/1, 50/50 or anything else for the first entry. It always results in only stepper #2 being the only one turning. BTW, I think the term extruder should be used less often, since with mix-hotends and shared-hotends, the definition of extruder is not clear; using the terms stepper and hotend removes the ambiguity.
In any event, if that is not a bug in the whole virtual extruder scheme, then I've never seen one. Maybe it's covered in the documentation for multi-input mix hotends and virtual extruders, but from what I've seen, that is pretty much a mirage.
I believe I understand why writing it to EEPROM works, but I find the way Repetier FW handles writing EEPROM (with a toggle command) so distasteful that for my minimal purposes, when/if I use a mix extruder again, I'll add a dummy virtual extruder to the top of the list (as below) and hope that I remember that the black color representation in the Object Placement tab reminds me to select a different virtual extruder if I want it to work as expected.
Test Script
; Ext-Dummy
M163 S0 P100
M163 S1 P00
M164 S0
; Extr0FULL
M163 S0 P100
M163 S1 P00
M164 S1
; Ext1FULL
M163 S0 P00
M163 S1 P100
M164 S2
As you certainly expected, all of the virtual extruders in the script below now work perfectly! At the first attempt, I did make the mistake of adding a blank line before the T0, and it's probably no surprise to anybody but me that another virtual extruder was created. With the script as shown, only 3 extruders are created and they work correctly independent of the order selected.
Thanks so much for the help.
Test Script
; Ext-Dummy
M163 S0 P50
M163 S1 P50
M164 S0
; Extr0FULL
M163 S0 P100
M163 S1 P00
M164 S1
; Ext1FULL
M163 S0 P00
M163 S1 P100
M164 S2
; Add T0 to ensure that the first virtual extruder executes correctly
T0