Anyone got GCODE to push filament through the extruder when changing colour?
 
Notifications
Clear all

Anyone got GCODE to push filament through the extruder when changing colour?  

  RSS
jweaver
(@jweaver)
Honorable Member
Anyone got GCODE to push filament through the extruder when changing colour?

I am a little embarrassed to ask this as its the height of laziness, but I just figured that rather than work this out myself, someone may have already done it.

When I change from dark and light colours I generally do different things each time to "clean" the extruder. If I get lazy and don't do a good job, I end up of purging, I end up with blobs or colours in the light coloured print.

Every I do this time I think I should just write some gcode to raise the head.. And push through some filament, but figure that it will take some tweaking to get it right and never start.

But I bet someone else has already done this.. Has anyone got anything that will do this?.. I don't even need it to heat.. I just want it to raise the nozzle.. Move it all the way to the left.. And then push through 6" or so of filament at a good speed.

I know this is easy and only a few lines of code, but I just figured that someone else may have already tweeked this to perfection.

Thanks in advance

Jon

Opublikowany : 11/10/2018 11:04 am
The Plastic Shed
(@the-plastic-shed)
Estimable Member
Re: Anyone got GCODE to push filament through the extruder when changing colour?

Changing colour on a single extruder multi colour uses a wipe tower - basically a block or some other shape - not within the model being printed. When you change colour it should go to the wipe tower and 'prime' itself with the new colour.

If you are manually changing filament to change colour there is a 'change filament' option in the menu, this will let you unload, then load, this will push the new filament through and ask if the colour is now correct - just say no if it isn't. You may need to have a small brass wire brush handy to make sure none of the old colour remains on the extruder nozzle.

I had a quick look around on my machine (which is printing currently) the option is under 'Tune/Change Filament' ... if you're desperate for the gcode it is G1 Exxx Fyyyy where xxx is the amount to feed and yyyy is the speed to feed it, but you shouldn't need this - you can do the same in menu 'settings\move axis\extruder'. M600 can be used to initiate the filament change process eliminating the need for too much messing about.

Opublikowany : 13/10/2018 12:58 pm
jweaver
(@jweaver)
Honorable Member
Topic starter answered:
Re: Anyone got GCODE to push filament through the extruder when changing colour?


Changing colour on a single extruder multi colour uses a wipe tower - basically a block or some other shape - not within the model being printed. When you change colour it should go to the wipe tower and 'prime' itself with the new colour.

If you are manually changing filament to change colour there is a 'change filament' option in the menu, this will let you unload, then load, this will push the new filament through and ask if the colour is now correct - just say no if it isn't. You may need to have a small brass wire brush handy to make sure none of the old colour remains on the extruder nozzle.

I had a quick look around on my machine (which is printing currently) the option is under 'Tune/Change Filament' ... if you're desperate for the gcode it is G1 Exxx Fyyyy where xxx is the amount to feed and yyyy is the speed to feed it, but you shouldn't need this - you can do the same in menu 'settings\move axis\extruder'. M600 can be used to initiate the filament change process eliminating the need for too much messing about.

I probably wasn't clear.. When I change from dark (Say Black) to light (say White), the filament change routine only just pushes enough white through to clear.. But if I printed right away, the first layer would be grey, and probably have blobs of black in it.

If I answer no to the question "has the filament come through" it will push another squirt of filament through, which is better, but still not perfect.. and its slow.

So generally, if I am going from white to black, I print something small, just to completely purge the extruder.. But its slow as it has to do the bed levelling routine first.

So I am just thinking of some Gcode that can live on the SD, which simply raises the head, moves it to the left.. And pushes through a good amount of filament at speed.

I know I could write this myself, but I am sure that someone already has something like this.

Jon

Opublikowany : 13/10/2018 1:39 pm
The Plastic Shed
(@the-plastic-shed)
Estimable Member
Re: Anyone got GCODE to push filament through the extruder when changing colour?

You're not going to speed it up, you can only push so much filament through a given nozzle for a given temperature so you're limited by the physics of it. To increase speed you need to raise the temperature but beyond a certain point the filament cooks, you reach a point where it will go no faster and you will get all kinds of issues with ooze.

The best you can do here is keep saying no ... you can change the defaults for how much is extruded during what is essentially a filament change but I'm pretty sure the only place to do that is in the firmware code.

edit : confirmed the amount extruded for filament changes is hard coded

#define LOAD_FILAMENT_0 "M83"
#define LOAD_FILAMENT_1 "G1 E70 F400"
#define LOAD_FILAMENT_2 "G1 E40 F100"

// Unload filament commands
#define UNLOAD_FILAMENT_0 "M83"
#define UNLOAD_FILAMENT_1 "G1 E-80 F7000"

/*------------------------------------
CHANGE FILAMENT SETTINGS
*------------------------------------*/

