-
Notifications
You must be signed in to change notification settings - Fork 62
/
ercf_software.cfg
163 lines (136 loc) · 5.66 KB
/
ercf_software.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
[save_variables]
filename: /home/pi/klipper_config/ercf_vars.cfg
############################################
# Changing tool macros
# if the new extruder is different from the current extruder :
# eject the filament if needed
# load the new one
###########################################
[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
############################################
# Loading/Unloading part FROM/TO EXTRUDER TO/FROM NOZZLE
############################################
# 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
G90
###############################################
# Endless spool mode and clog detection
###############################################
[gcode_macro _ERCF_ENDLESS_SPOOL_PRE_UNLOAD]
description: Pre unload routine for EndlessSpool changes - modify for your setup
gcode:
# BRUSH_CLEAN
[gcode_macro _ERCF_ENDLESS_SPOOL_POST_LOAD]
description: Post load routine for EndlessSpool changes - modify for your setup
gcode:
# BRUSH_PURGE LENGTH=50
# BRUSH_CLEAN