Welcome! Log In Create A New Profile

Advanced

GCode question about extruder feed when pausing to swap filament

Posted by gordonendersby 
GCode question about extruder feed when pausing to swap filament
January 23, 2015 12:59PM
Dear all,

Ive been playing with swapping filament colours during the print.
Ive got some gcode ive adapted from an example ive found and it works but i have to manually feed
the filament in to purge the previous colour by hand.

Some filament needs more purging than others and as ive got a smart controller i can extrude the new filament through the lcd interface.
But if i do that the gcode after the pause causes the extruder to wind back and ejects the new filament.
The counter for the extruder in the gcode interpreter is advanced by the smart controller.

So Ive added:
G92 E192.13178
Which should set the extruded filament counter back to where it was when i paused the print.
I tried this before and after M82.
But its not working and the extruder works backwards till the E counter matches the next gcode line.

..................
G1 F3000 X78.913 Y96.802 E192.09537
G0 F6000 X78.664 Y96.344
G1 F3000 X79.101 Y95.553 E192.11050
G1 X78.390 Y95.557 E192.12048
G1 X78.415 Y94.825 E192.12686
G1 X78.130 Y94.757 E192.13178
;LAYER:8

M83 ; turn on relative movement for extruder  
G1 E-5.000000 F6000 ; retract filament 5mm  
G1 X0.000000 Y0.000000 Z4.000000 F6000 ; home X and Y axis leave Z at current height  
M84 E ; release extruder stepper motor from 'holding' position  
M25 ; pause print!
G1 X0.000000 Y0.000000 F6000 ; upon resume, rehome X/Y in case position was bumped out   
G1 E0 F3000 ; reset extruder, ready to push out plastic again  
G1 F6000  
M82 ; set extruder movement back to absolute ready for next layer
G92 E192.13178 ; Set e back to previous value to continue extruding 

G0 F3000 X77.924 Y94.893 Z2.250
;TYPE:WALL-INNER
G1 F3000 X77.659 Y93.305 E192.15882
...............

Has anyone got something like this working?
This is all on ramps 1.4 with marlin on my prusa i2.

Thanks
Gordon
Re: GCode question about extruder feed when pausing to swap filament
January 27, 2015 07:51AM
Have i managed to stump the experts?

Gordon
Sorry, only registered users may post in this forum.

Click here to login