How to stop the hotend from extruding long filament during loading?

Basic Information:

Printer Model: Prusa i3MK3S+
MCU / Printerboard: Einsy
Host / SBC RPi 5
klippy.log
klippy.log (857.5 KB)

Describe your issue:

Hello, when I inserted a filament into the hotend, a long filament was extruded before it stopped. Way too long than required. Is the long default extrusion length set by Klipper on purpose? This seems to waste filament over time. How do I stop it from extruding that much during the load process?

Do most of you use the Load Filament button on mainsail or those buttons from FLAP?

How long is long?

Have you had a look on this macro?


[gcode_macro LOAD_FILAMENT]
gcode = 
	SAVE_GCODE_STATE NAME=load_state
	G91
	
	{% if params.TEMP is defined or printer.extruder.can_extrude|lower == 'false' %}
	M117 Heating...
	M109 S{params.TEMP|default(220, true)}
	{% endif %}
	M117 Loading filament...
	
	G92 E0.0
	G91
	G1 E70 F400
	G1 E40 F100
	G90
	G92 E0.0
	M400
	M117 Filament loaded!
	RESTORE_GCODE_STATE NAME=load_state

Lines 14 & 15

2 Likes

Thank you.

It is about 30cm long by default. Difficult to measure as the filament wraps in loops.

Where is your macro being stored? Mine is not printer.cfg but in klipper-prusa-mk3s/macros.cfg (read only) so I am not supposed to modify it?

How come G1 is executed twice consecutively at different lengths and speeds?
Is there any specific reason that it extrudes 70 mm and then 40 mm? That seems to be quite long.

Usually the amount of the amount of filament is measured at the input of the nozzle.

I’ve got that from your klippy.log.

I don’t know. I did not wrote it. I assume the first one is to move the filament to the nozzle and the second one to purge it.

1 Like

I modified the code in klipper-prusa-mk3s/macros.cfg for it to extruder shorter filament. However, this is only when the Load Filament button in mainsail is pressed.

As I recall, right from the beginning, when I inserted a filament into the extruder, it already automatically loaded the filament and extruded a long long filament. Where can I modify the code so that it would extrude shorter one?

I would look in your [filament_switch_sensor] section.

1 Like

In klipper-prusa-mk3s/mk3s/einsy-rambo-cfg, it has:

[filament_switch_sensor fsensor]
pause_on_runout: True
runout_gcode:
    M118 Filament Runout Detected
    M600
insert_gcode:
    M118 Filament Load Detected
    LOAD_FILAMENT
event_delay: 3.0
pause_delay: 0.01
switch_pin: !PK0

So I should modify LOAD_FILAMENT? It goes back to Lines 14 & 15 mentioned in the 2nd post which I have already changed. Where else can I change to shorten the length of extrusion during loading?

@EddyMI3D already gave you the answer → [gcode_macro LOAD_FILAMENT]

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.