forked from danorder/Flsun-super-racer-Full-klipper-config-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprinter.cfg
537 lines (511 loc) · 24.8 KB
/
printer.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
534
535
536
537
# This file contains common pin mappings for MKS Robin Nano V3
# boards. To use this config, the firmware should be compiled for the
# stm32f407. When running "make menuconfig", select the 48KiB
# bootloader, and enable "USB for communication".
# The "make flash" command does not work on the MKS Robin. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "Robin_nano_v3.bin" on an SD card and then restart the
# MKS Robin with that SD card.
# NOTES ON THE SKR 1.3 VARIENT. CHANGE THE TMC PINS TO THE KLIPPER REFERENCE CONFIG. ADDITIONALLY REMOVE THE MCU THERMAL SENSOR THE SKR DOESN'T SUPPORT THIS.
# at some point a 2nd config will be made for the 1.3.
#########################################################################
#!!!!!!!!!!!!!!!!! DELETE SAVE CONFIG AT THE VERY BOTTOM !!!!!!!!!!!!!!!#
#########################################################################
#https://github.com/fluidd-core/FluiddPI GO HERE FOR WEB UI. YOU CAN USE OCTOPRINT IT HOWEVER IS NOT RECOMMEND BUT DOES WORK IT MAY INDUCE LAG ISSUES.
#https://www.klipper3d.org/FAQ.html
#https://www.klipper3d.org/Slicers.html
#https://www.klipper3d.org/Installation.html VIEW ME FIRST TO GENERATE THE CURRENT KLIPPER FIRMWARE.BIN MAKE SURE TO RENAME IT. INSTALL WINSCP IF YOU NEED TO TRANSFER FILE TO PC VIA SSH
#https://winscp.net/eng/docs/introduction REMOTE FILE VIEWER / DOWNLOADER helpful for periodic required firmare flahes after certain klipper updates. !! ALWAYS READ THE POSTED CHANGES BEFORE UPDATING!!
#https://www.klipper3d.org/G-Codes.html?h=firmware+retract#firmware-retraction
#https://www.klipper3d.org/G-Codes.html COMPATIBLE DEFAULT GCODES.
#KLIPPER COMMANDS: ENDSTOP_PHASE_CALIBRATE stepper=stepper_(LETTER) REMOVE BRACKETS. PROBE_CALIBRATE DELTA_CALIBRATE (DO THIS AT PRINTING TEMP) SET FANS 40 PERCENT THEN PID_CALIBRATE HEATER=extruder TARGET=245
# SAVE_CONFG , PID_CALIBRATE HEATER=heater_bed TARGET=80, SAVE_CONFIG. your done. adjust slicer / retract accordingly.
# OR RUN THE CALIBRATE MACRO MAKE SURE THE PROBE IS ON FOR ALL BED RELATED CALIBRATION INCLUDING Z OFFSET. NOTE FOR THE PAPER METHOD USE THE DEFAULTS IN KLIIPPER DOCS FOR #DELTA CALIBRATE / KINEMATICS REGARDING IT.
# If the calibrate macro is used. run probe_calibrate first (aka zoffset) then run the macro. calibrate may need to be run 2x.
# Initially its safer to set the zoffset in fluidd/mainsaill a bit higher eg .2mmm or so then lower to 0 while printing a flat square or circle. This is a good safety measure to avoid a slight collison.
############################################################################################################################################################
##MACHINE ABSOLUTE LIMITS / MOTION CONTROL / CONNECTED MCUS#/ ADD A # TO DISABLE MCU IF YOU DON'T HAVE ADXL OR PACKAGES INSTALLED
############################################################################################################################################################
[printer]
kinematics: delta
max_velocity: 300
max_accel: 3000 #3000-9000-20000 after tuning with adxl / inputshaper stay to lower values otherwise starting out. eg 6000 note marlin default is 2800 this may work better on some printers or filament types
max_accel_to_decel:999999 #I AM HALF MAX SET ACC BY DEFAULT. I CONTROL ZIG ZAG MOVEMENTS AND ADJUST VELOCITY BASED ON DIMENSIONS AND SMOOTH THINGS OUT. SET TO MAX WOULD BE SIMILAR TO MARLIN BEHAVIOR ADXL WIL COVER ROUGH MOVEMENTS. INCREASING MAX ACC IS USUALLY THE BETTER SOLUTION.
max_z_accel: 3000 # this default should be fine / max acceration for z moves. (It may help to bump this up or down a bit depending on desired noise / zhop height.
minimum_z_position: -25 #Once you find your z offset it is suggested to return this to 0 to avoid potentially crashing a nozzle for whatever reason. z offset shouldn't change unless the hotend has been adjusted. most things are flow related.
square_corner_velocity: 5 # This can depend on desired speed to quality. higher values 15 -20 generally work fine. Left as a safe default. acc / corner velcoity can be adjusted with slicer controls macros handle this. i use a default of 15-30 or dynamic values.
delta_radius: 130 #151.62 ish should show up after delta caibrate in the save section.
print_radius: 130 #
[firmware_retraction] # make sure to enable this in slicer. cura printer settings addon is required to hit the check box. every other slicer should have it in settings tab. this allows live adjustments or ability to fix a mistake without canceling.
retract_length: 6.5
retract_speed: 40
unretract_extra_length: 0
unretract_speed: 40
[idle_timeout]
#gcode:
timeout: 300 #TIME BEFORE PRINTER TURNS OFF HEATERS AND STEPPERS MAX IDLE TIME 5MINS
############################################################################################################################################################
#MAINBOARD / ACCELEROMETER SECTION.
############################################################################################################################################################
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_260044001651303239383037-if00 # Run ls /dev/serial/by-id/* on your Raspberry Pi to get YOUR serial or it wont connect
#[mcu rpi] #https://www.klipper3d.org/Measuring_Resonances.html GO HERE TO INSTALL ACCELEROMETERS DO NOT TRUST THE PICTURE FOR WIRING THE GPIO LABEL ISN'T IN THE RIGHT SPOT.
#serial: /tmp/klipper_host_mcu
#[adxl345] #TURN ME OFN BY REMOVING THE #. IF YOU HAVE ONE. EXAMPLE [ADXL345] IS NOW ON REMOVE# TO ENABLE OR ADD # TO ENABLE FEATURES. DO NOT CONFUSE THIS WITH MARLIN.
#cs_pin: rpi:None
#[resonance_tester] # ENABLE THIS IF YOU HAVE ADXL ACCELEROMETER . USE MANUAL METHOD IF YOU DONT INSTEAD. https://www.klipper3d.org/Resonance_Compensation.html
#accel_chip: adxl345
#max_smoothing: 0.20 # an example
#min_freq: 5
#max_freq: 120
#accel_per_hz: 25
#probe_points:
#0,0,5
#[input_shaper] #PLACE HOLDER VALUES
#shaper_type_x = zv
#shaper_freq_x = 0
#shaper_type_y = zv
#shaper_freq_y = 0
############################################################################################################################################################
# A (X-Stepper) Configuration ENABLE ARM LENGTH , ANGLE , POSITION ENDSTOP. FOR THE FIRST TIME EVER. DELTA CALIBRATE WILL ADJUST THIS AND SAVE AT THE BOTTOM.
############################################################################################################################################################
[stepper_a] # X
step_pin: PE3
dir_pin: PE2
enable_pin: !PE4
microsteps: 128 # TMC ARE MENT TO BE SET TO THE HIGHEST VALUE THE MCU CAN SUPPORT THIS DOES NOT WORK THE SAME AS OLDER DRIVERS. DON'T TOUCH ROTATION DISTANCE JUST THIS IF YOU WANT TO CHANGE IT (KLIPPER WILL CALCULATE STEPPING AUTOMATICALLY)
rotation_distance: 40 #NEVER ADJUST THESE VALUES. ADJUSTING THIS WILL NOT SOLVE DIMENSION ISSUES. HORIZONTAL OFFSET / FLOW. OTHERWISE BELTS, OR RAILS MAY NOT BE MOVING RIGHT FOR THIS TO HAPPEN.
full_steps_per_rotation: 200 #CHANGE THIS TO 400 FOR 0.9 DEGREE STEPPERS AGAIN KLIIPPER WILL CALCULATE THE NEW VALUES AUTOMATICALLY
endstop_pin: ^PA15
homing_speed: 60 # This is left a bit slow for initial start up safty once everything is setup up 70-90 are reasonable. (note the sr has optical endstops it can home fast This value needs to be changed on a,b,c steppers)
homing_retract_dist: 5.0
homing_retract_speed:10
#arm_length: 315 #note turning this one applys for b and c as well.
#position_endstop: 336.5 #note turning this one applys for b and c as well.
[tmc2209 stepper_a]
uart_pin: PD5
interpolate: false
run_current: 1.138 #THIS IS RMS CURRENT NOT VREF FOR TMC. tmc spreadsheet tuned.
driver_TBL: 2
driver_TOFF: 2
driver_HSTRT: 1
driver_HEND: 3
sense_resistor: 0.110
driver_PWM_REG: 7
driver_PWM_OFS: 36
stealthchop_threshold: 99999 #this forces always silent. due to the stepper location turning this off will result in amplifed noise due to the case acoustics.
############################################################################################################################################################
# B (Y-Stepper) Configuration
############################################################################################################################################################
[stepper_b] # Y
step_pin: PE0
dir_pin: PB9
enable_pin: !PE1
microsteps: 128
rotation_distance: 40
full_steps_per_rotation: 200
endstop_pin: ^PD2
homing_speed: 60
homing_retract_dist: 5.0
homing_retract_speed: 10
[tmc2209 stepper_b]
uart_pin: PD7
interpolate: false
run_current: 1.138 #
driver_TBL: 2
driver_TOFF: 2
driver_HSTRT: 1
driver_HEND: 3
sense_resistor: 0.110
driver_PWM_REG: 7
driver_PWM_OFS: 36
stealthchop_threshold: 99999
############################################################################################################################################################
# C (Z-Stepper) Configuration
############################################################################################################################################################
[stepper_c] # Z
step_pin: PB5
dir_pin: PB4
enable_pin: !PB8
microsteps: 128
rotation_distance: 40
full_steps_per_rotation: 200
endstop_pin: ^PC4
homing_speed: 60
homing_retract_dist: 5.0
homing_retract_speed: 10
[tmc2209 stepper_c]
uart_pin: PD4
interpolate: false
run_current: 1.138
driver_TBL: 2
driver_TOFF: 2
driver_HSTRT: 1
driver_HEND: 3
sense_resistor: 0.110
driver_PWM_REG: 7
driver_PWM_OFS: 36
stealthchop_threshold: 99999
############################################################################################################################################################
# Extruder Configuration
############################################################################################################################################################
[extruder]
step_pin: PD6
dir_pin: !PD3
enable_pin: !PB3
microsteps: 32
gear_ratio: 50:17 # CHANGE THIS TO WHAT APPLIES TO CUSTOM EXTRUDER THIS IS FOR BONDTECH / BMG CLONE
rotation_distance: 24.963 #DEFAULT VALUE GET THIS FROM THE BONDTECH HOB GEAR. MEASURE THE HOB ON THE LEVER THAT VALUE x 3.14 = ROTATION DISTANCE. FLOW IN SLICER SHOULD BE WITHIN 10 PERCENT UP OR DOWN. FILAMENT TOLERANCE AND DENSITY WILL AFFECT FLOW ACTUAL FLOW.
full_steps_per_rotation: 200 #CHANGE ME TO 400 FOR 0.9 DEGREE Steppers ROTATION DISTANCE WILL AUTOMATICALLY BE CALIBRATED THIS APPLYS TO STEPPING AS WELL NO CHANGES REQUIRED.
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PE5
sensor_type: Generic 3950 #NTC 100K beta 3950 #reently fixed in latest klipper beta 3950 is dead. don't try to use a older version since the temp table is wrong by 15c.
sensor_pin: PC1
max_extrude_only_distance: 800.0
#control: pid
#pid_Kp: 15.17 # enable these and delete save at the bottom remember to run pid after setup. run fans 25-50 percent before running the command.
#pid_Ki: 1.02
#pid_Kd: 56.27
min_temp: 0
max_temp: 300 #this value is set high for the purpose of hot tightening the hotend. stock hotends / tubes will degrade rappidly past 245. burning ptfe is also a neurotoxin.
pressure_advance: 0 #set this from the slicer / fluidd / Mainsail. or start gcode its easier to do this in slicers with material specic gcode functions. 0.1-1.5 layer hight isn't usally benificial.
pressure_advance_smooth_time: 0.040
max_extrude_only_distance: 800.0
instantaneous_corner_velocity: 2.5 # The equivalent of extruder jerk. this does not speed up pressue advance like linear adance in marlin. higher values may improve bowden retract. eg 15 left slow as a safe default.
max_extrude_only_accel: 8300 # 3:1 = /3 = 2800 (stock xyz acc) The rough gear ratio of bondtech.
[tmc2209 extruder]
uart_pin: PD9
interpolate: false #This can usually be enabled without causing issues to reduce noise.
run_current: 1.100
hold_current: 0.636
#stealthchop_threshold:999999 #optional depends on setup and how much noise from the case is considered acceptable. simply printing a stepper mount and hanging e off a cable eliminates the case noise.
############################################################################################################################################################
# Bed Configuration
############################################################################################################################################################
[heater_bed]
heater_pin: PA0
sensor_type: Generic 3950 #NTC 100K beta 3950
sensor_pin: PC0
min_temp: 0
max_temp: 115
#control: pid
#pid_Kp: 59.45 #same as the extruder enable and delete the save at the bottom.
#pid_Ki: 11.8
#pid_Kd: 199.75
############################################################################################################################################################
#COOLING SECTION
############################################################################################################################################################
[fan] # Part Cooling
pin: PC14
max_power: 1.0
cycle_time: 0.02817 #35.5hrz
kick_start_time: 0.0
[heater_fan heatsink_fan] # Heatsink
pin: PB0 #PB1
max_power: 1.0
heater: extruder
heater_temp: 50.0
fan_speed: 1.0
max_power: 1.0
cycle_time: 0.02817 #35.5hrz
kick_start_time: 0.0
############################################################################################################################################################
#AUTO BED LEVELING / DELTA CALIBRATE / MESH SETTINGS / OFFSETS. Note bed tilt and bed mesh are not compatible enabled at the same time. tilt reccomended.
############################################################################################################################################################
[delta_calibrate]
radius: 127.5 #alternate option tehcnically more correct square in circle =195.086. /2 =97.543
horizontal_move_z: 30
speed: 150
[bed_tilt] #leave as is nothing to enable.
#x_adjust: 0
# The amount to add to each move's Z height for each mm on the X
# axis. The default is 0.
#y_adjust: 0
# The amount to add to each move's Z height for each mm on the Y
# axis. The default is 0.
#z_adjust: 0
# The amount to add to the Z height when the nozzle is nominally at
# 0,0. The default is 0.
# The remaining parameters control a BED_TILT_CALIBRATE extended
# g-code command that may be used to calibrate appropriate x and y
# adjustment parameters.
points: 0,0
25,0
-25,0
0,25
0,-25
0,-115
0,115
115,0
-115,0
-100,-35
100,-35
100,65
-100,65
0,0
speed: 300 #NONE PROBING SPEED (TRAVEL)
horizontal_move_z: 30
#[bed_mesh] #to use bed mesh instead add ## to all values of bed_tilt. Both features cannot be enabled at the same time and, change the macro to bed_mesh_calibrate
#speed: 100
#horizontal_move_z: 30
#mesh_radius: 125
#mesh_origin: 0,0
#round_probe_count: 5
#mesh_pps: 2,3
#algorithm: bicubic
#bicubic_tension: 0.2
#split_delta_z: .025
#fade_start: 1
#fade_end: 10
[probe]
pin: ^!PC8 #Z_MIN
x_offset: 0
y_offset: 0
z_offset: 0 # THIS WILL ONLY BE APPLIED AFTER A DELTA CALIBRATE HAS BEEN RUN SINCE DELTA DOESN'T CONSIDER A PROBE AS A ENDSTOP. IT USES THE 3 OPTICAL FOR THIS AND APPLYS THIS VALUES AFTER DELTACALIBRATES RUN.
lift_speed: 50 #The speed the probe raises before traveling or pobeing again.
speed: 10 #zprobing speed
samples: 2 #depending on the machine /probe this may work with only 1 the calibrate macro already adds redundency. INCREASE THIS IF DELTA CALIBRATE SEEMS UNRELIABLE.
samples_result: average
sample_retract_dist: 10
samples_tolerance: 0.02 #or #0.05 #This will depend how accurate probe is try for 0.02.
samples_tolerance_retries: 15
[force_move]
enable_force_move: True
#MAKE SURE TO RUN THIS FIRST THEN DELTA_CALIBRATE THEN G29/ BED_MESH_CALIBRATE. use command endstop_phase_calibrate stepper=stepper_a (do this for all 3 axis change the letters abc then save config)
[endstop_phase stepper_a]
endstop_align_zero: false
[endstop_phase stepper_b]
endstop_align_zero: false
[endstop_phase stepper_c]
endstop_align_zero: false
############################################################################################################################################################
#MACROS
############################################################################################################################################################
[gcode_macro bedtilt] #or rename Bed_mesh
description: add bed tilt button
gcode:
G28
bed_tilt_calibrate #Or replace with bed_mesh_calibrate
############################################################################################################################################################
[gcode_macro CALIBRATE] #dont forget to put on the probe.
description: delta calibrate procedure. #extended delta calibrate in klipper docs should also be done at some point.
gcode:
G28
G91
G1 Z-50 F1500
G90
G28
G91
G1 Z-50 F1500
G90
G28
G91
G1 Z-50 F1500
G90
G28
G91
G1 Z-50 F1500
G90
G28
G91
G1 Z-50 F1500
G90
G28
ENDSTOP_PHASE_CALIBRATE stepper=stepper_a
ENDSTOP_PHASE_CALIBRATE stepper=stepper_b
ENDSTOP_PHASE_CALIBRATE stepper=stepper_c
DELTA_CALIBRATE
DELTA_CALIBRATE
DELTA_CALIBRATE
DELTA_CALIBRATE
DELTA_CALIBRATE
G28
SAVE_CONFIG
############################################################################################################################################################
#IF ENABLED KEEP WALL ACCELERATION THE SAME WITH PRESSURE ADVANCE THIS ALSO APPLIES TO M205. DO NOT FORGET KLIPPER DOES NOT USE JERK THE VALUES ARE NOT THE SAME AND SCALE WITH ACC.
#THIS IS BOTH FOR COMPATABILITY WITH CERTAIN SLICERS AND FOR DYNAMIC ACC
[gcode_macro M204]
rename_existing: M204.1
gcode:
{% set f = params.F|default(0.85)|float %} # DEFAULT 0.85 = 85 PERCENT OF SET ACCELERATION VIA SLICER FOR ACCEL TO DECEL
{% if 'S' in params %}
{% set s = params.S|float %}
SET_VELOCITY_LIMIT ACCEL={s} ACCEL_TO_DECEL={ s * f }
{% else %}
{% if 'P' in params %}
{% set p = params.P|float %}
{% if 'T' in params %}
{% set t = params.T|float %}
{% if p < t %}
SET_VELOCITY_LIMIT ACCEL={p} ACCEL_TO_DECEL={ p * f }
{% else %}
SET_VELOCITY_LIMIT ACCEL={t} ACCEL_TO_DECEL={ t * f }
{% endif %}
{% else %}
SET_VELOCITY_LIMIT ACCEL={p} ACCEL_TO_DECEL={ p * f }
{% endif %}
{% elif 'T' in params %}
{% set t = params.T|float %}
SET_VELOCITY_LIMIT ACCEL={t} ACCEL_TO_DECEL={ t * f }
{% endif %}
{% endif %}
############################################################################################################################################################
[gcode_macro M205]
gcode:
{% if 'X' in params %}
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={params.X}
{% elif 'Y' in params %}
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={params.Y}
{% endif %}
############################################################################################################################################################
[gcode_macro Pid_bed_110]
gcode:
PID_CALIBRATE HEATER=heater_bed TARGET=110
############################################################################################################################################################
[gcode_macro Pid_Hotend]
gcode:
G28
G91
M106 S128
G1 Z-50 F1500
PID_CALIBRATE HEATER=extruder TARGET=245
G28
SAVE_CONFIG
############################################################################################################################################################
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
gcode:
##### set defaults #####
{% set x = params.X|default(-25) %} #edit to your park position
{% set y = params.Y|default(25) %} #edit to your park position
{% set z = params.Z|default(30)|float %} #edit to your park position
{% set e = params.E|default(1) %} #edit to your retract length
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% set lift_z = z|abs %}
{% if act_z < (max_z - lift_z) %}
{% set z_safe = lift_z %}
{% 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} F900
G90
G1 X{x} Y{y} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
############################################################################################################################################################
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
G28
TURN_OFF_HEATERS
CANCEL_PRINT_BASE
############################################################################################################################################################
[gcode_macro UNLOAD_FILAMENT]
gcode:
SAVE_GCODE_STATE NAME=unload_state
G91 # Relative positioning
M117 Heating...
M109 S{params.TEMP|default(220, true)} # Heat up hotend to provided temp or 220 as default as that should work OK with most filaments.
M117 Unloading filament...
G0 E50 F400 # Purge
G0 E-50 F1500 # Quick Retract
G0 E-475 F500 # Unload the rest of the filament
M117 Filament unloaded!
RESTORE_GCODE_STATE NAME=unload_state
############################################################################################################################################################
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### set defaults #####
{% set e = params.E|default(1) %} #edit to your retract length
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E{e} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
############################################################################################################################################################
[gcode_macro LOAD_FILAMENT]
gcode:
SAVE_GCODE_STATE NAME=load_state
G91 #Relative positioning
M117 Heating...
M109 S{params.TEMP|default(220, true)} #Heat up hotend to provided temp or 220 as default as that should work OK with most filaments.
M117 Loading filament...
G0 E475 F1000 # Load the filament into the hotend area.
G4 P1000
G0 E50 F200 # Purge
M400
TURN_OFF_HEATERS
M117 Filament loaded!
RESTORE_GCODE_STATE NAME=load_state
############################################################################################################################################################
#MISC SENSORS / AUXILARY HARDWARE/ optional features remove # to enable
############################################################################################################################################################
[gcode_macro M600]
description: FILAMENT CHANGE
gcode:
SAVE_GCODE_STATE NAME=M600_state
PAUSE
M117 Ejecting remaining filament
G0 E-0.4 F1500 # Quick Retract
G0 E-510 F1000 #eject remaining filament
M117 load with fluid,klipperscreen
RESTORE_GCODE_STATE NAME=M600_state
[filament_switch_sensor my_sensor]
switch_pin: PA4
pause_on_runout: False
runout_gcode:
PAUSE
M400 #Wait for current moves to finish:
M117 Ejecting remaining filament
G0 E-0.4 F1500 # Quick Retract
G0 E-510 F1200 #eject remaining filament
insert_gcode:
M117 Check temps if cold set temps to print settings 1st.
[gcode_arcs]
resolution: 1.0
#[skew_correction] #https://www.klipper3d.org/skew_correction.html # Only use this if you have to its better to square the machine vs compensate.
[virtual_sdcard]
path: /home/pi/gcode_files
[pause_resume] #not a copy fluidd needs this
[display_status]
[temperature_sensor rpi_temperature]
sensor_type: temperature_host
[temperature_sensor mcu_temperature]
sensor_type: temperature_mcu #note remove this for skr1.3 configs
[board_pins]
aliases:
# EXP1 header
EXP1_1=PC5, EXP1_3=PD13, EXP1_5=PE14, EXP1_7=PD11, EXP1_9=<GND>,
EXP1_2=PE13, EXP1_4=PC6, EXP1_6=PE15, EXP1_8=PD10, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_3=PE8, EXP2_5=PE11, EXP2_7=PE12, EXP2_9=<GND>,
EXP2_2=PA5, EXP2_4=PE10, EXP2_6=PA7, EXP2_8=<RST>, EXP2_10=<3.3v>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp1"
# See the sample-lcd.cfg file for definitions of common LCD displays.
############################################################################################################################################################