How To: G-Code Startup Scripts for the Dual
How To: G-Code Startup Scripts for the Dual
Oooookay....thanks go out to Jin and Tim for the handy-dandy directions on which way to go with this.
Couple of things to keep in mind:
Not for use in the M2 V4 Rev. E machines
I'm listing three scripts below, to be used in different circumstances. (Yep, everything is more complex with a dual! Chuckle!)
Tim and Jin, i did wind up adding a Y-offset jog and a secondary wipe into the code for the dual extruders...it was working fine without one as long as I was printing only PLA, but when I got around to finally testing it on PETG, the stickiness of that filament was keeping the right extruder from wiping the glob off completely. (Good call!)
These change the way the printhead moves off the bed, to prevent dragging the right nozzle across your binder clips accidentally. (also keeps that little bit of ooze from getting smashed into the nozzle at the X/Y home.)
I have an acceleration damper in there as well - it can be removed if you don't want to use one. (I personally prefer to not have everything rocketing around. )
Single Extruder Left (Tool 0)
Use this one when you just want to prime the left nozzle.
M108 S255 ; turn on M2 extruder
M201 X1000 Y1000 ; lower default accelerations
T0
G28 X Y ; home X and Y axes
G1 Y50 F8000 ; move forward to avoid binder clips
G1 X215 ; move off platform
G28 Z ; home Z axis
G1 Z0.4 ; position nozzle
G92 E0 ; zero extruder
G1 E25 F225 ; purge nozzle
G92 E0 ; zero extruder
G1 X190 Z0.1 E1.0 F1200 ; slow wipe
G1 X180 Z0.25 ; lift
Single Extruder Right (Tool 1)
Use this one when you just want to prime the right nozzle.
M108 S255 ; turn on M2 extruder
M201 X1000 Y1000 ; lower default accelerations
T0
G28 X Y ; home X and Y axes
G1 Y50 F8000 ; move forward to avoid binder clips
G1 X215 ; move off platform
G28 Z ; home Z axis
G1 Z0.4 ; position nozzle
T1
G92 E0 ; zero extruder
G1 E25 F225 ; purge nozzle
G92 E0 ; zero extruder
G1 X190 Z0.1 E1.0 F1200 ; slow wipe
G1 X180 Z0.25 ; lift
Dual Extruders (Tool 0 & Tool 1)
Use this one when you want to prime both nozzles.
M108 S255 ; turn on M2 extruder
M201 X1000 Y1000 ; lower default accelerations
T0
G28 X Y ; home X and Y axes
G1 Y50 F8000 ; move forward to avoid binder clips
G1 X215 ; move off platform
G28 Z ; home Z axis
G1 Z0.4 ; position nozzle
T1
G92 E0 ; zero extruder
G1 E25 F225 ; purge nozzle
G92 E0 ; zero extruder
T0
G92 E0 ; zero extruder
G1 E25 F225 ; purge nozzle
G92 E0 ; zero extruder
G1 X190 Z0.1 E1.0 F1200 ; slow wipe
G1 Y60 ; y axis shift
T1
G1 X190 Z0.1 E1.0 F1200 ; slow wipe
G1 X180 Z0.25 ; lift
T0
And yeah, i use different ending scripts as well......those are next.
Couple of things to keep in mind:
Not for use in the M2 V4 Rev. E machines
I'm listing three scripts below, to be used in different circumstances. (Yep, everything is more complex with a dual! Chuckle!)
Tim and Jin, i did wind up adding a Y-offset jog and a secondary wipe into the code for the dual extruders...it was working fine without one as long as I was printing only PLA, but when I got around to finally testing it on PETG, the stickiness of that filament was keeping the right extruder from wiping the glob off completely. (Good call!)
These change the way the printhead moves off the bed, to prevent dragging the right nozzle across your binder clips accidentally. (also keeps that little bit of ooze from getting smashed into the nozzle at the X/Y home.)
I have an acceleration damper in there as well - it can be removed if you don't want to use one. (I personally prefer to not have everything rocketing around. )
Single Extruder Left (Tool 0)
Use this one when you just want to prime the left nozzle.
M108 S255 ; turn on M2 extruder
M201 X1000 Y1000 ; lower default accelerations
T0
G28 X Y ; home X and Y axes
G1 Y50 F8000 ; move forward to avoid binder clips
G1 X215 ; move off platform
G28 Z ; home Z axis
G1 Z0.4 ; position nozzle
G92 E0 ; zero extruder
G1 E25 F225 ; purge nozzle
G92 E0 ; zero extruder
G1 X190 Z0.1 E1.0 F1200 ; slow wipe
G1 X180 Z0.25 ; lift
Single Extruder Right (Tool 1)
Use this one when you just want to prime the right nozzle.
M108 S255 ; turn on M2 extruder
M201 X1000 Y1000 ; lower default accelerations
T0
G28 X Y ; home X and Y axes
G1 Y50 F8000 ; move forward to avoid binder clips
G1 X215 ; move off platform
G28 Z ; home Z axis
G1 Z0.4 ; position nozzle
T1
G92 E0 ; zero extruder
G1 E25 F225 ; purge nozzle
G92 E0 ; zero extruder
G1 X190 Z0.1 E1.0 F1200 ; slow wipe
G1 X180 Z0.25 ; lift
Dual Extruders (Tool 0 & Tool 1)
Use this one when you want to prime both nozzles.
M108 S255 ; turn on M2 extruder
M201 X1000 Y1000 ; lower default accelerations
T0
G28 X Y ; home X and Y axes
G1 Y50 F8000 ; move forward to avoid binder clips
G1 X215 ; move off platform
G28 Z ; home Z axis
G1 Z0.4 ; position nozzle
T1
G92 E0 ; zero extruder
G1 E25 F225 ; purge nozzle
G92 E0 ; zero extruder
T0
G92 E0 ; zero extruder
G1 E25 F225 ; purge nozzle
G92 E0 ; zero extruder
G1 X190 Z0.1 E1.0 F1200 ; slow wipe
G1 Y60 ; y axis shift
T1
G1 X190 Z0.1 E1.0 F1200 ; slow wipe
G1 X180 Z0.25 ; lift
T0
And yeah, i use different ending scripts as well......those are next.
Last edited by Jules on Sat Mar 26, 2016 7:21 pm, edited 1 time in total.
Re: How To: G-Code Startup Scripts for the Dual
Thanks Jules......I think....you are making me want to purchase the dual upgrade....
Re: How To: G-Code Startup Scripts for the Dual
Many thanks Jules!!
Last edited by mharter on Wed Oct 21, 2015 12:59 am, edited 1 time in total.
Re: How To: G-Code Startup Scripts for the Dual
Uh-huh, uh-huh, uh-huh.PcS wrote:Thanks Jules......I think....you are making me want to purchase the dual upgrade....
It works a treat after you set up a few profiles. (And I'm sooooo glad not to have to run cleaner filament through anymore. It's like having two M2s in one!)
My pleasureMany thanks Jules!!
Re: How To: G-Code Startup Scripts for the Dual
Finally got the chance to try these out...Damn! These are EXACTLY what I needed. Instant improvement. A super nice compliment to taking the time to properly calibrate everything, kinda like the icing on the cake. Many thanks again.
Re: How To: G-Code Startup Scripts for the Dual
Thanks, I never tried to work out a script for the right extruder only, nice to have you post one here. Just don't remind me that I was supposed to be the one doing this writeup. You do it so much better, anyway.
But---are you using the default tool change, without a special script? Aren't you getting the problem where the first extruder to be inactive doesn't retract at first?
But---are you using the default tool change, without a special script? Aren't you getting the problem where the first extruder to be inactive doesn't retract at first?
Re: How To: G-Code Startup Scripts for the Dual
Yeah, I'm still using the default tool change, and it does leave a skimpy bit at first from the inactive nozzle. So far, I've gotten around it by always printing with a skirt or brim attached to the shield (actually i prefer the brim - at least 6 or more layers) with both nozzles selected for the brim.Tim wrote:But---are you using the default tool change, without a special script? Aren't you getting the problem where the first extruder to be inactive doesn't retract at first?
But I noticed that if you are printing a shield, infill does not attach to it. (Build on it, whatever you want to call it - you have to be printing outlines or outer layers to get it to build on the shield.) So if you don't prime that inactive nozzle with a brim, you can get a skimpy spot in your print. As long as it's infill, it probably wouldn't matter much, but the non-wiping on the shield does cause little buildups to happen if you are using PETG as infill. For a long print, you'd have globs and maybe a crash situation.
So anyway, there is a LOT more to discover about this - get crackin'!
Re: How To: G-Code Startup Scripts for the Dual
My tool change script does solve the problem correctly, but you have to use it with a modified start script. The important thing is that you must print a skirt with the left extruder and not the right, because I don't think there's any other way to guarantee that the left extruder is the first one to print. That's the whole trick of the way I do it. I set it up so that the left extruder is guaranteed to be the first one to print, then I retract the right extruder at the end of the startup script. But since the S3D-generated g-code doesn't know what my scripts are doing and wants to do its own retractions and extrusions between tools in whatever random order it decides on, it's necessary to prevent S3D from doing that by setting its tool-change retraction length to zero, and adding a custom tool-change script.Jules wrote:Yeah, I'm still using the default tool change, and it does leave a skimpy bit at first from the inactive nozzle.
Re: How To: G-Code Startup Scripts for the Dual
Yeah, i noticed that about not being sure which one prints first in the skirt. I'll try your script out as soon as i get my profiles finished up, to see if I like it better than the brim business. (That works perfectly fine, but you do have to remember to set a brim, or put it in your profiles as a default.)
i've noticed several other quirks about how s3d handles things that i need to work out first though. One deals with the filament diameter, which appears to be locked to the same value for both extruders when you set up a dual extruding profile. So if you change it for one extruder, it changes for the other. (Not cool, unless you are lucky enough to have the exact same diameter filament in both extruders, which doesn't happen often.)
So to use it with any accuracy, you have to leave the filament diameter set to the same value (1.75 mm) and adjust the extrusion multiplier for each filament, (because that can be adjusted individually), to compensate for any differences.
So for the last day or two, i've been running new calibration squares to recalculate extrusion multipliers for all of my PLA spools (about 20 of them), assuming a filament diameter of 1.75 mm, and the results have caused me to question everything that i've been telling people so far......with the exception of three filaments, every single one of them had a correct extrusion multiplier of 0.90 at a filament diameter of 1.75 mm! They were extruding correctly without being fiddled with. (Was not expecting that. )
In other words, the default values would give excellent printing results without having to adjust for filament diameter. The three exceptions were the wood filament, which needed a 0.95 multiplier and a complete reversal of the Z-Offset direction (but you remember how oozy that one is -it's a trick to dial in), and a couple of metallic and skin colored ones that had 0.87 and 0.89 multipliers at 1.75 mm filament diameter. Definitely close enough at 0.90 to get acceptable results - i was just being extremely picky by that point.
I'm wondering now if it isn't all about the gap. Get the Z-offset correct, and you can just get on down the road.
Well, anyway - I plan to test all my PETG as well (multiple spools there as well) to see what they do. (Can't move on to other things until i get this worked out in my mind.)
i've noticed several other quirks about how s3d handles things that i need to work out first though. One deals with the filament diameter, which appears to be locked to the same value for both extruders when you set up a dual extruding profile. So if you change it for one extruder, it changes for the other. (Not cool, unless you are lucky enough to have the exact same diameter filament in both extruders, which doesn't happen often.)
So to use it with any accuracy, you have to leave the filament diameter set to the same value (1.75 mm) and adjust the extrusion multiplier for each filament, (because that can be adjusted individually), to compensate for any differences.
So for the last day or two, i've been running new calibration squares to recalculate extrusion multipliers for all of my PLA spools (about 20 of them), assuming a filament diameter of 1.75 mm, and the results have caused me to question everything that i've been telling people so far......with the exception of three filaments, every single one of them had a correct extrusion multiplier of 0.90 at a filament diameter of 1.75 mm! They were extruding correctly without being fiddled with. (Was not expecting that. )
In other words, the default values would give excellent printing results without having to adjust for filament diameter. The three exceptions were the wood filament, which needed a 0.95 multiplier and a complete reversal of the Z-Offset direction (but you remember how oozy that one is -it's a trick to dial in), and a couple of metallic and skin colored ones that had 0.87 and 0.89 multipliers at 1.75 mm filament diameter. Definitely close enough at 0.90 to get acceptable results - i was just being extremely picky by that point.
I'm wondering now if it isn't all about the gap. Get the Z-offset correct, and you can just get on down the road.
Well, anyway - I plan to test all my PETG as well (multiple spools there as well) to see what they do. (Can't move on to other things until i get this worked out in my mind.)
Re: How To: G-Code Startup Scripts for the Dual
That's what I've always maintained. I think some people get a bit obsessive about dialing in these numbers. I don't think it's possible to tell the difference between a print with an extrusion multiplier at, say, 0.85 vs. 0.88, or with the filament diameter set to 1.72 vs. 1.75. It largely comes down to the human tendency to see patterns in randomness. There are far too many variables determining the quality of each print, including such difficult-to-control things like dust, humidity, ambient temperature, first layer adhesion, residue in the nozzle, etc. It's far too easy to get a bad print, adjust some number, try again, get a good print, and then believe that the change in that value was the definitive reason that the print was better.Jules wrote:In other words, the default values would give excellent printing results without having to adjust for filament diameter.