/
printer.cfg
798 lines (665 loc) · 21.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
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
[include fluidd.cfg]
[virtual_sdcard]
path: /home/661wls/printer_data/gcodes
on_error_gcode: CANCEL_PRINT
# TASKS:
# - Add macro to park on idle timeout/shutdown/reset
# - Add MCU and driver temp sensing if possible... https://klipper.discourse.group/t/ebb42-stm32-temperature/8709
# This file contains config used for my V1 Engineering MP3DP v4 Repeat build:
# - Config : {
# - Usable : { X : 250, Y : 250, Z : 250 },
# - Controller : BTT Octopus v1.1
# - EndStops : PG6, PG9, PG10, PG11, PG12, PG13, PG14, PG15
# - CanBus-Expansion : BTT EBB36-v1.2,
# - MAX31865 SPI 1 : { CS : PA4, SCLK : PA5, MISO: PA6, MOSI : PA7 }
# - ADXL345 SPI 2 : { CS : PB12, SCLK : PB10, MISO : PB2, MOSI : PB11 }
# - Extruder-HotEnd : BIQU H2 V2S Revo Extruder
# - Thermistor Type : Semitec 104NT-4-R025H42G(NTC100K)
# - Prob : ANTCLABS BLTouch Auto Bed Leveling Sensor v3.1
# - Wiring info @ https://www.antclabs.com/wiring
# - Reusing probe bought ~2020/12, there's probably newer/better ones now...
# }
# Content is based on BTT's generic-bigtreetech-octopus.cfg template, and info
# from various specs, as well as Klipper and V1E forum members with similar, but
# different builds (e.g. gpagnozzi and probrwr have Manta M8B controllers with
# diff pins).
# 0 1 2 3 4 5 6 7
# 01234567890123456789012345678901234567890123456789012345678901234567890123456789
# Related:
# - See docs/Config_Reference.md for a description of parameters.
# - https://www.klipper3d.org/Config_Reference.html
# - https://github.com/bigtreetech/BIGTREETECH-OCTOPUS-V1.0/blob/master/Firmware/Klipper/generic-bigtreetech-octopus.cfg
# - https://github.com/VoronDesign/Voron-Trident/blob/main/Firmware/Octopus/Trident_Octopus_Config.cfg
# - EBB36 Pinout diagram https://github.com/bigtreetech/EBB/blob/master/EBB%20CAN%20V1.1%20(STM32G0B1)/EBB36%20CAN%20V1.1/Hardware/EBB36%20CAN%20V1.1%26V1.2-PIN.png
# - gpagnozzi's printer.cfg for his V1E MP3DP v4 build, see https://forum.v1e.com/t/mp3dp-v4-build-sw-virginia/37238/31?u=azab2c
# - probrwr's printer.cfg for his V1E MP3DP v4 build, see https://forum.v1e.com/t/mp3dp-v4-build-sw-virginia/37238/104?u=azab2c
[include mainsail.cfg]
[skew_correction]
#[force_move]
#enable_force_move: False
# Set to true to enable FORCE_MOVE and SET_KINEMATIC_POSITION
# extended G-Code commands. The default is false.
# Driver0
[stepper_x]
enable_pin: !PF14
step_pin: PF13
dir_pin: PF12
endstop_pin: EBBCan: PB6
microsteps: 16
rotation_distance: 32 #AZA Was 40
position_endstop: 0
position_max: 250
homing_speed: 100
second_homing_speed: 3
# Driver1
[stepper_y]
enable_pin: !PF15
step_pin: PG0
dir_pin: PG1
endstop_pin: PG6
microsteps: 16
rotation_distance: 32 #AZA was 40
position_endstop: 0
position_max: 250
homing_speed: 100
second_homing_speed: 3
## Driver2
[stepper_z]
enable_pin: !PG5
step_pin: PF11
dir_pin: PG3
microsteps: 16
rotation_distance: 32
endstop_pin: probe:z_virtual_endstop
# position_endstop: 0
position_max: 260
position_min: -5.0
homing_speed: 40
second_homing_speed: 3
homing_retract_dist: 10
[stepper_z1]
enable_pin: !PA0
step_pin: PG4
dir_pin: PC1
microsteps: 16
rotation_distance: 32
endstop_pin: probe:z_virtual_endstop
#position_endstop: 0
[stepper_z2]
enable_pin: !PG2
step_pin: PF9
dir_pin: PF10
microsteps: 16
rotation_distance: 32
endstop_pin: probe:z_virtual_endstop
#position_endstop: 0
#[manual_stepper man_step_z]
#enable_pin: !PG5
#step_pin: PF11
#dir_pin: PG3
#microsteps: 16
#rotation_distance: 32
#velocity:
# Set the default velocity (in mm/s) for the stepper. This value
# will be used if a MANUAL_STEPPER command does not specify a SPEED
# parameter. The default is 5mm/s.
#accel:
# Set the default acceleration (in mm/s^2) for the stepper. An
# acceleration of zero will result in no acceleration. This value
# will be used if a MANUAL_STEPPER command does not specify an ACCEL
# parameter. The default is zero.
#endstop_pin:
# Endstop switch detection pin. If specified, then one may perform
# "homing moves" by adding a STOP_ON_ENDSTOP parameter to
# MANUAL_STEPPER movement commands.
# FUTURES:
#[filament_switch_sensor material_0] ...
#[filament_switch_sensor material_1] ...
#[filament_switch_sensor material_2] ...
#[filament_switch_sensor material_3] ...
# Based on :
# - https://docs.vorondesign.com/community/howto/samwiseg0/btt_smart_filament_sensor.html
[filament_motion_sensor SFS_T0]
detection_length: 10.00 # This can be adjusted to your desired level of sensitivity. 10 is a recomended value to prevent flow dropoff false triggers.
extruder: extruder
switch_pin: ^PG12
pause_on_runout: True # This can be set to false to debug false positives putting the sensor in "monitor mode". The printer will not pause but it will run the runout_gcode below.
event_delay: 3.0
pause_delay: 0.5
runout_gcode:
M117 Filament Runout/Jamb!
insert_gcode:
M117 Filament Inserted...
[delayed_gcode DISABLEFILAMENTSENSOR] ; This will disable the SFS 1 second after klipper starts
initial_duration: 1
gcode:
SET_FILAMENT_SENSOR SENSOR=SFS_T0 ENABLE=0 ; Put your filament sensor's name after SENSOR=
[gcode_macro SFS_ENABLE] ; Add this to PRINT_START
description: Enable smart filament sensor
gcode:
M117 ENABLING the Smart Filament Sensor
G92 E0
SET_FILAMENT_SENSOR SENSOR=SFS_T0 ENABLE=1 ; Put your filament sensor's name after SENSOR=
[gcode_macro SFS_DISABLE] ; Add this to PRINT_END and PRINT_CANCEL
description: Disable smart filament sensor
gcode:
M117 DISABLING the Smart Filament Sensor
G92 E0
SET_FILAMENT_SENSOR SENSOR=SFS_T0 ENABLE=0 ; Put your filament sensor's name after SENSOR=
########################################
# EXTRUDER
########################################
[extruder] # https://www.klipper3d.org/Config_Reference.html#extruder
step_pin: EBBCan: PD0
dir_pin: !EBBCan: PD1
enable_pin: !EBBCan: PD2
heater_pin: EBBCan: PB13 # V1.2 = PB13, V1.1 = PA2
microsteps: 16
rotation_distance: 3.484 #3.433 #gpagnozzi TODO:???
nozzle_diameter: 0.400
filament_diameter: 1.750
# Related:
# - https://www.klipper3d.org/Config_Reference.html#maxxxxxx-temperature-sensors
sensor_type: ATC Semitec 104NT-4-R025H42G
sensor_pin: EBBCan: PA3 # TH0 connector
# - Use MAX31865 For PT100 (100 Ohm) or PT1000 (1000 Ohm) Platinum based Temp sensors.
# - Do *NOT* use MAX31865 for NTC100K (100,000 Ohm).
# - Mentioning because of this topic... https://klipper.discourse.group/t/start-config-failure-thermocouple-reader-fault-using-max31865-on-ebb36-v1-2-with-biqu-h2-v2s-revo-extruder/8629
# - With compatible sensors, MAX31865 will provide reliable, precise, stable temperature sensing, details @ https://www.adafruit.com/product/3328
#sensor_type: MAX31865
#sensor_pin: EBBCan: PA4
#spi_software_sclk_pin: EBBCan: PA5
#spi_software_miso_pin: EBBCan: PA6
#spi_software_mosi_pin: EBBCan: PA7
#rtd_nominal_r: 100
#rtd_reference_r: 430
#rtd_num_of_wires: 2
#probrwr sensor_type: ATC Semitec 104NT-4-R025H42G # BIQU H2S Spec sheet says "Semitec 104NT-4-R025H42G(NTC100K)" #Generic 3950 #EPCOS 100K B57560G104F
#control: watermark # pid # TODO:P0 Figure out what to use for control and pid* settings ... e.g. control: pid ?
#pid_Kp: 21.527
#pid_Ki: 1.063
#pid_Kd: 108.982
min_temp: 0
max_temp: 270
min_extrude_temp: 0
pressure_advance: 0.0375 #AZA TODO: Figure out what value to use. Default = pressure_advance = 0
########################################
# MCUs
########################################
[mcu]
canbus_uuid: 642f53509351 #AZA found via python3 ~/CanBoot/scripts/flash_can.py -q
#[mcu]
#serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_2A0005001850344D30353320-if00
#serial: /dev/ttyS0
#serial: /dev/ttyAMA0
# restart_method: command #AZA commented because of https://github.com/Arksine/CanBoot/issues/72#issuecomment-1502495476
[mcu EBBCan] #AZA
canbus_uuid: f7a5fa2b8bf6 #AZA
#baud: 500000 #AZA baud: attribute not valid here 🤷♂️, will error with "Invalid Config"
[printer]
# Related
# - gpagnozzi experienced ghosting at 10000, see https://forum.v1e.com/t/mp3dp-repeat-v3-to-v4-1-upgrade/38096/17?u=azab2c
kinematics: corexy
max_velocity: 800 # default: 300
max_accel: 7000 #AZA default: 3000
max_accel_to_decel: 3500
max_z_velocity: 200 # default: 5
max_z_accel: 200 # default: 100
square_corner_velocity: 4.5
########################################
# Bed Heater
########################################
[heater_bed]
# Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types.
# Use "Generic 3950" for Keenovo heaters
heater_pin: PA3 #AZA Originally tried PA1 but didn't observe any power to SSR input.
sensor_pin: PF3 # TB
##AZA: From Voron... Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 .
#max_power: 0.6 ##AZA
# sensor_type: Generic 3950 #AZA Using https://www.amazon.com/gp/product/B07GJDL7XB with NTC 100K 3950 thermistor, Old: ATC Semitec 104GT-2
sensor_type: EPCOS 100K B57560G104F #AZA
#control: pid
#pid_Kp: 54.027
#pid_Ki: 0.770
#pid_Kd: 948.182
min_temp: 0 #AZA HACKHACK should be 0
max_temp: 130 #AZA HACKHACK should be 120 or 130 most
########################################
# Bed Mesh
########################################
# https://www.klipper3d.org/Config_Reference.html?h=pixel#bed-level-support
[bed_mesh]
speed: 100
horizontal_move_z: 8
mesh_min: 25, 25
mesh_max: 220, 210 # Bed max size minus probe X/Y offset
probe_count: 5,5
algorithm: bicubic #lagrange
mesh_pps: 4, 4 #1, 1
bicubic_tension: .5 #.5
move_check_distance: 5 #10
split_delta_z: .025
fade_start: 1
fade_end: 10
fade_target: 0
########################################
# Fan
########################################
[fan]
pin: EBBCan: PA1 # FAN2
#AZA was... pin: PA8
[heater_fan hotend_fan]
pin: EBBCan: PA0 # FAN1
heater: extruder
heater_temp: 50.0
#[heater_fan fan1]
#pin: PE5
#[heater_fan fan2]
#pin: PD12
#[heater_fan fan3]
#pin: PD13
#[heater_fan fan4]
#pin: PD14
#[controller_fan fan5]
#pin: PD15
########################################
# EBB Sensors / Actuators
########################################
[input_shaper]
shaper_freq_x: 75.8
shaper_type_x: mzv
shaper_freq_y: 75.8
shaper_type_y: mzv
# probrwr's [input_shaper]
#[input_shaper]
#shaper_freq_x: 106.8
#shaper_type_x: zv
#shaper_freq_y: 55.6
#shaper_type_y: mzv
[adxl345]
cs_pin: EBBCan: PB12
spi_software_sclk_pin: EBBCan: PB10
spi_software_mosi_pin: EBBCan: PB11
spi_software_miso_pin: EBBCan: PB2
axes_map: x,z,y
[resonance_tester]
accel_chip: adxl345
probe_points: 150, 150, 30
[bltouch]
sensor_pin: ^EBBCan: PB8
control_pin: EBBCan: PB9
x_offset: -25 #AZA based on probrwr's adapter
y_offset: -34
z_offset: 1.2 #AZA 2023-09-09 Was... 1.55
#x_offset: 0
#y_offset: -25
#z_offset: 3.35 #AZA ???
speed: 7.5
samples: 2
sample_retract_dist: 10.0
stow_on_each_sample: True #AZA False saves time between probes, but risk hitting/damaging Probe. Only use if confident breakage risk is low...
probe_with_touch_mode: True
[led status_led]
green_pin: EBBCan: PA13
cycle_time: 4.0
initial_GREEN: 0.5
########################################
# BED Sensors / Actuators
########################################
[safe_z_home]
home_xy_position: 125, 125
speed: 50
#z_hop: 30
[z_tilt] #AZA TODO:P1 Rough est, should this be more precise? See trident, and ref doc @ https://www.klipper3d.org/Config_Reference.html?h=pixel#z_tilt
z_positions: -20, 27
135, 303
292, 27
#center_Y186
points: 30, 55
30, 240
245, 240
245, 55
#points: 25, 55
# 150, 240
# 245, 55
speed: 150
horizontal_move_z: 10
retries: 4
retry_tolerance: 0.4 #0.04
[bed_screws]
# AZA configured bed_screws based on my setup...
# - Bed (PEI-Magnetic) 250x250
# - Alu plate 260x260
# - Heater 235x235 https://www.amazon.com/gp/product/B07GJDL7XB
# - Center of screw hole are 32.5mm from silicone heater edge
screw1: 37.5, 37.5
screw2: 37.5, 222.5
screw3: 222.5, 222.5
screw4: 222.5, 37.5
#[filament_switch_sensor switch_sensor]
#switch_pin: EBBCan:PB4
########################################
# FIRMWARE RETRACTION
########################################
[firmware_retraction]
retract_length: 0.2
retract_speed: 20 #AZA probrwr uses 40
########################################
# Bling
########################################
#[neopixel hotend_rgb]
#pin: EBBCan:PD3
########################################
# TMC2209 configuration
# - Set uart_pin to CS pin, per pinout diag
########################################
[tmc2209 extruder]
uart_pin: EBBCan: PA15
run_current: 0.650
stealthchop_threshold: 999999
[tmc2209 stepper_x]
uart_pin: PC4
##diag_pin: PG6
run_current: 0.7 #AZA was 0.8
interpolate: False #AZA Why??? Default True, but gpagnozzi False (note his is Manta M8P not Octopus), see https://www.klipper3d.org/Config_Reference.html?h=pixel#tmc2209 and https://forum.v1e.com/t/mp3dp-v4-build-sw-virginia/37238/31?u=azab2c
#stealthchop_threshold: 999999
[tmc2209 stepper_y]
uart_pin: PD11
##diag_pin: PG9
run_current: 0.7 #AZA was 0.8
interpolate: False
#stealthchop_threshold: 999999
[tmc2209 stepper_z]
uart_pin: PC6
##diag_pin: PG10
run_current: 0.7
interpolate: False
#stealthchop_threshold: 999999
[tmc2209 stepper_z1]
uart_pin: PC7
##diag_pin: PG11
run_current: 0.7
interpolate: False
#stealthchop_threshold: 999999
[tmc2209 stepper_z2]
uart_pin: PF2
##diag_pin: PG12
run_current: 0.7
interpolate: False
#stealthchop_threshold: 999999
# driver 5 : uart_pin: PE4
# driver 6 : uart_pin: PE1
# driver 7 : PD3
[board_pins]
aliases:
# EXP1 header
EXP1_1=PE8, EXP1_2=PE7,
EXP1_3=PE9, EXP1_4=PE10,
EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side
EXP1_7=PE14, EXP1_8=PE15,
EXP1_9=<GND>, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_2=PA5,
EXP2_3=PB1, EXP2_4=PA4,
EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side
EXP2_7=PC15, EXP2_8=<RST>,
EXP2_9=<GND>, EXP2_10=PC5
# See the sample-lcd.cfg file for definitions of common LCD displays.
# A [probe] section can be defined instead with a pin: setting identical
# to the sensor_pin: for a bltouch
#[bltouch]
#sensor_pin: PB7
#control_pin: PB6
#z_offset: 0
#[neopixel my_neopixel]
#pin: PB0
#############################
# MACROS
#############################
[idle_timeout]
timeout: 900
gcode:
TURN_OFF_HEATERS
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
# Ensure skew compensation turned off
SET_SKEW CLEAR=1
# Move to safe position
G1 X245 Y245 Z230 F7000
# Disable steppers
M84
[gcode_macro move_safe]
description: Move to safe Z position so bed doesn't crash on reset.
gcode:
G0 Z220 F6000
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
gcode:
PAUSE_BASE
_TOOLHEAD_PARK_PAUSE_CANCEL
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read extrude from _TOOLHEAD_PARK_PAUSE_CANCEL macro #####
{% set extrude = printer['gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL'].extrude %}
#### 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' %}
M83
G1 E{extrude} F2100
{% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %}
{% 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
variable_park: True
gcode:
## Move head and retract only if not already in the pause state and park set to true
{% if printer.pause_resume.is_paused|lower == 'false' and park|lower == 'true'%}
_TOOLHEAD_PARK_PAUSE_CANCEL
{% endif %}
TURN_OFF_HEATERS
CANCEL_PRINT_BASE
SFS_DISABLE
[gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
description: Helper: park toolhead used in PAUSE and CANCEL_PRINT
variable_extrude: 1.0
gcode:
##### 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 %}
{% set z_park_delta = 2.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 - z_park_delta) %}
{% set z_safe = z_park_delta %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
M83
G1 E-{extrude} F2100
{% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %}
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% if printer.gcode_move.absolute_coordinates|lower == 'false' %} G91 {% endif %}
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
######################################
# Start GCode
######################################
[gcode_macro START_PRINT]
gcode:
#Get Bed and Extruder temperature from Slicer GCode
#{% set BED_TEMP = params.BED_TEMP| default|}
#{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP| defaut|}
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(205)|float %}
#Preheat nozzle and bed
M104 S{EXTRUDER_TEMP} T0
M140 S{BED_TEMP}
# Use absolute coordinates
G90
#Home
G28 X Y
G28 Z F4800
SFS_ENABLE
Z_TILT_ADJUST #[<probe_parameter>=<value>]
#Use defaut bed mesh
BED_MESH_PROFILE LOAD=default_25
#Heat nozzle and bed
M190 S{BED_TEMP}
M109 S{EXTRUDER_TEMP} T0
#Precondition extruder
G92 E0
G1 Z2.0 F600
G1 Z0.2 F600
G1 Z2.0 F600
#Prime line
PRIME_LINE
# Load and set skew profile created per https://www.klipper3d.org/Skew_Correction.html#take-your-measurements
SKEW_PROFILE LOAD=skew_profile_1
M117 Printing...
######################################
# Prime line
######################################
[gcode_macro PRIME_LINE]
gcode:
M117 Prime Line
G92 E0 ;Reset Extruder
# move z axis
G1 Z3.6 F3000 ;Move Z Axis up
# move to prime position
G1 X5 Y85 Z2 F5000.0 ;Move to start position
G1 X5 Y200.0 Z0.35 F1500.0 E15 ;Draw the first line
G1 X7 Y200.0 Z0.35 F5000.0 ;Move to side a little
G1 X7 Y85 Z0.35 F1500.0 E30 ;Draw the second line
G92 E0 ;Reset Extruder
G1 Z4.0 F3000 ;Move Z Axis up
######################################
# End Gcode
######################################
[gcode_macro END_PRINT]
gcode:
SET_SKEW CLEAR=1
SFS_DISABLE
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
# Move nozzle away from print while retracting
G91
G1 E-3
# Raise nozzle by 10mm
G1 Z10 F3000
G90
G1 X245 Y245 Z230 F7000
G1 E-1 F100
#G1 X-2 Y-2 E-3 F300
# Disable steppers
M84
[gcode_macro TEST_MOTION]
gcode:
{% set speed = "F30000" %}
G28
G0 Z100
G0 X0 Y245 {speed}
G0 X245 Y245 F{speed}
G0 X245 Y0 F{speed}
G0 X0 Y0 F{speed}
G0 X245 Y245 F{speed}
G0 X245 Y0 F{speed}
G0 X0 Y245 F{speed}
G0 X0 Y0 F{speed}
G0 X245 Y0 F{speed}
G0 X245 Y245 F{speed}
G0 X0 Y245 F{speed}
G0 X245 Y0 F{speed}
G0 X0 Y245 F{speed}
G0 X0 Y0 F{speed}
G0 X245 Y245 F{speed}
G0 X0 Y0 F{speed}
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 52.683
#*# pid_ki = 2.007
#*# pid_kd = 345.734
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 34.128
#*# pid_ki = 3.204
#*# pid_kd = 90.868
#*#
#*# [bed_mesh default_100]
#*# version = 1
#*# points =
#*# -0.130451, 0.089549, 0.099549, 0.104549, 0.109549, 0.109549, 0.109549, 0.089549, 0.079549, 0.054549
#*# 0.059549, 0.079549, 0.099549, 0.114549, 0.124549, 0.134549, 0.139549, 0.129549, 0.129549, 0.119549
#*# 0.004549, 0.054549, 0.084549, 0.099549, 0.114549, 0.124549, 0.134549, 0.139549, 0.139549, 0.139549
#*# -0.030451, 0.014549, 0.059549, 0.089549, 0.114549, 0.134549, 0.149549, 0.159549, 0.164549, 0.164549
#*# -0.060451, -0.030451, 0.024549, 0.069549, 0.099549, 0.119549, 0.144549, 0.149549, 0.164549, 0.174549
#*# -0.100451, -0.055451, -0.010451, 0.039549, 0.089549, 0.119549, 0.149549, 0.159549, 0.184549, 0.199549
#*# -0.160451, -0.100451, -0.055451, -0.000451, 0.054549, 0.099549, 0.134549, 0.149549, 0.174549, 0.189549
#*# -0.220451, -0.155451, -0.090451, -0.030451, 0.019549, 0.059549, 0.119549, 0.149549, 0.174549, 0.204549
#*# -0.280451, -0.205451, -0.150451, -0.085451, -0.015451, 0.024549, 0.084549, 0.129549, 0.144549, 0.179549
#*# -0.255451, -0.255451, -0.175451, -0.120451, -0.030451, 0.004549, 0.059549, 0.124549, 0.159549, 0.204549
#*# x_count = 10
#*# y_count = 10
#*# mesh_x_pps = 4
#*# mesh_y_pps = 4
#*# algo = bicubic
#*# tension = 0.5
#*# min_x = 35.0
#*# max_x = 219.95
#*# min_y = 35.0
#*# max_y = 209.96
#*#
#*# [bed_mesh default_25]
#*# version = 1
#*# points =
#*# 0.132001, 0.142001, 0.062001, -0.017999, -0.157999
#*# 0.107001, 0.132001, 0.117001, 0.062001, 0.022001
#*# 0.052001, 0.122001, 0.127001, 0.132001, 0.042001
#*# 0.002001, 0.117001, 0.127001, 0.172001, 0.232001
#*# -0.097999, 0.047001, 0.147001, 0.212001, 0.247001
#*# min_x = 25.0
#*# max_x = 220.0
#*# min_y = 25.0
#*# max_y = 210.0
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 4
#*# mesh_y_pps = 4
#*# algo = bicubic
#*# tension = 0.5
#*#
#*# [skew_correction skew_profile_1]
#*# xy_skew = 0.014205811504963698
#*# xz_skew = 0.0
#*# yz_skew = 0.0