-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.cfg
533 lines (480 loc) · 21.5 KB
/
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
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
#####################################################################
# Macros
#####################################################################
######################### PRINT START / END #########################
[gcode_macro PRINT_START]
gcode:
# Extruder and bed temperatures
{% set bed_temp = params.BED_TEMPERATURE|default(100)|float %}
{% set nozzle_temp = params.NOZZLE_TEMPERATURE|default(180)|float %}
{% set CHAMBER_TEMP = params.CHAMBER_TEMP|default(0)|float %}
# Default material type to 'XXX'
{% set MATERIAL = params.MATERIAL|default("XXX")|string %}
#Get Bed type
{% set bed_type = params.BED|default("XXX")|string %}
#_SET_MPC_MATERIAL MATERIAL={params.MATERIAL}
#Start Bed Heater
lights_on
status_ready
BED_MESH_CLEAR
SET_GCODE_OFFSET Z=0
status_heating
M140 S{bed_temp}
#Set slow filter speed while bed is warming
{% if MATERIAL in ["ABS","ASA","ASA-CF","PC","PC+ABS"]%}
SET_FAN_SPEED FAN=BedFilter SPEED=0.2
{% endif %}
#Full Home
G28
#Wait till Bed is Heated
PARKBED
#Heating Extruder
M109 S150
#Part Cooling fan helps to heatchamber quicker
M106 S255
M190 S{bed_temp}
#Set higher filter speed once bed has warmed
{% if MATERIAL in ["ABS","ASA","ASA-CF","PC","PC+ABS"]%}
SET_FAN_SPEED FAN=BedFilter SPEED=0.6
{% endif %}
#Heat Soak if Needed
{% if CHAMBER_TEMP > 0 and not printer["heater_generic heater_chamber"].temperature >= CHAMBER_TEMP|float%} #wait for chamber temps
RESPOND MSG="Chamber Soak"
SET_CHAMBER CHAMBER_TEMP={CHAMBER_TEMP+1} #+1 °C for faster temp target arrival
TEMPERATURE_WAIT SENSOR="heater_generic heater_chamber" MINIMUM={CHAMBER_TEMP-0.1} #wait until chamber temp is very nearly reached
SET_CHAMBER CHAMBER_TEMP={CHAMBER_TEMP} #set correct chamber target and let PID do its magic
{% endif %}
#in case chamber was already heated
{% if CHAMBER_TEMP > 0 %}
SET_CHAMBER CHAMBER_TEMP={CHAMBER_TEMP}
{% endif %}
# {% if MATERIAL in ["ABS","ASA","ASA-CF"]%}
# RESPOND MSG="Chamber Soak"
# #M117 Material Type: {MATERIAL} Soak Required
# RESPOND MSG="Material type: '{MATERIALSOAK}' is used"
# TEMPERATURE_WAIT SENSOR="temperature_sensor Chamber_temp" MINIMUM=50
# TEMPERATURE_WAIT SENSOR="temperature_sensor Edge_temp" MINIMUM=75
# {% endif %}
# {% if MATERIAL in ["PC","PC+ABS"]%}
# RESPOND MSG="High Temp Chamber Soak"
# #M117 Material Type: {MATERIAL} Soak Required
# RESPOND MSG="Material type: '{MATERIALSOAK}' is used"
# TEMPERATURE_WAIT SENSOR="temperature_sensor Chamber_temp" MINIMUM=65
# TEMPERATURE_WAIT SENSOR="temperature_sensor Edge_temp" MINIMUM=75
# {% endif %}
M106 S0
#Gantry Level
status_cleaning
PARKREAR
NOZZLE_WIPE
status_homing
G28 Z METHOD=CONTACT CALIBRATE=1
status_leveling
QUAD_GANTRY_LEVEL
#BedFansOff
#Bed Mesh
status_meshing
BED_MESH_CALIBRATE ADAPTIVE=1
status_cleaning
PARKREAR
NOZZLE_WIPE
G28 Z METHOD=CONTACT CALIBRATE=0
#Adjust Z offset per bed type
RESPOND MSG="Bed type: '{bed_type}' is used"
{% if bed_type == "High Temp Plate" %}
SET_GCODE_OFFSET Z_ADJUST=0.14 MOVE=1
{% endif %}
{% if bed_type == "Textured PEI Plate" %}
SET_GCODE_OFFSET Z_ADJUST=0.08 MOVE=1
{% endif %}
{% if bed_type == "Cool Plate" %}
SET_GCODE_OFFSET Z_ADJUST=0.03 MOVE=1
{% endif %}
#BedFansSlow
status_heating
PARKREAR
#Purge Line and print
M109 S{nozzle_temp}
status_cleaning
NOZZLE_WIPE
status_printing
PARKBED
LINE_PURGE
SKEW_PROFILE LOAD=calilantern_skew_profile
#SET_FILAMENT_SENSOR SENSOR=roadrunner_motion ENABLE=1
#SET_FILAMENT_SENSOR SENSOR=roadrunner_switch ENABLE=1
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script - please customise for your slicer of choice
gcode:
# SET_FILAMENT_SENSOR SENSOR=roadrunner_motion ENABLE=0
# SET_FILAMENT_SENSOR SENSOR=roadrunner_switch ENABLE=0
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-15.0 F3600 ; retract filament
G91 ; relative positioning
G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing
TURN_OFF_HEATERS
M107 ; turn off fan
G1 Z30 F3000 ; move nozzle up 2mm
PARKREAR ; park nozzle at rear
SET_FAN_SPEED FAN=BedFilter SPEED=0
SET_GCODE_OFFSET Z=0 MOVE=1
BED_MESH_CLEAR
SET_SKEW CLEAR=1
status_off
#lights_off
# Disable filament sensor 1 sec after startup, only enable during prints (in PRINT_START/PRINT_END, and in PAUSE/RESUME)
# [delayed_gcode DISABLEFILAMENTSENSOR]
# initial_duration: 1
# gcode:
# SET_FILAMENT_SENSOR SENSOR=roadrunner_motion ENABLE=0
# SET_FILAMENT_SENSOR SENSOR=roadrunner_switch ENABLE=0
######################### PAUSE/RESUME/CANCEL #########################
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
CLEAR_PAUSE
SDCARD_RESET_FILE
PRINT_END
BASE_CANCEL_PRINT
{action_call_remote_method("notify",
name="my_telegram_notifier",
message="Print Cancelled")}
# Pause and park toolhead at front center. Z hop by 10mm.
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
# Parameters
{% set z = params.Z|default(10)|int %} ; z hop amount
{% if printer['pause_resume'].is_paused|int == 0 %}
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE={z} ; set z hop variable for reference in resume macro
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=etemp VALUE={printer['extruder'].target} ; set hotend temp variable for reference in resume macro
#SET_FILAMENT_SENSOR SENSOR=roadrunner_motion ENABLE=0
#SET_FILAMENT_SENSOR SENSOR=roadrunner_switch ENABLE=0 ; disable filament sensor
SAVE_GCODE_STATE NAME=PAUSE ; save current print position for resume
BASE_PAUSE ; pause print
{% if (printer.gcode_move.position.z + z) < printer.toolhead.axis_maximum.z %} ; check that zhop doesn't exceed z max
G91 ; relative positioning
G1 Z{z} F900 ; raise Z up by z hop amount
{% else %}
{ action_respond_info("Pause zhop exceeds maximum Z height.") } ; if z max is exceeded, show message and set zhop value for resume to 0
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE=0
{% endif %}
G90 ; absolute positioning
G1 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_minimum.y+5} F19500 ; park toolhead at front center
SAVE_GCODE_STATE NAME=PAUSEPARK ; save parked position in case toolhead is moved during the pause (otherwise the return zhop can error)
M104 S0
status_ready ; turn off hotend
SET_IDLE_TIMEOUT TIMEOUT=43200
{action_call_remote_method("notify",
name="my_telegram_notifier",
message="Print Paused")} ; set timeout to 12 hours
{% endif %}
# Return Z hop back down, prime nozzle, resume print.
[gcode_macro RESUME]
rename_existing: BASE_RESUME
variable_zhop: 0
variable_etemp: 0
gcode:
# Parameters
{% set e = params.E|default(2.5)|int %}
{% if printer['pause_resume'].is_paused|int == 1 %}
{action_call_remote_method("notify",
name="my_telegram_notifier",
message="Print Resumed")}
#SET_FILAMENT_SENSOR SENSOR=roadrunner_motion ENABLE=1
#SET_FILAMENT_SENSOR SENSOR=roadrunner_switch ENABLE=1 ; enable filament sensor ; reset LCD color
status_printing ; set logo LEDs back to white
SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout} ; set timeout back to configured value
{% if etemp > 0 %}
M109 S{etemp|int} ; wait for hotend to heat back up
{% endif %}
RESTORE_GCODE_STATE NAME=PAUSEPARK MOVE=1 MOVE_SPEED=100 ; go back to parked position in case toolhead was moved during pause (otherwise the return zhop can error)
G91 ; relative positioning
M83 ; relative extruder positioning
{% if printer[printer.toolhead.extruder].temperature >= printer.configfile.settings.extruder.min_extrude_temp %}
G1 Z{zhop * -1} E{e} F900 ; prime nozzle by E, lower Z back down
{% else %}
G1 Z{zhop * -1} F900 ; lower Z back down without priming (just in case we are testing the macro with cold hotend)
{% endif %}
RESTORE_GCODE_STATE NAME=PAUSE MOVE=1 MOVE_SPEED=100 ; restore position
BASE_RESUME ; resume print
{% endif %}
# Filament runout / change alias
[gcode_macro M600]
gcode:
SET_LOGO_LEDS_BY_NAME COLOR="GREEN" # Turn logo green
PAUSE
[gcode_macro lights_off]
gcode:
set_pin pin=caselight value=0
[gcode_macro lights_on]
gcode:
set_pin pin=caselight value=1
# Home, get position, throw around toolhead, home again.
# If MCU stepper positions (first line in GET_POSITION) are greater than a full step different (your number of microsteps), then skipping occured.
# We only measure to a full step to accomodate for endstop variance.
# Example: TEST_SPEED SPEED=300 ACCEL=5000 ITERATIONS=10
[gcode_macro TEST_SPEED]
gcode:
# Speed
{% set speed = params.SPEED|default(printer.configfile.settings.printer.max_velocity)|int %}
# Iterations
{% set iterations = params.ITERATIONS|default(5)|int %}
# Acceleration
{% set accel = params.ACCEL|default(printer.configfile.settings.printer.max_accel)|int %}
# Bounding inset for large pattern (helps prevent slamming the toolhead into the sides after small skips, and helps to account for machines with imperfectly set dimensions)
{% set bound = params.BOUND|default(20)|int %}
# Size for small pattern box
{% set smallpatternsize = SMALLPATTERNSIZE|default(20)|int %}
# Large pattern
# Max positions, inset by BOUND
{% set x_min = printer.toolhead.axis_minimum.x + bound %}
{% set x_max = printer.toolhead.axis_maximum.x - bound %}
{% set y_min = printer.toolhead.axis_minimum.y + bound %}
{% set y_max = printer.toolhead.axis_maximum.y - bound %}
# Small pattern at center
# Find X/Y center point
{% set x_center = (printer.toolhead.axis_minimum.x|float + printer.toolhead.axis_maximum.x|float ) / 2 %}
{% set y_center = (printer.toolhead.axis_minimum.y|float + printer.toolhead.axis_maximum.y|float ) / 2 %}
# Set small pattern box around center point
{% set x_center_min = x_center - (smallpatternsize/2) %}
{% set x_center_max = x_center + (smallpatternsize/2) %}
{% set y_center_min = y_center - (smallpatternsize/2) %}
{% set y_center_max = y_center + (smallpatternsize/2) %}
# Save current gcode state (absolute/relative, etc)
SAVE_GCODE_STATE NAME=TEST_SPEED
# Output parameters to g-code terminal
{ action_respond_info("TEST_SPEED: starting %d iterations at speed %d, accel %d" % (iterations, speed, accel)) }
# Home and get position for comparison later:
G28
# QGL if not already QGLd (only if QGL section exists in config)
{% if printer.configfile.settings.quad_gantry_level %}
{% if printer.quad_gantry_level.applied == False %}
QUAD_GANTRY_LEVEL
G28 Z
{% endif %}
{% endif %}
# Move 50mm away from max position and home again (to help with hall effect endstop accuracy - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/24)
G90
G1 X{printer.toolhead.axis_maximum.x-50} Y{printer.toolhead.axis_maximum.y-50} F{30*60}
G28 X Y
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}
G4 P1000
GET_POSITION
# Go to starting position
G0 X{x_min} Y{y_min} Z{bound + 10} F{speed*60}
# Set new limits
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel}
{% for i in range(iterations) %}
# Large pattern
# Diagonals
G0 X{x_min} Y{y_min} F{speed*60}
G0 X{x_max} Y{y_max} F{speed*60}
G0 X{x_min} Y{y_min} F{speed*60}
G0 X{x_max} Y{y_min} F{speed*60}
G0 X{x_min} Y{y_max} F{speed*60}
G0 X{x_max} Y{y_min} F{speed*60}
# Box
G0 X{x_min} Y{y_min} F{speed*60}
G0 X{x_min} Y{y_max} F{speed*60}
G0 X{x_max} Y{y_max} F{speed*60}
G0 X{x_max} Y{y_min} F{speed*60}
# Small pattern
# Small diagonals
G0 X{x_center_min} Y{y_center_min} F{speed*60}
G0 X{x_center_max} Y{y_center_max} F{speed*60}
G0 X{x_center_min} Y{y_center_min} F{speed*60}
G0 X{x_center_max} Y{y_center_min} F{speed*60}
G0 X{x_center_min} Y{y_center_max} F{speed*60}
G0 X{x_center_max} Y{y_center_min} F{speed*60}
# Small box
G0 X{x_center_min} Y{y_center_min} F{speed*60}
G0 X{x_center_min} Y{y_center_max} F{speed*60}
G0 X{x_center_max} Y{y_center_max} F{speed*60}
G0 X{x_center_max} Y{y_center_min} F{speed*60}
{% endfor %}
# Restore max speed/accel/accel_to_decel to their configured values
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel}
# Re-home and get position again for comparison:
G28 X Y
# Go to XY home positions (in case your homing override leaves it elsewhere)
G90
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}
G4 P1000
GET_POSITION
# Restore previous gcode state (absolute/relative, etc)
RESTORE_GCODE_STATE NAME=TEST_SPEED
# Disable filament sensor 1 sec after startup, only enable during prints (in PRINT_START/PRINT_END, and in PAUSE/RESUME)
#[delayed_gcode DISABLEFILAMENTSENSOR]
#initial_duration: 1
#gcode:
# SET_FILAMENT_SENSOR SENSOR=roadrunner_motion ENABLE=0
# SET_FILAMENT_SENSOR SENSOR=roadrunner_switch ENABLE=0
######################### FILAMENT #########################
[gcode_macro UNLOAD_FILAMENT]
gcode:
SAVE_GCODE_STATE NAME=UNLOADFILAMENT
M83 ; set extruder to relative
G1 E10 F600 ; extrude a little to soften tip
G1 E-120 F1800 ; retract filament completely
RESTORE_GCODE_STATE NAME=UNLOADFILAMENT
[gcode_macro LOAD_FILAMENT]
gcode:
SAVE_GCODE_STATE NAME=LOADFILAMENT
M83 ; set extruder to relative
G1 E200 F600
RESTORE_GCODE_STATE NAME=LOADFILAMENT
[gcode_macro HOT_UNLOAD]
gcode:
# Parameters
{% set t = params.T|default(255)|int %}
_CG28
M104 S{t}
PARKFRONT
M109 S{t}
UNLOAD_FILAMENT
M400
M109 S0
[gcode_macro HOT_LOAD]
gcode:
# Parameters
{% set t = params.T|default(255)|int %}
_CG28
M104 S{t}
PARKFRONT
M109 S{t}
LOAD_FILAMENT
M400
M109 S0
######################### CONDITIONALS #########################
# Conditional G28 (home if not already homed)
[gcode_macro _CG28]
gcode:
{% if "xyz" not in printer.toolhead.homed_axes %}
G28
{% endif %}
######################### PARKING #########################
# Park front center
[gcode_macro PARKFRONT]
gcode:
_CG28
SAVE_GCODE_STATE NAME=PARKFRONT
G90
G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_minimum.y+5} Z{printer.toolhead.axis_maximum.z/2} F19500
RESTORE_GCODE_STATE NAME=PARKFRONT
# Park front center, but low down
[gcode_macro PARKFRONTLOW]
gcode:
_CG28
SAVE_GCODE_STATE NAME=PARKFRONT
G90
G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_minimum.y+5} Z20 F19500
RESTORE_GCODE_STATE NAME=PARKFRONT
# Park top rear left
[gcode_macro PARKREAR]
gcode:
_CG28
SAVE_GCODE_STATE NAME=PARKREAR
G91
G0 Z10 F3000 #move nozzle up 10mm
G90
G0 X55 Y349 F19500
G0 Z20 F19500
RESTORE_GCODE_STATE NAME=PARKREAR
# Park center of build volume
[gcode_macro PARKCENTER]
gcode:
_CG28
SAVE_GCODE_STATE NAME=PARKCENTER
G90
G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_maximum.y/2} Z{printer.toolhead.axis_maximum.z/2} F19500
RESTORE_GCODE_STATE NAME=PARKCENTER
# Park 15mm above center of bed
[gcode_macro PARKBED]
gcode:
_CG28
SAVE_GCODE_STATE NAME=PARKBED
G90
G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_maximum.y/2} Z20 F19500
RESTORE_GCODE_STATE NAME=PARKBED
[gcode_macro NOZZLE_WIPE]
variable_start_x: 55
variable_start_y: 349
variable_start_z: 1
variable_wipe_dist: 20
variable_wipe_qty: 6
variable_wipe_spd: 200
variable_raise_distance: 20
gcode:
{% if "xyz" not in printer.toolhead.homed_axes %}
_CG28
{% endif %}
G90 ; absolute positioning
# Move to safe approach
PARKREAR
## Move nozzle to start position
G1 X{start_x} F6000
G1 Y{start_y} F6000
G1 Z{start_z} F1500
## Wipe nozzle
{% for wipes in range(1, (wipe_qty + 1)) %}
G1 X{start_x + wipe_dist} F{wipe_spd * 60}
G1 X{start_x} F{wipe_spd * 60}
{% endfor %}
## Raise nozzle
G1 Z{raise_distance}
######################### MPC #########################
#[gcode_macro M109] # Wait Hotend Temp
#rename_existing: M109.1
#gcode:
# #Parameters
# {% set s = params.S|float %}
#
# M104 {% for p in params %}{'%s%s' % (p, params[p])}{% endfor %} # Set hotend temp
# {% if s != 0 %}
# TEMPERATURE_WAIT SENSOR=extruder MINIMUM={s-2} MAXIMUM={s+5} # Wait for hotend temp (within n degrees)
# {% endif %}
#
#[gcode_macro _SET_MPC_MATERIAL]
#description: Set heater MPC parameters for a given material
#variable_filament_table:
# ## Update this table to adjust material settings
# {
# ## ( density, heat capacity ) # suggested heat capacity range
# "PLA" : ( 1.25, 2.20 ), # 1.80 - 2.20
# "PETG" : ( 1.27, 2.20 ), # 1.70 - 2.20
# "PC+ABS" : ( 1.15, 2.20 ), # 1.50 - 2.20
# "ABS" : ( 1.06, 2.40 ), # 1.25 - 2.40
# "ASA" : ( 1.07, 2.10 ), # 1.30 - 2.10
# "PA6" : ( 1.12, 2.50 ), # 2.00 - 2.50
# "PA" : ( 1.15, 2.50 ), # 2.00 - 2.50
# "PC" : ( 1.20, 1.90 ), # 1.10 - 1.90
# "TPU" : ( 1.21, 2.00 ), # 1.50 - 2.00
# "TPU-90A" : ( 1.15, 2.00 ), # 1.50 - 2.00
# "TPU-95A" : ( 1.22, 2.00 ), # 1.50 - 2.00
# "ABS-CF" : ( 1.11, 2.40 ), # 1.25 - 2.40
# "ASA-CF" : ( 1.11, 2.10 ), # 1.30 - 2.10
# "PA6-CF" : ( 1.19, 2.50 ), # 2.00 - 2.50
# "PC+ABS-CF" : ( 1.22, 2.20 ), # 1.50 - 2.20
# "PC+CF" : ( 1.36, 1.90 ), # 1.10 - 1.90
# "PLA-CF" : ( 1.29, 2.20 ), # 1.80 - 2.20
# "PETG-CF" : ( 1.30, 2.20 ), # 1.70 - 2.20
# }
#gcode:
# {% set material = params.MATERIAL | upper %}
# {% set heater = params.HEATER | default('extruder') %}
# {% set extruder_config = printer.configfile.settings[heater] %}
#
# {% if material in filament_table %}
# {% set (density, heat_capacity) = filament_table[material] %}
#
# RESPOND PREFIX=🔥 MSG="Configured {heater} MPC for {material}. Density: {density}, Heat Capacity: {heat_capacity}"
# {% else %}
# {% set density = extruder_config.filament_density %}
# {% set heat_capacity=extruder_config.filament_heat_capacity %}
#
# RESPOND PREFIX=🔥 MSG="Unknown material '{material}', using default mpc parameters for {heater}"
# {% endif %}
#
# MPC_SET HEATER={heater} FILAMENT_DENSITY={density} FILAMENT_HEAT_CAPACITY={heat_capacity}