-
Notifications
You must be signed in to change notification settings - Fork 5
/
ercf_macros.cfg
206 lines (168 loc) · 6.05 KB
/
ercf_macros.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# Some gcode macro stuff
[gcode_macro T0]
gcode:
_ERCF_CHANGE_TOOL TOOL=0
[gcode_macro T1]
gcode:
_ERCF_CHANGE_TOOL TOOL=1
[gcode_macro T2]
gcode:
_ERCF_CHANGE_TOOL TOOL=2
[gcode_macro T3]
gcode:
_ERCF_CHANGE_TOOL TOOL=3
[gcode_macro T4]
gcode:
_ERCF_CHANGE_TOOL TOOL=4
[gcode_macro T5]
gcode:
_ERCF_CHANGE_TOOL TOOL=5
[gcode_macro T6]
gcode:
_ERCF_CHANGE_TOOL TOOL=6
[gcode_macro T7]
gcode:
_ERCF_CHANGE_TOOL TOOL=7
[gcode_macro T8]
gcode:
_ERCF_CHANGE_TOOL TOOL=8
[gcode_macro ERCF_SERVO_UP]
gcode:
_ERCF_SERVO_UP
[gcode_macro ERCF_SERVO_DOWN]
gcode:
_ERCF_SERVO_DOWN
[gcode_macro ERCF_LOAD]
gcode:
_ERCF_LOAD
[gcode_macro ERCF_UNLOAD]
gcode:
_ERCF_UNLOAD
[gcode_macro ERCF_HOME_SELECTOR]
gcode:
_ERCF_HOME_SELECTOR
[gcode_macro ERCF_CHANGE_TOOL]
gcode:
{% set TOOL = params.TOOL|float %}
_ERCF_CHANGE_TOOL TOOL={TOOL}
[gcode_macro ERCF_PAUSE]
gcode:
PAUSE
# Display related gcode
[display_glyph carrot]
data:
................
............***.
...........*..**
........**.*.*.*
.......*..*.*..*
......*.*..*.**.
.....*...*..*...
....*........*..
...*.........*..
...*..*.....*...
..*....*...*....
..*..*..*.*.....
.*....*.**......
.*....**........
..****..........
................
[display_template _ercf_current_tool]
text:
{% if "ercf" in printer %}
~carrot~
{% if printer["ercf"].current_tool == None %}
{ " T?" }
{% else %}
{ " T{}".format(printer["ercf"].current_tool) }
{% endif %}
{% endif %}
# Uncomment following code block to replace the speed_factor with the current ERCF tool display.
# [display_data _default_16x4 speed_factor]
# position: 1,10
# text: { render("_ercf_current_tool") }
# StandAlone cooling moves to extract proper filament tip
[gcode_macro _ERCF_FORM_TIP_STANDALONE]
description: Generic tip forming macro
gcode:
{% set COOLING_TUBE_LENGTH = params.COOLING_TUBE_LENGTH|default(15) %} # Dragon ST: 15, Dragon HF: 10, Mosquito: 20
{% set COOLING_TUBE_RETRACTION = params.COOLING_TUBE_RETRACTION|default(35) %} # Dragon ST: 35, Dragon HF: 30, Mosquito: 38
{% set INITIAL_COOLING_SPEED = params.INITIAL_COOLING_SPEED|default(10) %}
{% set FINAL_COOLING_SPEED = params.FINAL_COOLING_SPEED|default(50) %}
{% set COOLING_MOVES = params.COOLING_MOVES|default(5) %}
{% set TOOLCHANGE_TEMP = params.TOOLCHANGE_TEMP|default(0) %}
{% set USE_SKINNYDIP = params.USE_SKINNYDIP|default(0) %}
{% set USE_FAST_SKINNYDIP = params.USE_FAST_SKINNYDIP|default(1) %}
{% set SKINNYDIP_DISTANCE = params.SKINNYDIP_DISTANCE|default(26) %}
{% set DIP_INSERTION_SPEED = params.DIP_INSERTION_SPEED|default(33) %}
{% set DIP_EXTRACTION_SPEED = params.DIP_EXTRACTION_SPEED|default(70) %}
{% set MELT_ZONE_PAUSE = params.MELT_ZONE_PAUSE|default(0) %}
{% set COOLING_ZONE_PAUSE = params.COOLING_ZONE_PAUSE|default(0) %}
{% set UNLOADING_SPEED_START = params.UNLOADING_SPEED_START|default(199) %}
{% set UNLOADING_SPEED = params.UNLOADING_SPEED|default(20) %}
{% set RAMMING_VOLUME = params.RAMMING_VOLUME|default(0) %} # in mm3
{% set INITIAL_RETRACT = params.INITIAL_RETRACT|default(0) %} # Use an initial retract or not. Don't use it if you want to ram the filament
{% set FINAL_EJECT = params.FINAL_EJECT|default(0) %} # Fully eject the filament afterwards, default is no
G91
G92 E0
SET_PRESSURE_ADVANCE ADVANCE=0
{% set OLD_TEMP = printer.extruder.target %}
# Ramming with SuperSlicer standard setting
{% if INITIAL_RETRACT|int == 1 %}
G1 E-8.5000 F3000
{% endif %}
{% set RATIO = (RAMMING_VOLUME|float) /23.0 %}
G1 E{0.5784 * RATIO|float} F299 #7
G1 E{0.5834 * RATIO|float} F302 #3
G1 E{0.5918 * RATIO|float} F306 #6
G1 E{0.6169 * RATIO|float} F319 #6
G1 E{0.3393 * RATIO|float} F350 #0
G1 E{0.3363 * RATIO|float} F350 #0
G1 E{0.7577 * RATIO|float} F392 #6
G1 E{0.8382 * RATIO|float} F434 #3
G1 E{0.7776 * RATIO|float} F469 #9
G1 E{0.1293 * RATIO|float} F469 #9
G1 E{0.9673 * RATIO|float} F501 #2
G1 E{1.0176 * RATIO|float} F527 #2
G1 E{0.5956 * RATIO|float} F544 #6
G1 E{0.4555 * RATIO|float} F544 #6
G1 E{1.0662 * RATIO|float} F552 #4
# set toolchange temperature just prior to filament being extracted from melt zone and wait for set point
# (SKINNYDIP--normal mode only)
{% if TOOLCHANGE_TEMP|float > 0 and USE_FAST_SKINNYDIP|int == 0 %}
M109 S{TOOLCHANGE_TEMP}
{% endif %}
# Retraction
{% set TOTAL_RETRACTION_DISTANCE = COOLING_TUBE_RETRACTION|float + COOLING_TUBE_LENGTH|float / 2 - 15 %}
G1 E-15 F{1.0 * UNLOADING_SPEED_START|float * 60}
G1 E-{0.7 * TOTAL_RETRACTION_DISTANCE} F{1.0 * UNLOADING_SPEED|float * 60}
G1 E-{0.2 * TOTAL_RETRACTION_DISTANCE} F{0.5 * UNLOADING_SPEED|float * 60}
G1 E-{0.1 * TOTAL_RETRACTION_DISTANCE} F{0.3 * UNLOADING_SPEED|float * 60}
{% if TOOLCHANGE_TEMP|float > 0 and USE_FAST_SKINNYDIP|int == 1 %}
M104 S{TOOLCHANGE_TEMP}
{% endif %}
# Generate Cooling Moves
{% set SPEED_INC = (FINAL_COOLING_SPEED|float - INITIAL_COOLING_SPEED|float) / (2 * COOLING_MOVES|float - 1) %}
{% for move in range(COOLING_MOVES|int) %}
G1 E{COOLING_TUBE_LENGTH} F{(INITIAL_COOLING_SPEED|float + SPEED_INC*move*2) * 60}
G1 E-{COOLING_TUBE_LENGTH} F{(INITIAL_COOLING_SPEED|float + SPEED_INC*(move*2+1)) * 60}
{% endfor %}
# wait for extruder to reach toolchange temperature after cooling moves complete (SKINNYDIP--fast mode only)
{% if TOOLCHANGE_TEMP|float > 0 and USE_FAST_SKINNYDIP|int == 1 %}
M109 S{TOOLCHANGE_TEMP}
{% endif %}
# Generate a skinnydip move
{% if USE_SKINNYDIP|int == 1 %}
G1 E{SKINNYDIP_DISTANCE} F{DIP_INSERTION_SPEED|float * 60}
G4 P{MELT_ZONE_PAUSE}
G1 E-{SKINNYDIP_DISTANCE} F{DIP_EXTRACTION_SPEED|float * 60}
G4 P{COOLING_ZONE_PAUSE}
{% endif %}
{% if TOOLCHANGE_TEMP|float > 0 %}
M104 S{OLD_TEMP}
{% endif %}
{% if FINAL_EJECT|int == 1 %}
G92 E0
G1 E-80 F3000
{% endif %}
G92 E0