You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tweaked it a little bit to fit this mod and added it to my custom_macros.cfg
Remember to delete/comment out the existing _FILAMENT_RUNOUT_EVENT in macros.cfg
[gcode_macro _FILAMENT_RUNOUT_DELAY]
description: Trigger to pause the print after a further 'd' mm has been extruded
variable_end_d: 0 #create variable "END_D" which is associated with the _FILAMENT_RUNOUT_DELAY gcode macro
gcode:
{% set d_start = printer.print_stats.filament_used|float %} #starting point is whatever the filament used is when _FILAMENT_RUNOUT_DELAY is called
{% set d_end = (d_start + params.D|float)|float %} #end point is start + D parameter
SET_GCODE_VARIABLE MACRO=_FILAMENT_RUNOUT_DELAY VARIABLE=end_d VALUE={d_end} #write the end value to the END_D gcode variable to access later
UPDATE_DELAYED_GCODE ID=_FILAMENT_RUNOUT_EVENT DURATION=1 #trigger the delayed gcode below after 1 second
[delayed_gcode _FILAMENT_RUNOUT_EVENT]
initial_duration: 0 #if initial_duration is zero, the delayed gcode won't start by default
gcode:
{% set d_current = printer.print_stats.filament_used|float %} #get the current filament used
{% if d_current < printer["gcode_macro _FILAMENT_RUNOUT_DELAY"].end_d %} #if we aren't at the stopping point
UPDATE_DELAYED_GCODE ID=_FILAMENT_RUNOUT_EVENT DURATION=1 #restart the timer on the delayed gcode
{% else %}
PAUSE X=0 Y=0 Z_MIN=50
UPDATE_DELAYED_GCODE ID=_FILAMENT_RUNOUT_EVENT DURATION=0 #set the delayed gcode duration back to zero so it doesn't keep triggering
RESPOND TYPE=command MSG="action:prompt_begin Filament runout detected"
RESPOND TYPE=command MSG="action:prompt_text The filament sensor has detected filament runout. Please load filament and press resume."
RESPOND TYPE=command MSG="action:prompt_button_group_start"
RESPOND TYPE=command MSG="action:prompt_button Load|LOAD_FILAMENT|primary"
RESPOND TYPE=command MSG="action:prompt_button Unload|UNLOAD_FILAMENT|primary"
RESPOND TYPE=command MSG="action:prompt_button Purge|PURGE_FILAMENT|primary"
RESPOND TYPE=command MSG="action:prompt_button_group_end"
RESPOND TYPE=command MSG="action:prompt_footer_button Resume|_INTERACTIVE_LOAD_END"
RESPOND TYPE=command MSG="action:prompt_show"
{% endif %}
[filament_switch_sensor runout_sensor]
runout_gcode:
_FILAMENT_RUNOUT_DELAY D=470
A value of 470 works fine for me, maybe you need to tweak the D value on your printer.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The filament runout macro pauses the print immediately and there is about 50cm of filament that has to be wasted. I searched for some bit and found this: https://klipper.discourse.group/t/feature-request-filament-runout-trigger-pause-after-700mm-extruded-distance-delay/5586
I tweaked it a little bit to fit this mod and added it to my custom_macros.cfg
Remember to delete/comment out the existing
_FILAMENT_RUNOUT_EVENT
inmacros.cfg
A value of 470 works fine for me, maybe you need to tweak the D value on your printer.
Beta Was this translation helpful? Give feedback.
All reactions