-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfilament_sensor.cfg
129 lines (101 loc) · 3.09 KB
/
filament_sensor.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[extruder_stepper pusher]
extruder: extruder
step_pin: AXE_E2_STEP
dir_pin: AXE_E2_DIR
enable_pin: !AXE_E2_EN
microsteps: 16
# SAVE_CONFIG
#rotation_distance: 24 # bmg mini
[filament_switch_sensor filament_runout]
switch_pin: ^AXE_X_MAX
pause_on_runout: False
runout_gcode:
DEBUG_PRINT_STATE
{% if printer.print_stats.state|lower == "printing" and printer.pause_resume.is_paused == False %}
RESPOND PREFIX=tgalarm MSG="Filament runout"
PAUSE
{% else %}
RESPOND PREFIX=tgnotify MSG="Filament removed"
{% endif %}
insert_gcode:
RESPOND PREFIX=tgnotify MSG="Filament inserted"
[gcode_macro DEBUG_PRINT_STATE]
gcode:
{action_respond_info("printer.print_stats.state: %s" % printer.print_stats.state)}
{action_respond_info("printer.pause_resume.is_paused: %s" % printer.pause_resume.is_paused)}
[gcode_macro FILAMENT_UNLOAD]
gcode:
{% set extrude_factor = printer.gcode_move.extrude_factor %}
M221 S100
# ramming
G1 E-4 F2000 # ?
G1 E1.0 F1000 #1
G1 E1.0 F1500 #2
G1 E2.0 F2000 #4
G1 E1.5 F3000 #5.5
G1 E2.5 F4000 #8
G1 E-15.0 F5000 #-15
G1 E-14.0 F1200 #-29
G1 E-6.0 F600 #-35
G1 E10.0 F700 #
G1 E-10.0 F400 #
G1 E-20.0 F2000 #-75
M221 S{extrude_factor * 100}
[gcode_macro UNLOAD_FILAMENT]
gcode:
FILAMENT_UNLOAD
[gcode_macro FILAMENT_LOAD]
gcode:
{% set extra_load = params.EXTRA_LOAD|default(0)|float %}
{% set extrude_factor = printer.gcode_move.extrude_factor %}
M221 S100
G1 E20 F1500 #20
G1 E15 F800 #35
G1 E{20 + extra_load} F180 #55
{% set e = printer["gcode_macro PAUSE"].extrude|float %}
G1 E-{e} F2100
M221 S{extrude_factor * 100}
[gcode_macro LOAD_FILAMENT]
gcode:
FILAMENT_LOAD
[gcode_macro EXTRUDER_DISABLE]
gcode:
SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
[gcode_macro EXTRUDER_ENABLE]
gcode:
SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder
[gcode_macro FILAMENT_PUSHER_LOAD_ONLY]
gcode:
{% set extrude_factor = printer.gcode_move.extrude_factor %}
M221 S100
SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
{% set extra_push = params.EXTRA_PUSH|default(0)|float %}
G1 E{850 + extra_push} F3000
SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder
M221 S{extrude_factor * 100}
[gcode_macro FILAMENT_PUSHER_LOAD]
gcode:
{% set extra_push = params.EXTRA_PUSH|default(0)|float %}
{% set extra_load = params.EXTRA_LOAD|default(0)|float %}
FILAMENT_PUSHER_LOAD_ONLY EXTRA_PUSH={extra_push}
G1 E20 F120
FILAMENT_LOAD EXTRA_LOAD={extra_load}
[gcode_macro FILAMENT_PUSHER_UNLOAD_ONLY]
gcode:
{% set extrude_factor = printer.gcode_move.extrude_factor %}
M221 S100
SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=
G1 E-950 F3000
SYNC_EXTRUDER_MOTION EXTRUDER=extruder MOTION_QUEUE=extruder
M221 S{extrude_factor * 100}
[gcode_macro FILAMENT_PUSHER_UNLOAD]
gcode:
FILAMENT_UNLOAD
FILAMENT_PUSHER_UNLOAD_ONLY
[gcode_macro PUSHER_ACTIVATE]
gcode:
SYNC_EXTRUDER_MOTION EXTRUDER=pusher MOTION_QUEUE=extruder
[gcode_macro PUSHER_DEACTIVATE]
gcode:
SYNC_EXTRUDER_MOTION EXTRUDER=pusher MOTION_QUEUE=
SET_STEPPER_ENABLE STEPPER="extruder_stepper pusher" ENABLE=0