Let's discuss how to use Slic3r (PE) with the Retractable Purge Mechanism
Don't use this code as it's modified for a bondtech extruder but you can see the change and purge.
Instead take the code from the default settings ini example file in the google drive.
this code -> T{next_extruder} . signifies the extruder tool change. Everything before is before switch. Everything after, is after.
Gcode goes in Toolchange GCODE in Printer settings
“
G92 E0.0
;G1 E-50 F2100 ;retract
G91;Change to relative position
G91
{if layer_z < 15.0}
G1 Z15
{endif}
G1 Z5
M106 S0
G90
G1 E-15.0000 F7800
G1 E-24.5000 F1200
G1 E-7.0000 F600
G1 E-3.5000 F360
G1 E20.0000 F437
G1 E-20.0000 F417
G1 E20.0000 F396
G1 E-20.0000 F375
G1 E20.0000 F354
G1 E-20.0000 F333
G1 E20.0000 F312
G1 E-20.0000 F292
; SKINNYDIP START
G1 E32.0000 F1980
G4 P0
G1 E-32.0000 F4200
G4 P0
; SKINNYDIP END
G4 S0
T{next_extruder}
M900 K0.05
M221 S100
G28 X
G1 X200 F12000 ;move head into position
G4 S0 ;clear movement buffer
G1 X250 F12000 ;move head to purge zone
G1 X254.2 F1000 ;extend purge arm
M107 ;turn off fan
G92 E0 ;reset extrusion position
G1 E0.8 F2100 ;issue after retract
G92 E0 ;reset extrusion position
G1 E40 F200 ;1st purge extrude onto thumb tack
M106 S255 ;turn on fan
G4 S12 ;blob cooling
G92 E0 ;reset extrusion position
G1 E-0.8 F2100 ;retract extruder to prevent oozing
G1 X240 F12000 ;whack blob off tack 1
G1 X254.2 F1000 ;reset for another blob whack
G1 X240 F12000 ;whack blob off tack 2
G1 X200 F12000
G4 S0
G1 X250 F12000
G1 X254.2 F1000
M107
G92 E0
G1 E0.8 F2100 ;issue
G92 E0
G1 E40 F200 ;2nd purge
M106 S255 ;blob cooling
G4 S12 ;blob cooling
G92 E0
G1 E-0.8 F2100
G1 X240 F12000
G1 X254.2 F1000 F3000
G1 X240 F12000
G1 X200 F12000
G4 S0
G1 X250 F12000
G1 X254.2 F1000
M107
G92 E0
G1 E0.8 F2100 ;issue
G92 E0
G1 E40 F200 ;3rd purge
M106 S255 ;blob cooling
G4 S12 ;blob cooling
G92 E0
G1 E-0.8 F2100
G1 X240 F12000
G1 X254.2 F1000
G1 X240 F12000
G1 X200 F12000
G4 S0
G1 X250 F12000
G1 X254.2 F1000
M107
G92 E0
G1 E0.8 F2100 ;issue
G92 E0
G1 E40 F200 ;4th purge
M106 S255 ;blob cooling
G4 S12 ;blob cooling
G92 E0
G4 S0
G1 E-2 F2100 ;retract
G1 X240 F12000
G1 X254.2 F1000
G1 X240 F12000
“
could you make an easy step by step guide for setting up a mk3s with this? shouldn't it be a simple copy paste thing, just changing the purge location in the gcode?
i did the purge location test, and got perfect blobs at 252.5. with a stock mk3s, as that seems to be what this system has been tested on, from what i can tell, is this what i put into tool change gcode:
;Begin m.gcode
M907 X850 ;set current of X motor. May need to set Y as well if your printers head moves on x & y
M106 S0 ;turn off fan
G92 E0 ;reset extrusion distance
G1 E-0.8 F2100 ;retract
G1 Y100 F12000 ;Break string before Z lift
G1 X200 F12000 ;move head into position
G91;Change to relative position
{if layer_z < 15.0}
G1 Z15
{endif}
;UNCOMMENT G1 Z15 F15000 ;Purge Z lift
G90;Change to absolute position
G4 S0 ;clear movement buffer
G1 X250 F12000 ;move head to purge zone
G1 X252.5 F1000 ;extend purge arm
;End m.gcode
************End pre-tool change gcode****************
*********Begin after tool change purge gcode*******************
G1 X200 F12000 ;move head into position
G4 S0 ;clear movement buffer
G1 X250 F12000 ;move head to purge zone
G1 X252.5 F1000 ;extend purge arm
M107 ;turn off fan
G92 E0 ;reset extrusion position
G1 E0.8 F2100 ;issue after retract
G92 E0 ;reset extrusion position
G1 E40 F200 ;1st purge extrude onto thumb tack
M106 S255 ;turn on fan
G4 S12 ;blob cooling
G92 E0 ;reset extrusion position
G1 E-0.8 F2100 ;retract extruder to prevent oozing
G1 X240 F12000 ;whack blob off tack 1
G1 X252.5 F3000 ;reset for another blob whack
G1 X240 F12000 ;whack blob off tack 2
G1 X200 F15000
G4 S0
G1 X250 F12000
G1 X252.5 F1000
M107
G92 E0
G1 E0.8 F2100 ;issue
G92 E0
G1 E40 F200 ;2nd purge
M106 S255 ;blob cooling
G4 S12 ;blob cooling
G92 E0
G1 E-0.8 F2100
G1 X240 F12000
G1 X252.5 F3000
G1 X240 F12000
G1 X200 F15000
G4 S0
G1 X250 F12000
G1 X252.5 F1000
M107
G92 E0
G1 E0.8 F2100 ;issue
G92 E0
G1 E40 F200 ;3rd purge
M106 S255 ;blob cooling
G4 S12 ;blob cooling
G92 E0
G1 E-0.8 F2100
G1 X240 F12000
G1 X252.5 F3000
G1 X240 F12000
G1 X200 F15000
G4 S0
G1 X250 F12000
G1 X252.5 F1000
M107
G92 E0
G1 E0.8 F2100 ;issue
G92 E0
G1 E40 F200 ;4th purge
M106 S255 ;blob cooling
G4 S12 ;blob cooling
G92 E0
G1 E-0.8 F2100
G1 X240 F12000
G1 X252.5 F3000
G1 X240 F12000
M907 X650 ;set the current back to normal
Do you mean a guide for setting up Slic3r PE? That's a good idea.
Your code does look correct. Best to try on a small simple print first, like a couple cubes.
Question for you guys. When I use the custom tool change g-code and print through Octoprint. I get a problem at the end of the print where it seems that when the filament is unloaded, Octoprint thinks the filament has run out and initiates a filament change. I have ran the same g-code through the sd card and it finishes the print and unloads the filament as normal. If I run a single color print through octoprint it also works normal. Issue is only present with octoprint+tool change g-code. Tool change g-code is being put in Prusaslicer, not octoprint.
It does sound like an octoprint issue but we can try and confirm it.
Are you using the latest Slic3r PE version? I think it's 2.2.8
Will you please attach your gcode file?
Sure, here is a small 2 color print out of PLA. If you look at the G-code, when my printer gets to around line 6083 or so the printer ejects the filament and asks you to remove it and reload. This ending G-code is not different from a single color print so I can't figure out why Octoprint is treating it different when I put the custom tool G-code in Prusaslicr. Thanks for taking a look.
hmmm....nothing was attached. Will you please try again? Or email directly to info@bigbrain3d.com
Couple of questions... I tuned the purge location and am using the tool change gcode from the google dive but I'm having the following issues / questions:
- On the very first layer, the filament loads to the nozzle, runs a purge line and then immediately goes and makes blobs as if it is doing a filament change (instead of just printing the first layer). It seems it thinks the first extruder selection was a tool change incorrectly. Is there an easy work around for that?
- Am I interpreting this correctly? You put both the "Pre_toolchange_Prusa_i3" and "Post_ToolChange_Prusa_i3" code chunks into the "Tool change G-code" section of PrusaSlicer under the printer settings?
- Do I have to hard code in all my tip shaping cooling / ramming moves into the g-code if I want filament specific settings? It seems like it doesn't grab these settings from PrusaSlicer the way the "Pre_toolchange_Prusa_i3" gcode is made unless I'm not seeing it correctly.
Also random other note. I'm using a mk2.5s MMU2s and not a MK3. I got rid of the bits in the code to change the stepper current because I wasn't sure if those values were still appropriate for my printer. I also had to modify the Configuration_prusa.h file and re-compile the firmware so I could change the x-axis software endstop to 254mm instead of 250mm. At the 250mm default, I couldn't translate far enough in X-axis to trigger the purge mechanism completely. Just a heads up if anyone else is having that issue.
1) You can manually remove the first purge section from the gcode.
2)Yes you put both those sections into the 'on tool change' section of prusaslicer. The default T change command will come after that but it won't do anything since the filament will already have been switched.
3)PatBef kindly created an update to the tip shaping (french and english). You can replace the M702 unload command with his script found here.
4) Thank you for that advice on the MK2.5. It's been added it to the thingiverse remix for that printer here.
Thanks for the reply. I have it working but I had a few notes:
- You can't take the T[inital_tool] out of the "start gcode" section and have the "tool change gcode" section handle that first filament load when it calls out for T[next_extruder]. I tried that to clean up the code but something in the firmware seems to have a timeout or something that if the filament isn't loaded right away, the printer crashes at some exact time interval. It had me scratching my head a bit. It'll crash before you even get to the T[next_extruder] bit.
- PetBef's tip shaping code works *ok* for PLA but it still doesn't grab the tip shaping information from slicer. If you are using several different plastic types, you get terrible tips (I was doing PLA and PETG and it was no good as all filaments use the same tip shaping instructions regardless).
- I think a better way to handle this would be a post processing script. You would likely then leave the purge tower on and remove the "tool change gcode" stuff (so basically stock) and then have the script extract the tip shaping bits while also removing the purge tower moves as well as add in the retractable purge mechanism bits. It seems like the purge tower portions of the gcode are pretty well identified so maybe it wouldn't be too difficult.
- I'm not super educated how to do that yet but I'll see about giving it a try. That way every filament will get the correct ramming settings from Slicer. As it stands right now, I can't really reliably print anything besides multicolor of all the same plastic.
Good insight! We look forward to seeing your results. Thank you for helping with this post processing. The tip shaping between materials is a tough hurdle.
I've uploaded my post-processing script for the RPM to github; it's written so as to respect the PS settings for purge volumes, ramming, etc.
Be sure to read the readme before use, it is essentially alpha and almost definitely has bugs I did not find with my own testing.