-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprinter-20220227_203018.cfg
489 lines (436 loc) · 12.5 KB
/
printer-20220227_203018.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
# This file contains pin mappings for the Creality Ender 5 Plus with BTT Octopus v1.1
# to use this config the firmware should be compiled following the instructions given
# on the BTT git hub site
# STM32 / ST<32F446 / 32KiB B/L / 12 MHz Crystal
# See docs/Config_Reference.md for a description of parameters.
#The following Macro is used to replace slicer starting gcode.
#In your slicer replace starting gcode with START_PRINT
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
# Start bed heating
M140 S{BED_TEMP}
# Use absolute coordinates
G90
# Reset the G-Code Z offset (adjust Z offset if needed)
SET_GCODE_OFFSET Z=0.0
# Home the printer
G28
# Move the nozzle near the bed
#G1 Z5 F3000
# Move the nozzle very close to the bed
#G1 Z0.15 F300
# Wait for bed to reach temperature
M190 S{BED_TEMP}
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}
# Get Bed MESH
# G29
BED_MESH_PROFILE LOAD=p1
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position
G1 X10.1 Y300.0 Z0.28 F1500.0 E20 ;Draw the first line
# taking out second line, first one is longer and I'm findinf on the return we're picking up dribbly bits we've left behind JH - 26-01-2022
# G1 X10.4 Y300.0 Z0.28 F5000.0 ;Move to side a little
# G1 X10.4 Y20 Z0.28 F1500.0 E20 ;Draw the second line
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
[gcode_macro UNLOAD_FILAMENT]
gcode:
M109 S190
G91
G1 E5.0 F1200
G1 E3.0 F1600
G1 E-13.14 F7000
G1 E-100 F3000 #This is a partial unload for the E5, but you need to adjust the default setting for max extrusion from 50
G1 E-100 F3000 #This is a partial unload for the E5, but you need to adjust the default setting for max extrusion from 50
G1 E-100 F3000 #This is a partial unload for the E5, but you need to adjust the default setting for max extrusion from 50
G1 E-100 F3000 #This is a partial unload for the E5, but you need to adjust the default setting for max extrusion from 50
G1 E-100 F3000 #This is a partial unload for the E5, but you need to adjust the default setting for max extrusion from 50
G1 E-100 F3000 #This is a partial unload for the E5, but you need to adjust the default setting for max extrusion from 50
G90
M104 S0
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[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}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CANCEL_PRINT_BASE
#The following Macro is used to replace the ending gcode in your slicer
#replace the end gcode in your slicer with END_PRINT
[gcode_macro END_PRINT]
gcode:
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
# home X/Y Axis
G28 X Y
# Move nozzle away from print while retracting
G91
G1 X-2 Y-2 E-3 F300
# Raise nozzle by 10mm
G1 Z10 F3000
G90
# Disable steppers except Z
M84 X Y E
[gcode_macro WORK_SCREWS]
gcode:
G28
G1 Z350 F7800
G1 Z10 F7800
G1 Z350 F7800
G1 Z10 F7800
G1 Z350 F7800
G28
[gcode_macro INITIAL_POWER_ON]
gcode:
G28
z_TILT_ADJUST
z_TILT_ADJUST
z_TILT_ADJUST
z_TILT_ADJUST
z_TILT_ADJUST
G28
G29
# Motor0
[stepper_x]
step_pin: PF13
dir_pin: !PF12
enable_pin: !PF14
microsteps: 16
#rotation_distance: 40
rotation_distance: 39.51
endstop_pin: PG6
position_endstop: 330
position_max: 330
homing_speed: 100
# Motor1
[stepper_y]
step_pin: PG0
dir_pin: !PG1
enable_pin: !PF15
microsteps: 16
#rotation_distance: 40
rotation_distance: 39.65
endstop_pin: PG9
position_endstop: 350
position_max: 350
homing_speed: 100
# Motor2
[stepper_z]
step_pin: PG4
dir_pin: !PC1
enable_pin: !PA0
microsteps: 16
#rotation_distance: 3.9
rotation_distance: 3.98
endstop_pin: probe:z_virtual_endstop
position_max: 400
position_min: -4
homing_speed: 10.0
# Motor3
[stepper_z1]
step_pin: PF11
dir_pin: !PG3
enable_pin: !PG5
microsteps: 16
#rotation_distance: 3.9
rotation_distance: 3.98
endstop_pin:probe:z_virtual_endstop
# Motor4
[extruder]
step_pin: PF9
dir_pin: !PF10
enable_pin: !PG2
microsteps: 16
rotation_distance: 30.9
# default rotation distance is 33.683
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA3 # HE0
sensor_pin: PF4 # T0
sensor_type: EPCOS 100K B57560G104F
#control: pid
#pid_Kp: 22.2
#pid_Ki: 1.08
#pid_Kd: 114
min_temp: 0
max_temp: 260
max_extrude_only_distance: 101
# pressure_advance: 0.3608 # JH 26/01/2022 (per fillament, pre estep calculations
[gcode_arcs]
resolution: 1.0
# An arc will be split into segments. Each segment's length will
# equal the resolution in mm set above. Lower values will produce a
# finer arc, but also more work for your machine. Arcs smaller than
# the configured value will become straight lines. The default is
# 1mm.
[safe_z_home]
home_xy_position: 180, 180
speed: 100
z_hop: 10
z_hop_speed: 5
[bltouch]
sensor_pin: ^PB7
control_pin: PB6
x_offset: -45
y_offset: 0
speed: 10
pin_up_touch_mode_reports_triggered: False
[bed_mesh]
speed: 300
horizontal_move_z: 5.5
mesh_min: 50, 50
mesh_max: 280,280
probe_count: 9,9
mesh_pps: 6,6
algorithm: bicubic
bicubic_tension: 0
fade_start: 5
fade_end: 10
# fade_target: 0
# relative_reference_index: 0H
[bed_screws]
screw1: 20,50
screw2: 320,50
screw3: 320,320
screw4: 20,320
[screws_tilt_adjust]
screw1: 20,50
screw1_name: front left screw
screw2: 320,50
screw2_name: front right screw
screw3: 320,320
screw3_name: rear right screw
screw4: 20,320
screw4_name: rear left screw
horizontal_move_z: 10.
speed: 50.
screw_thread: CCW-M4
[z_tilt]
z_positions:
60, 183
330, 183
# 30, 173
# 350, 173
points:
60, 183
330, 183
# 30, 173
# 350, 173
speed: 100
[gcode_macro G29]
gcode:
G28
M190 S60
BED_MESH_CALIBRATE
BED_MESH_PROFILE SAVE=p1
# G1 X0 Y0 Z5 F4000
M140 S0
[heater_bed]
heater_pin: PA2
sensor_pin: PF3 # TB
sensor_type: EPCOS 100K B57560G104F
#control: pid
#pid_Kp: 690.34
#pid_Ki: 111.47
#pid_Kd: 1068.83
min_temp: 0
max_temp: 130
# [heater_fan nozzle_cooling_fan]
# pin: PA8
[fan]
pin: PA8
[controller_fan fan]
pin: PD15
[mcu]
serial: /dev/ttyAMA0
restart_method: command
baud: 250000
# serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_10003F000950534E4E313120-if00
# CAN bus is also available on this board
[filament_switch_sensor filament_sensor]
switch_pin:PG10
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 500
max_z_velocity: 5
max_z_accel: 100
[temperature_sensor raspberry_pi]
sensor_type: temperature_host
########################################
# TMC2209 configuration
########################################
[tmc2209 stepper_x]
uart_pin: PC4
##diag_pin: PG6
run_current: 0.800
stealthchop_threshold: 999999
[tmc2209 stepper_y]
uart_pin: PD11
##diag_pin: PG9
run_current: 0.800
stealthchop_threshold: 999999
[tmc2209 stepper_z]
uart_pin: PC6
##diag_pin: PG10
run_current: 0.650
stealthchop_threshold: 999999
[tmc2209 stepper_z1]
uart_pin: PC7
##diag_pin: PG11
run_current: 0.650
stealthchop_threshold: 999999
[tmc2209 extruder]
uart_pin: PF2
run_current: 0.800
stealthchop_threshold: 999999
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bltouch]
#*# z_offset = 2.054
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.087750, 0.101156, 0.095062, 0.088969, 0.060937, 0.076781, 0.078000, 0.048750, 0.010969
#*# 0.046312, 0.052406, 0.049969, 0.035344, 0.029250, 0.035344, 0.045094, 0.035344, 0.010969
#*# 0.060937, 0.067031, 0.069469, 0.062156, 0.043875, 0.054844, 0.043875, 0.035344, 0.013406
#*# 0.056062, 0.062156, 0.067031, 0.068250, 0.054844, 0.051187, 0.056062, 0.043875, 0.025594
#*# 0.058500, 0.064594, 0.076781, 0.078000, 0.070687, 0.067031, 0.064594, 0.051187, 0.043875
#*# 0.068250, 0.069469, 0.081656, 0.086531, 0.080437, 0.081656, 0.073125, 0.060937, 0.043875
#*# 0.048750, 0.065812, 0.073125, 0.088969, 0.081656, 0.073125, 0.067031, 0.032906, 0.018281
#*# 0.080437, 0.097500, 0.114562, 0.124312, 0.118219, 0.107250, 0.084094, 0.064594, 0.036562
#*# 0.060937, 0.075562, 0.093844, 0.104812, 0.092625, 0.078000, 0.069469, 0.045094, 0.014625
#*# tension = 0.0
#*# min_x = 50.0
#*# algo = bicubic
#*# y_count = 9
#*# mesh_y_pps = 6
#*# min_y = 50.0
#*# x_count = 9
#*# max_y = 300.0
#*# mesh_x_pps = 6
#*# max_x = 300.0
#*#
#*# [bed_mesh p1]
#*# version = 1
#*# points =
#*# 0.087750, 0.101156, 0.095062, 0.088969, 0.060937, 0.076781, 0.078000, 0.048750, 0.010969
#*# 0.046312, 0.052406, 0.049969, 0.035344, 0.029250, 0.035344, 0.045094, 0.035344, 0.010969
#*# 0.060937, 0.067031, 0.069469, 0.062156, 0.043875, 0.054844, 0.043875, 0.035344, 0.013406
#*# 0.056062, 0.062156, 0.067031, 0.068250, 0.054844, 0.051187, 0.056062, 0.043875, 0.025594
#*# 0.058500, 0.064594, 0.076781, 0.078000, 0.070687, 0.067031, 0.064594, 0.051187, 0.043875
#*# 0.068250, 0.069469, 0.081656, 0.086531, 0.080437, 0.081656, 0.073125, 0.060937, 0.043875
#*# 0.048750, 0.065812, 0.073125, 0.088969, 0.081656, 0.073125, 0.067031, 0.032906, 0.018281
#*# 0.080437, 0.097500, 0.114562, 0.124312, 0.118219, 0.107250, 0.084094, 0.064594, 0.036562
#*# 0.060937, 0.075562, 0.093844, 0.104812, 0.092625, 0.078000, 0.069469, 0.045094, 0.014625
#*# tension = 0.0
#*# min_x = 50.0
#*# algo = bicubic
#*# y_count = 9
#*# mesh_y_pps = 6
#*# min_y = 50.0
#*# x_count = 9
#*# max_y = 300.0
#*# mesh_x_pps = 6
#*# max_x = 300.0
#*#
#*# [bed_mesh VSlot]
#*# version = 1
#*# points =
#*# 0.043750, 0.058750, 0.043750, 0.023750, 0.008750, 0.001250, -0.013750, -0.050000, -0.095000
#*# 0.010000, 0.027500, 0.015000, -0.007500, -0.023750, -0.023750, -0.033750, -0.072500, -0.130000
#*# 0.020000, 0.028750, 0.026250, 0.016250, 0.002500, 0.001250, -0.021250, -0.057500, -0.103750
#*# 0.043750, 0.057500, 0.061250, 0.062500, 0.042500, 0.026250, 0.001250, -0.040000, -0.081250
#*# 0.028750, 0.038750, 0.057500, 0.060000, 0.042500, 0.041250, 0.013750, -0.016250, -0.060000
#*# 0.046250, 0.065000, 0.075000, 0.083750, 0.076250, 0.065000, 0.037500, 0.000000, -0.052500
#*# 0.017500, 0.042500, 0.053750, 0.058750, 0.056250, 0.050000, -0.007500, -0.043750, -0.095000
#*# 0.055000, 0.080000, 0.092500, 0.086250, 0.085000, 0.058750, 0.033750, -0.002500, -0.062500
#*# 0.022500, 0.026250, 0.048750, 0.050000, 0.040000, 0.021250, -0.005000, -0.048750, -0.098750
#*# tension = 0.0
#*# mesh_x_pps = 6
#*# algo = bicubic
#*# min_x = 50.0
#*# min_y = 50.0
#*# y_count = 9
#*# mesh_y_pps = 6
#*# x_count = 9
#*# max_x = 300.0
#*# max_y = 300.0
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 62.314
#*# pid_ki = 0.645
#*# pid_kd = 1504.889
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 24.969
#*# pid_ki = 1.473
#*# pid_kd = 105.808