-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwebui_macros300.cfg
251 lines (226 loc) · 7.25 KB
/
webui_macros300.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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
[virtual_sdcard]
path: /home/pi/gcode_files
[pause_resume]
[display_status]
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CANCEL_PRINT_BASE
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[firmware_retraction]
retract_length: 1.2
# The length of filament (in mm) to retract when G10 is activated,
# and to unretract when G11 is activated (but see
# unretract_extra_length below). The default is 0 mm.
retract_speed: 30
# The speed of retraction, in mm/s. The default is 20 mm/s.
#unretract_extra_length: 0
# The length (in mm) of *additional* filament to add when
# unretracting.
unretract_speed: 20
# The speed of unretraction, in mm/s. The default is 10 mm/s.
[gcode_macro PRINT_START8]
# Use PRINT_START for the slicer starting script - please customise for your slicer of choice
gcode:
SET_PIN PIN=ledblue VALUE=1
SET_PIN PIN=ledgreen VALUE=1
SET_PIN PIN=ledred VALUE=1
G1 X50 Y0 F2000 ; move to prime
G92 E0 ; reset extrusion distance
G1 Z0.6 F2000 ; get ready to prime
G1 X100 E4 F1000 ; Unretract and wipe
G1 X200 E30 F2000 ; prime nozzle
G1 X250 F3000 ; quick wipe
[gcode_macro PRINT_START6]
# Use PRINT_START for the slicer starting script - please customise for your slicer of choice
gcode:
SET_PIN PIN=ledblue VALUE=1
SET_PIN PIN=ledgreen VALUE=1
SET_PIN PIN=ledred VALUE=1
G1 X50 Y0 F2000 ; move to prime
G92 E0 ; reset extrusion distance
G1 Z0.4 F2000 ; get ready to prime
G1 X100 E6 F1000 ; Unretract and wipe
G1 X200 E20 F2000 ; prime nozzle
G1 X250 F3000 ; quick wipe
[gcode_macro PRINT_START4]
# Use PRINT_START for the slicer starting script - please customise for your slicer of choice
gcode:
SET_PIN PIN=ledblue VALUE=1
SET_PIN PIN=ledgreen VALUE=1
SET_PIN PIN=ledred VALUE=1
G1 X50 Y0 F4000 ; move to prime
G92 E0 ; reset extrusion distance
G1 Z0.3 F2000 ; get ready to prime
G1 X100 E4 F1000 ; Unretract and wipe
G1 X200 E16 F2000 ; prime nozzle
G1 X250 F3000 ; quick wipe
[gcode_macro PRINT_START2]
# Use PRINT_START for the slicer starting script - please customise for your slicer of choice
gcode:
SET_PIN PIN=ledblue VALUE=1
SET_PIN PIN=ledgreen VALUE=1
SET_PIN PIN=ledred VALUE=1
G1 X50 Y0 F4000 ; move to prime
G92 E0 ; reset extrusion distance
G1 Z0.16 F2000 ; get ready to prime
G1 X100 E2 F1000 ; Unretract and wipe
G1 X200 E4 F2000 ; prime nozzle
G1 X250 F3000 ; quick wipe
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script - please customise for your slicer of choice
gcode:
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-4.0 F3600 ; retract filament
G91 ; relative positioning
G0 Z1.00 X2.0 Y2.0 F20000 ; move nozzle to remove stringing
TURN_OFF_HEATERS
M107 ; turn off fan
G1 Z20 F3000 ; move nozzle up 2mm
G90 ; absolute positioning
G0 X150 Y270 F3600 ; park nozzle at center
SET_PIN PIN=ledblue VALUE=1
SET_PIN PIN=ledgreen VALUE=1
SET_PIN PIN=ledred VALUE=1
## Thermistor Types
## "EPCOS 100K B57560G104F"
## "ATC Semitec 104GT-2"
## "NTC 100K beta 3950"
## "Honeywell 100K 135-104LAG-J01"
## "NTC 100K MGB18-104F39050L32" (Keenovo Heater Pad)
## "AD595"
## "PT100 INA826"
[gcode_macro UNLOAD_FILAMENT]
gcode:
M83
G1 E10 F300
G1 E-100 F1800
M82
[gcode_macro LOAD_FILAMENT]
gcode:
M83
G1 E70 F1800
G1 E30 F300
G1 E15 F150
G1 E-3
M82
[idle_timeout]
gcode:
SET_PIN PIN=ledblue VALUE=0
SET_PIN PIN=ledgreen VALUE=0
SET_PIN PIN=ledred VALUE=0
M84
TURN_OFF_HEATERS
timeout: 1800
[gcode_macro LIGHTS_OFF]
gcode:
SET_PIN PIN=ledblue VALUE=0.0
SET_PIN PIN=ledgreen VALUE=0.0
SET_PIN PIN=ledred VALUE=0.0
[gcode_macro LIGHTS_ON]
gcode:
SET_PIN PIN=ledblue VALUE=1.0
SET_PIN PIN=ledgreen VALUE=1.0
SET_PIN PIN=ledred VALUE=1.0
[gcode_macro TIMELAPSE_TAKE_FRAME]
gcode:
{action_call_remote_method("timelapse_newframe")}
[gcode_macro TIMELAPSE_RENDER]
gcode:
{action_call_remote_method("timelapse_render")}
[gcode_macro G32]
gcode:
BED_MESH_CLEAR
G28
QUAD_GANTRY_LEVEL
G28
G0 X150 Y150 Z20 F18000
[gcode_macro PAUSE1]
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-{E} F2100
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
G1 X{x_park} Y{y_park} F6000
SET_IDLE_TIMEOUT TIMEOUT=90000
M140 S50
M107
M104 T0 S0
#TURN_OFF_HEATERS