// Filament change configuration
#define FILAMENTCHANGEENABLE
#ifdef FILAMENTCHANGEENABLE
#define FILAMENTCHANGE_XPOS 211
#define FILAMENTCHANGE_YPOS 0
#define FILAMENTCHANGE_ZADD 2
#define FILAMENTCHANGE_FIRSTRETRACT -2
#define FILAMENTCHANGE_FINALRETRACT -80

#define FILAMENTCHANGE_FIRSTFEED 70
#define FILAMENTCHANGE_FINALFEED 50
#define FILAMENTCHANGE_RECFEED 5

#define FILAMENTCHANGE_XYFEED 50
#define FILAMENTCHANGE_EFEED 20
//#define FILAMENTCHANGE_RFEED 400
#define FILAMENTCHANGE_RFEED 7000 / 60
#define FILAMENTCHANGE_EXFEED 2
#define FILAMENTCHANGE_ZFEED 15

Opublikowany : 13/10/2018 1:51 pm
jweaver
(@jweaver)
Honorable Member
Topic starter answered:
Re: Anyone got GCODE to push filament through the extruder when changing colour?


You're not going to speed it up, you can only push so much filament through a given nozzle for a given temperature so you're limited by the physics of it. To increase speed you need to raise the temperature but beyond a certain point the filament cooks, you reach a point where it will go no faster and you will get all kinds of issues with ooze.

So when I say fast, I obviously realise that there is a limit..

When you load filament, you get a few seconds where it feeds pretty quick.. and then 10 seconds where it runs REALLY slowly.

But when it does the purge line before the print, the first 1/2 is quick.. And the 2nd is unbelievably quick and it spits out a load of filament very quickly./

Its this part of the purge line that I would like to re-create, but for longer and in mid air.

So I guess these lines from the Printer settings are a clue

G1 X60.0 E9.0 F1000.0 ; intro line
G1 X100.0 E12.5 F1000.0 ; intro line

But now I am confused as both oif these are the same speed (F1000). Where in real life, the 2nd part of the purge is MUCH quicker than the first..

I guess I could just do...

G1 E30 F1000.0

So perhaps I just need to play.

Opublikowany : 13/10/2018 4:58 pm
The Plastic Shed
(@the-plastic-shed)
Estimable Member
Re: Anyone got GCODE to push filament through the extruder when changing colour?

That purge line is in the script that is placed at the start of the gcode - again found in printer settings/custom gcode. These are the gcode lines responsible - note the E12.5 ... this is the increased extrusion you describe the X axis speed does not change - beware of this because it is suitable only for certain filaments at certain temperatures. Try extruding at this rate with some filaments and the wrong temperature and you will grind the filament between the bondtech wheels.

G1 X60.0 E9.0 F1000.0 ; intro line
G1 X100.0 E12.5 F1000.0 ; intro line

You will need to experiment to see what 'E' rate you can get away with at the temperature and with the filament you're using.

It is easy to put the extruder out of the way when no printing is done using G1 so you can do something like G1 X0 Y0 Z50 then just use Exxx - assuming of course that the extruder has been heated - that's different Gcode -

M104 Sxxx ;xxx = temperature
M140 Sxxx ;= wait or extruder to reach temperature xxx

You may find that the additional colour isn't IN your nozzle but on the outside of it. Don't even think about doing any of this using the change filament M600 - you can't, that process / sequence is predefined and hard coded.

Opublikowany : 13/10/2018 5:18 pm
jweaver
(@jweaver)
Honorable Member
Topic starter answered:
Re: Anyone got GCODE to push filament through the extruder when changing colour?


That purge line is in the script that is placed at the start of the gcode - again found in printer settings/custom gcode. These are the gcode lines responsible - note the E12.5 ... this is the increased extrusion you describe the X axis speed does not change - beware of this because it is suitable only for certain filaments at certain temperatures. Try extruding at this rate with some filaments and the wrong temperature and you will grind the filament between the bondtech wheels.

G1 X60.0 E9.0 F1000.0 ; intro line
G1 X100.0 E12.5 F1000.0 ; intro line

You will need to experiment to see what 'E' rate you can get away with at the temperature and with the filament you're using.

🙂 Shows how little I know about GCode.. I thought F was the speed.... I assume that F is the amount..

So I would want to do something like

G1 E12.5 F3000

I think I will have a play.. Cheers.

Opublikowany : 13/10/2018 9:24 pm
The Plastic Shed
(@the-plastic-shed)
Estimable Member
Re: Anyone got GCODE to push filament through the extruder when changing colour?

F is the speed - the E = the amount to extrude, X = move to position on X axis.

Be careful with F - have a play - you'll see why 😉

If you extrude too much 'E' and don't move enough X or Y then it's blob time ....

Opublikowany : 13/10/2018 9:31 pm
Share: