-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrunout.cfg
33 lines (29 loc) · 1.33 KB
/
runout.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#####################################################################
# RefillPlease - Filament Runout Sensor
#####################################################################
[filament_switch_sensor runout]
switch_pin: !PG14 # Pin Stop_6 for Octopus mcu
pause_on_runout: false # False activates ability to use runout_gcode instead of just running PAUSE automatically
runout_gcode:
M600 # Code to run when runout is detected
insert_gcode:
{% if printer.print_stats.state|lower != "paused" and printer.print_stats.state|lower != "printing" %}
RESPOND MSG="RUNOUT: Filament inserted. Run LOAD_FILAMENT to prime nozzle."
{% else %}
RESPOND MSG="RUNOUT: Filament inserted. Filament load starting in 20 seconds."
UPDATE_DELAYED_GCODE ID=_RELOAD_RUNOUT DURATION=20
LED_PRINTING # Code to run when new filament is inserted
{% endif %}
[gcode_macro M600]
description: Helper: Called to pause when runout detected
gcode:
{% if printer.print_stats.state|lower == "printing" %} # only do this if it's actually printing
SAVE_GCODE_STATE NAME=STATE_M600
RESPOND TYPE=error MSG="RUNOUT: Filament runout!"
PAUSE
LED_FILAMENT_RUNOUT
RESTORE_GCODE_STATE NAME=STATE_M600
{% endif %}
[delayed_gcode _RELOAD_RUNOUT]
gcode:
LOAD_FILAMENT RUNOUT="true"