forked from zellneralex/klipper_config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runout.cfg
94 lines (89 loc) · 3.9 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#[filament_switch_sensor runout]
## When set to True, a PAUSE will execute immediately after a runout
## is detected. Note that if pause_on_runout is False and the
## runout_gcode is omitted then runout detection is disabled. Default
## is True.
#pause_on_runout: FALSE
#runout_gcode:
# {action_respond_info("RUNOUT: Filament runout")}
# PAUSE
#insert_gcode: {action_respond_info("RUNOUT: Filament inserted")}
## The minimum amount of time in seconds to delay between events.
## Events triggered during this time period will be silently
## ignored. The default is 3 seconds.
##event_delay: 3.0
## The amount of time to delay, in seconds, between the pause command
## dispatch and execution of the runout_gcode. It may be useful to
## increase this delay if OctoPrint exhibits strange pause behavior.
## Default is 0.5 seconds.
##pause_delay: 0.5
## XYE mcu E0DET
#switch_pin: ^!P1.26
[filament_motion_sensor runout]
# The minimum length of filament pulled through the sensor to trigger
# a state change on the switch_pin
# Default is 7 mm.
detection_length: 14.0
extruder: extruder
pause_on_runout: FALSE
runout_gcode:
{action_respond_info("RUNOUT: Filament runout")}
PAUSE
insert_gcode: {action_respond_info("RUNOUT: Filament inserted")}
# The minimum amount of time in seconds to delay between events.
# Events triggered during this time period will be silently
# ignored. The default is 3 seconds.
#event_delay: 3.0
# The amount of time to delay, in seconds, between the pause command
# dispatch and execution of the runout_gcode. It may be useful to
# increase this delay if OctoPrint exhibits strange pause behavior.
# Default is 0.5 seconds.
#pause_delay: 0.5
## XYE mcu E0DET
switch_pin: ^!P1.26
[filament_switch_sensor toolhead_runout]
## When set to True, a PAUSE will execute immediately after a runout
## is detected. Note that if pause_on_runout is False and the
## runout_gcode is omitted then runout detection is disabled. Default
## is True.
pause_on_runout: FALSE
runout_gcode: {action_respond_info("RUNOUT: Toolhead Filament runout")}
# PAUSE
insert_gcode: {action_respond_info("RUNOUT: Toolhead Filament inserted")}
## The minimum amount of time in seconds to delay between events.
## Events triggered during this time period will be silently
## ignored. The default is 3 seconds.
##event_delay: 3.0
## The amount of time to delay, in seconds, between the pause command
## dispatch and execution of the runout_gcode. It may be useful to
## increase this delay if OctoPrint exhibits strange pause behavior.
## Default is 0.5 seconds.
##pause_delay: 0.5
## XYE mcu E1DET
switch_pin: ^!P1.25
#####################################################################
# Macro
#####################################################################
[gcode_macro SET_FILAMENT_SENSOR]
description: Sets the filament sensor on/off and save value to file
rename_existing: SET_FILAMENT_SENSOR_BASE
gcode:
{% if printer.save_variables.variables.filament_sensor is not defined %}
{% set filament_sensor = {params.SENSOR|string: params.ENABLE|int} %}
{% else %}
{% set filament_sensor = printer.save_variables.variables.filament_sensor %}
{% set _dummy = filament_sensor.update({params.SENSOR|string: params.ENABLE|int}) %}
{% endif %}
SET_FILAMENT_SENSOR_BASE SENSOR={params.SENSOR} ENABLE={params.ENABLE}
SAVE_VARIABLE VARIABLE=filament_sensor VALUE="{filament_sensor}"
[gcode_macro _RESTORE_FILAMENT_SENSOR]
description: Restore the filament sensor on/off state at klipper start
gcode:
{% if printer.save_variables.variables.filament_sensor is defined %}
{% for sensor in printer.save_variables.variables.filament_sensor %}
SET_FILAMENT_SENSOR_BASE SENSOR={sensor} ENABLE={printer.save_variables.variables.filament_sensor[sensor]}
{% endfor %}
{% endif %}
[gcode_macro M600]
description: Filament change
gcode: PAUSE Y=10 ; everything needed is defined there