Operating a Shared Extruder with a Y-switch Between Steppers and Hotend

I recently setup my printer for a shared hotend fed from two steppers through a Y connection.  I setup the firmware for a shared extruder, and that works properly; it gives me control of two steppers and a single hotend with one heater.

I setup the firmware for G10/G11 firmware extraction, and that works correctly when I use either stepper during a print, or switch steppers with a manual pause (or M600 command) followed by a tool-change command (T#).

As part of the firmware configuration, I also defined the retraction/unretraction lengths required by the Y-device during a tool change, but I do not know how to trigger the firmware to cause the current stepper to retract, and the next stepper to advance. 

I see that there is a long-extract/retract command in the G10/11 commands, and I've also seen placeholder variables such as previous and next used in commands.  I suspect some G-Code belongs in the printer profile when a tool is changed, but I don't know the syntax and how to use them. If there is a document that defines how this works, please point me in that direction. 

Comments

  • I would try to solve this in firmware instead of slicer. Much more safe in long run.

    The solution would be that every extruder has it's own start/end gcode. So If E0 is active and E1 should be activated by T1 you would put in E0 end gcode the retract and in E1 start gcode the end of retract.

    The main problem is initial state, so you should make sure to always stop with E0 active which is also assumed when you start printer.
  • I think you are telling me that a solution is to add code to the firmware. While there was a time I might have been able to tackle something like that, it was decades ago. I thought there might be an easy solution to automate filament changes using the Y-feed and G-Code in Slic3r.  I have minimal needs, so I'll continue doing this the way I know using the M600 command, manual filament priming, and a T command.  I'll keep an eye open for solutions that others define.  

    When I recently had Marlin FW installed while I was groping with the mix ratio problem, I did try printing a 2 color model using Marlin and Cura.  They handled the switching and purging OK and  I'm sure I will get the same results now that I again have Repetier FW installed.   
    Many Thanks.
  • With before and after switch gcode in slic3r you can do the same.Just not sure you have both in slic3r.
  • Slic3r contains a provision to add tool change G-code in the Printer Settings tab, and I found an example that uses placeholder extruder variables to heat/cool the two extruders in a dual extruder tool switch. It seems like a person could add code to do a G10 long-retract and a G11 long-unretract using the previous extruder and next extruder place holder variables. 

    I tried manual operation of the long-retract/unretract commands, and they do what is expected, however the G11 unretract command would not execute unless it there was a G10 command that preceded it. 

    About this time I realized that I only knew enough to be dangerous and started looking for some examples that worked; I didn't find any. 
  • edited April 11
    I may have not understood what you were suggesting when you said:
    " I would try to solve this in firmware instead of slicer. Much more safe in long run."

    I just took a look at the configurator again and maybe you were suggesting using the select/deselect  commands that can be executed during an extruder switch.  I can manage something like this; I thought you were suggesting some additional C-coding to be compiled.  It looks like the perfect place to use the G10/11 S1 commands.
    The G10 setup in the configurator includes the necessary retract/unretract for an extruder switch.  How were these intended to be used?

    The next thing that comes to mind is how these commands are handled during an M600 call. 
  • No I was refering to select/deselect gcodes. Do not use G10/G11 here. Switch to relative extrusion and just do G1 E-50 F2000 etc. Since it is done with active extruder you do only the part for the extruder in it. So when switch delect from old extruder and for the new selected the select command to extrude into y switch.
  • I put the following code in the select and deselect commands for extruder 0 and 1, and uploaded the FW:

    Select Command: M209 S0 /n  M83 /n  G1 E41.0 F200 /n   M82 /n  M209 S1 /n  G4 S4 /n M116
    Deselect Command: M209 S0 /n  M83 /n  G1 E-41.0 F2000 /n  M82 /n  M209 S1 /n  M116

    I ran a small print with no filament and a couple tool changes edited into the G-code. At the layer where I inserted the tool change, I removed the G10 and G11 and substituted @pause followed by a tool change command, Tx.  For both of the tool changes, the selected stepper was energized and the Dwell (wait) of 4 seconds was evident, but there was no retraction or unretract at either tool change.  The print proceeded after both changes and appeared to be operating normally, with the correct stepper running and G10/11 commands evident repeatedly.  

    As the old saying goes: Close, but no cigar

  • I hope you did not enter it like that. In your example you separate commands by /n but the correct separator is \n so you got only one command and last G code is used.

    Why M116 if you do not change temperatures?
    Why wait 4 seconds - M400 would be enough to ensure moves are done.

  • edited April 12
    Yes, I DID enter it exactly as written. And, I could have looked at it for a long, long time before I noticed the error, especially since I was using the G-code for the first time and was unsure about it.  I did check that the end-commands  (although incorrect) were the inserted in all places where they were required. 

    It does execute as written now.  I added the delay times to give the unretracted filament some time to stabilize and for me to be able to see what is happening.  I didn't think the M116 was necessary, but it might be worthwhile if the temperature control loop was below the set point after retraction.

    I tried a small test print with two filament changes, and it worked correctly.  I did notice some oozing I wouldn't have expected, but I'll look into that later.  It was likely a result of the unretract and the long waits.

    When I tried to manually prime the Y-block with the two filaments, I noticed that the select/deselect stepper movements were active in the manual mode of Repetier Host, where I didn't expect it.  The extruder change retractions were triggered when Extruder 1 or 2 was toggled in the manual mode.  I'm don't believe it is possible to setup the filaments in the extruder block correctly in the manual mode as it is now; the FW retraction mode is turned on and the filament movement controls in Host are inoperative. 
  • I turned off G10/11 firmware retraction and went back to slicer generated retract commands.  Priming the hotend is a bit tricky, but it works OK and fairly easy once you get the method in mind.  I'll post what I have after I give it a more thorough test.
  • Sure host manual sends T1 or T0 so it triggers the switch. That is intention and required. That is one reason why I adviced putting the code in firmware so it correctly switches. But this is of course a bit personal preference how you like the commands send.
  • Help!
    I've tried to tune the sel/desel commands to minimize the potential for oozing, but something has gone wrong.
    The extruder scale factor seems to be about twice (maybe 2.54) what I expect, and I am clueless. It is probably obvious, but not to me. I've written the EEPROM and verified that E still moves at 95 steps/unit.
    Here's the code from the configuration.h

    SELECT_COMMANDS "M82 \n  G1 E38.0 F1000 \n  G91 \n  G1 Z-1.0 F5000 \n  G90 \n  M82 \n G1 E3.0 F2000 \n  M400"

    DESELECT_COMMANDS "M82 \n  G1 E-3.0 F2000 \n  G91 \n  G1 Z1.0 F5000 \n  G90 \n  M82 \n  G1 E-38.0 F2000 \n    M400"

    The rational for moving the filament in two sections may not be necessary; I added it before I realized the filament was moving absurdly longer than it should have, but I haven't had much that will qualify as anything other than preliminary testing.
    It works well without FW retraction enabled, and the manual extruder handling in Host is nice to have.
  • M82 is absolute E psoitioning and using that without knowing where E was before is dangerous and often causes issues. You should also always use G92 E0 at the end to reset position.
  • I had a feeling that there was something wrong with the E axis reference, but I don't have a basic understanding about the system, and I didn't find anything in the G-code wiki that helped.  Before I went to bed, I had the thought that I see G92 E0 a lot in executable code and that probably belongs somewhere in the command strings.
    Again, my thanks.
  • Perfect!
    When I get some more experience with this, I'd like to write it up so others (like me) don't have to go through the same frustration.  What is a good way to post it here?
    I'll probably also put something on Thingiverse item I made to mount the integrated Y-block/hotend I'm using.
  • I guess the tips and tricks section would fit best as this is meant for non-questions, but tp share such insights that would help others.
  • The only shortcoming I see with that location is that editing does not appear possible once the initial period expires.  There is zero chance that I would get it complete on the first pass.  I could post a link to it.  It's not something that needs to be answered now. 
  • Yes, it is still a forum and no wiki that can be modified any time. All you could do is repost a improved version I guess or write it locally until it is finished and then enter it.
  • One way that would work is to post an outline on the forum and include a link to the whole document. I have both Dropbox and Onedrive available.  I can use MS Word or an .RTF format; I don't know what is best for the most users.  I'll try something in the next few days and post a link here first. 
  • Best would be something dropbox can show in browser I'd say. As mac user word is a pain. PDF would be great for viewing. Word can export that.
  • Here's a OneDrive link to something that has a long way to go:
    It is in .DOC format, and likely a very old one since I exported if from an old version of MS Works word processor, which I am using to write it in .WPS format.  I didn't think that .WPS  would be suitable for wide viewing.  I'll update the .DOC periodically and try for .PDF later
  • Cool, it opens in online word editor :-) Good solution and good start.
  • That's good news.  Maybe I can switch to editing the online copy with Word that I have here, somewhere. Recent test prints that are manually patched are looking a lot better.  I haven/t tried a two-part model sliced with Cura yet.   
  • Somehow or other I managed to delete the link. Here's a new one.
  • edited May 7
    I am trying a Y feeder and Simplify3D. Is the firmware extruder switch retract/undo enough or do i need to put G10 and G11 in the tool change script?
  • Doug40 said:
    Somehow or other I managed to delete the link. Here's a new one.
    Hi Doug40 i see the firmware example thanks.
    Do you have any screen shots showing where and what go's into simpify3D to make the retraction switch work for the Y feeder?
  • Sorry for the delay, I don't get a notice about new posts, and thought the thread might be dead. I don't know anything about Simplify 3D. The printer firmware does most of the work. If you use Simplify 3D rather than Repetier Host to drive the printer, then the selection of the extruder, and the priming procedure are about the only thing that probably have to be different. You have probably already answered the question above about G10 and G11, but they do not need to be mentioned outside of the printer firmware. If you use firmware retraction, and set the slicer to retract at a layer change, you will see them in the G-code at the layer change z-movement, and they have to be removed for some operations. If they aren't in the area you are patching, then you can ignore the caution. You just don't want to change filaments if the one in use has already been retracted when you insert a tool change. The new tool will get an unretract command when it doesn't need one and the old one won't be advanced enough if you switch back to it.
Sign In or Register to comment.