How To: G-Code Startup Scripts for the Dual
Posted: Tue Oct 20, 2015 10:37 pm
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.
