forked from Lzhikai/SIBOOR-Voron-2.4-AUG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
printer.cfg
672 lines (606 loc) · 26.5 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
[include mainsail.cfg]
#####################################################################
## MCU
#####################################################################
[mcu EBBCan]
#serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00
canbus_uuid: 2789c6737f74
# The following command is used to view the ID of canbus and needs to be entered in the ssh terminal.
# “ ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0 ”
#--------------------------------------------------------------
[adxl345]
cs_pin: EBBCan:gpio1
spi_software_sclk_pin: EBBCan:gpio2
spi_software_mosi_pin: EBBCan:gpio0
spi_software_miso_pin: EBBCan:gpio3
axes_map: z,-y,x
[resonance_tester]
probe_points: 100, 100, 20
accel_chip: adxl345
[mcu]
#serial: /dev/serial/by-id/usb-Klipper_stm32h723xx_slipper-if00
#--------------------------------------------------------------
# Query the ID of canbus:
# cd ~/CanBoot/scripts
# python3 flash_can.py -i can0 -q
canbus_uuid= 4a685e393f95
canbus_interface:can0
#####################################################################
## Temperature Monitoring
#####################################################################
[temperature_sensor EBB_NTC]
sensor_type: Generic 3950
sensor_pin: EBBCan:gpio28
[temperature_sensor BTT-MCU]
sensor_type: temperature_mcu
[temperature_sensor BTT-PI]
sensor_type: temperature_host
#####################################################################
## Model and acceleration
#####################################################################
[printer]
kinematics: corexy # Printer type:corexy
max_velocity: 300 # Maximum speed (max. 300)
max_accel: 5000 # Maximum acceleration (max. 4000)
max_accel_to_decel: 5000 # Maximum acceleration to deceleration (max. 4000)
max_z_velocity: 15 # Z-axis maximum speed
max_z_accel: 350 # Z-axis maximum acceleration
square_corner_velocity: 5.0 # Square corner speed
#####################################################################
# B(X) ---------A(Y)
# | |
# |--------E-------|
# | |
# | |
# | |
#####################################################################
## X-axis on MOTOR_0(B Motor)
#####################################################################
[stepper_x]
step_pin: PF13 # X-axis motor pulse pin setting
dir_pin: PF12 # X-axis motor direction pin setting
enable_pin: !PF14 # X-axis motor enable pin setting
microsteps: 32 # Motor microsteps Setting
rotation_distance: 40 # Active pulley circumference mm (2GT-20T pulley 40, 2GT-16T pulley 32)
full_steps_per_rotation:200 # Number of pulses required for a single motor revolution (1.8 degree motor: 200, 0.9 degree motor: 400)
endstop_pin: EBBCan:gpio24 #PG6 # Limit switch PIN pin setting(X-)
position_min: 0 # X-axis minimum travel - software limit
position_endstop: 300 #350 ## Mechanical reset point coordinates for X-axis (change to 350 for 350 models)
position_max: 300 #350 ## X-axis maximum travel - software limit (change to 350 for 350 models)
homing_speed: 50 # Reset speed maximum 100
homing_retract_dist: 5 # Setback distance after the first trigger of the reset switch
homing_positive_dir: true # Direction of reset (generally no change required)
[tmc2240 stepper_x]
cs_pin: PC4
spi_software_sclk_pin: PA5
spi_software_mosi_pin: PA7
spi_software_miso_pin: PA6
driver_TPFD: 0
run_current: 0.85
#####################################################################
## Y-axis on MOTOR_1(A Motor)
#####################################################################
[stepper_y]
step_pin: PG0 # Y-axis motor pulse pin setting
dir_pin: PG1 # Y-axis motor direction pin setting
enable_pin: !PF15 # Y-axis motor enable pin setting
microsteps: 32 # Motor microsteps Setting
rotation_distance: 40 # Active pulley circumference mm (2GT-20T pulley 40, 2GT-16T pulley 32)
full_steps_per_rotation:200 # Number of pulses required for a single motor revolution (1.8 degree motor: 200, 0.9 degree motor: 400)
endstop_pin: PG9 # Limit switch PIN pin setting(Y-)
position_min: 0 # X-axis minimum travel - software limit
position_endstop: 300 #350 # Mechanical reset point coordinates for Y-axis (change to 350 for 350 models)
position_max: 300 #350 # Y-axis maximum travel - software limit (change to 350 for 350 models)
homing_speed: 50 # Reset speed maximum 100
homing_retract_dist: 5 # Setback distance after the first trigger of the reset switch
homing_positive_dir: true # Direction of reset (generally no change required)
[tmc2240 stepper_y]
cs_pin: PD11
spi_software_sclk_pin: PA5
spi_software_mosi_pin: PA7
spi_software_miso_pin: PA6
driver_TPFD: 0
run_current: 0.85
####################################################################################
# z1 -------------- z2
# | |
# | |
# | |
# | |
# z0--- display ---z3
#####################################################################
## Z0-axis
#####################################################################
## Z0-axis on MOTOR2_1(left front)
[stepper_z]
step_pin: PF11 # Z-axis motor pulse pin
dir_pin: !PG3 # Z-axis motor direction pin setting
enable_pin: !PG5 # Z-axis motor enable pin setting
rotation_distance: 40 # Active pulley circumference mm (2GT-20T pulley 40, 2GT-16T pulley 32)
gear_ratio: 80:16 # reduction ratio
microsteps: 16 # microsteps
endstop_pin: probe:z_virtual_endstop #PG10 # Limit switch interface
## position_endstop is the distance of the Z limit pin trigger point from the print surface.
## Positive value = above the termination point of the platform,
## Negative value = termination point below the plateau.
## Increasing the value of position_ endstop will bring the nozzle closer to the bed.
## After running Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the end of the CFG configuration.
##position_endstop: 0.5 # Modified as per actual
position_max: 280 #340 # Maximum Z-axis print height 350mm=340
position_min: -5 # Soft Limit Minimum Stroke
homing_speed: 10 # Reset speed - maximum 20
second_homing_speed: 3 # Secondary reset speed - maximum 10
homing_retract_dist: 3 # Retreat distance
#--------------------------------------------------------------------
[tmc2209 stepper_z] # TMC2209
uart_pin: PC6 # drive communications port
interpolate: true # Whether to enable 256 microstep interpolation
run_current: 0.8 # Motor running current value(mA)
hold_current: 0.8 # holding current(mA)
sense_resistor: 0.110 # Do not change the drive sampling resistor
stealthchop_threshold: 200 # Mute threshold
#--------------------------------------------------------------------#
## Z1-axis on MOTOR3(left rear)
[stepper_z1]
step_pin: PG4 # Z1-axis motor pulse pin
dir_pin: PC1 # Z1-axis motor direction pin setting
enable_pin: !PA0 # Z1-axis motor enable pin setting
rotation_distance: 40 # Active pulley circumference mm (2GT-20T pulley 40, 2GT-16T pulley 32)
gear_ratio: 80:16 # reduction ratio
microsteps: 16 # microsteps
#--------------------------------------------------------------------
[tmc2209 stepper_z1] # TMC2209
uart_pin: PC7 # drive communications port
interpolate: true # Whether to enable 256 microstep interpolation
run_current: 0.8 # Motor running current value(mA)
hold_current: 0.8 # holding current(mA)
sense_resistor: 0.110 # Do not change the drive sampling resistor
stealthchop_threshold: 200 # Mute threshold
#--------------------------------------------------------------------#
## Z2-axis on MOTOR4(right-rear)
[stepper_z2]
step_pin: PF9 # Z2-axis motor pulse pin
dir_pin: !PF10 # Z2-axis motor direction pin setting
enable_pin: !PG2 # Z2-axis motor enable pin setting
rotation_distance: 40 # Active pulley circumference mm (2GT-20T pulley 40, 2GT-16T pulley 32)
gear_ratio: 80:16 # reduction ratio
microsteps: 16 # microsteps
#--------------------------------------------------------------------
[tmc2209 stepper_z2] # TMC2209
uart_pin: PF2 # drive communications port
interpolate: true # Whether to enable 256 microstep interpolation
run_current: 0.8 # Motor running current value(mA)
hold_current: 0.8 # holding current(mA)
sense_resistor: 0.110 # Do not change the drive sampling resistor
stealthchop_threshold: 200 # Mute threshold
#--------------------------------------------------------------------#
## Z3-axis on MOTOR5(right-front)
[stepper_z3]
step_pin: PC13 # Z3-axis motor pulse pin
dir_pin: PF0 # Z3-axis motor direction pin setting
enable_pin: !PF1 # Z3-axis motor enable pin setting
rotation_distance: 40 # Active pulley circumference mm (2GT-20T pulley 40, 2GT-16T pulley 32)
gear_ratio: 80:16 # reduction ratio
microsteps: 16 # microsteps
#--------------------------------------------------------------------
[tmc2209 stepper_z3] # TMC2209
uart_pin: PE4 # drive communications port
interpolate: true # Whether to enable 256 microstep interpolation
run_current: 0.8 # Motor running current value(mA)
hold_current: 0.8 # holding current(mA)
sense_resistor: 0.110 # Do not change the drive sampling resistor
stealthchop_threshold: 200 # Mute threshold
#####################################################################
## Extruder motor
#####################################################################
[extruder]
step_pin: EBBCan:gpio18
dir_pin: !EBBCan:gpio19
enable_pin: !EBBCan:gpio17
full_steps_per_rotation: 200 # Number of pulses required for a single motor revolution (1.8 degree motor: 200, 0.9 degree motor: 400)
microsteps: 16
## When performing extruder calibration, update the following values
## Let's say you ask for a 100mm feed, but it's actually 98mm ,
## New value = old value x (actual extrusion length / target length)
## 22.6789511 is a value that we recommend
gear_ratio: 50:10
rotation_distance: 21.525
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: EBBCan:gpio7
#sensor_type: EPCOS 100K B57560G104F
#sensor_pin: EBBCan:gpio27
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 300
min_extrude_temp: 100 # Minimum extrusion temperature
pressure_advance: 0.05 # Propulsion pressure - try to keep pressure below 1.0
pressure_advance_smooth_time: 0.040 # Smooth advance time - default value is 0.040
##Nozzle Temperature PID Calibration Command: "PID_CALIBRATE HEATER=extruder TARGET=245"
sensor_type: MAX31865
sensor_pin: EBBCan:gpio9
spi_software_sclk_pin: EBBCan:gpio10
spi_software_mosi_pin: EBBCan:gpio8
spi_software_miso_pin: EBBCan:gpio11
rtd_nominal_r: 100
rtd_reference_r: 430
rtd_num_of_wires: 2
[tmc2209 extruder]
uart_pin: EBBCan:gpio20
run_current: 0.550
stealthchop_threshold: 999999
#--------------------------------------------------------------------
[verify_heater extruder] # Heating Block Temperature Tolerance Configuration
max_error: 120 # maximum error
check_gain_time:120 # tolerance time
hysteresis: 50 # tolerance temperature
heating_gain: 2 # Heating Gain
#####################################################################
## Filament Inspection
#####################################################################
#[filament_switch_sensor DLJC]
#pause_on_runout: True
## When set to True, a pause will be executed immediately after a material break
## , if False, a material break pause will not be enabled
#runout_gcode:PAUSE
## G-code to be executed after a material break
#insert_gcode:RESUME
## G-code to be executed after insertion of consumables
#event_delay: 3.0
## Minimum time delay between events, in 3 seconds
#pause_delay: 0.5
## Delay between pause commands, scheduling and executing runout_gcode in seconds.
## Increase this delay if strange pause behaviour occurs. The default is 0.5 seconds.
#switch_pin:PG15
## Set the pin, this parameter must be filled
#--------------------------------------------------------------------
#[filament_switch_sensor material_0]
#switch_pin: PG12
#[filament_switch_sensor material_1]
#switch_pin: PG13
#[filament_switch_sensor material_2]
#switch_pin: PG14
#####################################################################
## Heater_bed
#####################################################################
[heater_bed]
heater_pin: PA1 # (BE0)
sensor_pin: PF3 # sensor interface(TB)
sensor_type: ATC Semitec 104GT-2 #ATC Semitec 104GT-2
control: pid ##heater_bed Temperature PID Calibration Command: "PID_CALIBRATE HEATER=heater_bed TARGET=100"
pid_kp: 58.437
pid_ki: 2.347
pid_kd: 363.769
min_temp: 0
max_temp: 120
max_power: 1.0
#####################################################################
# Bed Grid Calibration
#####################################################################
[bed_mesh]
speed: 80 # Calibration speed
horizontal_move_z: 10 # Z-axis movement speed
mesh_min: 30,30 # Minimum calibration point coordinates x, y
mesh_max: 270, 270 # Maximum calibration point coordinates x, y
probe_count: 7,7 # Number of sampling points (7X7 is 49 points)
mesh_pps: 2,2 # Number of supplementary sampling points
algorithm: bicubic # algorithmic model
bicubic_tension: 0.2 # Algorithmic interpolation don't move
#####################################################################
# FAN
#####################################################################
[fan]
pin: EBBCan:gpio13
kick_start_time: 0.5
off_below: 0.10
[heater_fan hotend_fan]
pin: EBBCan:gpio14
heater: extruder
heater_temp: 50.0
#[fan_generic 4W_FAN0]
#pin: EBBCan:gpio15
#tachometer_pin: EBBCan:gpio12
#tachometer_ppr: 1
[heater_fan Nevermore]
pin: PA8
max_power: 1.0
shutdown_speed: 1.0
kick_start_time: 5.0
heater: extruder
heater_temp: 200
fan_speed: 1.0
#--------------------------------------------------------------------
[heater_fan controller_fan] # Skirt fan 1
pin: PE5 # FAN-2
shutdown_speed: 0.0 # Closing speed (Please do not change)
kick_start_time: 0.5 # start-up time (Please do not change)
heater: heater_bed # Related equipment: heater_bed
heater_temp: 50 # How many degrees does the heat bed reach to activate the fan
fan_speed: 0.6 # Fan speed
#--------------------------------------------------------------------
[heater_fan controller_fan2] # Skirt fan 2
pin: PD12 # FAN-3
shutdown_speed: 0.0 # Closing speed (Please do not change)
kick_start_time: 0.5 # start-up time (Please do not change)
heater: heater_bed # Related equipment: heater_bed
heater_temp: 50 # How many degrees does the heat bed reach to activate the fan
fan_speed: 0.6 # Fan speed
#--------------------------------------------------------------------
#[heater_fan exhaust_fan] # exhaust_fan
#pin: PD13 # FAN-4
#shutdown_speed: 0.0 # Closing speed (Please do not change)
#kick_start_time: 5.0 # start-up time (Please do not change)
#heater: heater_bed # Related equipment: heater_bed
#heater_temp: 60 # How many degrees does the heat bed reach to activate the fan
#fan_speed: 1.0 # Fan speed
#--------------------------------------------------------------------
#[heater_fan hotend_fan] # Hotend Fan
#pin: PD14 # FAN-0
#max_power: 1.0 # Maximum speed
#kick_start_time: 0.5 # start-up time (Please do not change)
#heater: extruder # Related equipment: extruder
#heater_temp: 50 # How many degrees does it reach to activate the fan
#fan_speed: 1.0 # Fan speed
#####################################################################
# RGB-LEDlight
#####################################################################
[neopixel hotend_rgb]
pin: EBBCan:gpio16
#[neopixel LEDlight]
#pin: PB0 # signal interface
#chain_count: 26 # Number of lamp beads
#color_order: GRB # colour sequence
#initial_RED: 0.2 # Initial red brightness
#initial_GREEN: 0.2 # Initial green brightness
#initial_BLUE: 0.2 # Initial blue brightness
#####################################################################
# Idle off hot bed
#####################################################################
[idle_timeout]
timeout: 1800 # The hot bed is switched off if the idle time exceeds 30 minutes
#####################################################################
# Homing and Gantry Adjustment
#####################################################################
[homing_override]
axes: z
set_position_z: 0
gcode:
G90
G0 Z5 F1800
G28 X Y
G0 X150 Y150 F7200 #300mm
# G0 X175 Y175 F7200 #350mm
G28 Z
G0 Z10 F1800
G0 X150 Y150 Z30 F1800
# G0 X175 Y175 Z30 F1800 #350mm
#####################################################################
#[bltouch]
#sensor_pin: ^EBBCan:gpio21
#control_pin: EBBCan:gpio22
## NPN and PNP proximity switch types can be set by jumper 24V
[probe]
pin: !EBBCan:gpio6
x_offset: 0 # X-axis - sensor offset relative to the nozzle
y_offset: 25 # Y-axis - sensor offset relative to the nozzle
z_offset: 0 # Z-axis - sensor offset relative to the nozzle
#You'll need to manually calibrate the probe's Z offset by using "PROBE_CALIBRATE"
speed: 10.0 # Levelling speed
samples: 3 # sampling frequency
samples_result: median # Value type (default median)
sample_retract_dist: 3.0 # Levelling retraction distance
samples_tolerance: 0.01 # Sampling tolerance (note that too small a value may result in increased sampling)
samples_tolerance_retries: 3 # Number of out-of-tolerance retries
##-----------Reduce nozzle temperature for gantry levelling-------##
activate_gcode =
{% set PROBE_TEMP = 150 %} ## Setting the print head temperature 150
{% set MAX_TEMP = PROBE_TEMP + 5 %} ## Limit temperature +5 degrees
{% set ACTUAL_TEMP = printer.extruder.temperature %}
{% set TARGET_TEMP = printer.extruder.target %}
{% if TARGET_TEMP > PROBE_TEMP %} ## Checking the temperature
{ action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) }
M109 S{ PROBE_TEMP }
{% else %}
{% if ACTUAL_TEMP > MAX_TEMP %} ## Judging the actual temperature
{ action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) }
TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP }
{% endif %}
{% endif %}
####################################################################################
# Gantry levelling
####################################################################################
[quad_gantry_level]
## Gantry Corners for 300mm Build
## Uncomment for 300mm build
gantry_corners: # 300mm machineries
-60,-10
360,370
## Probe points
points:
50,25
50,225
250,225
250,25
## Gantry Corners for 350mm Build
## Uncomment for 350mm build
# gantry_corners:
# -60,-10
# 410,420
## Probe points
#points:
# 50,25
# 50,275
# 300,275
# 300,25
#--------------------------------------------------------------------
speed: 100 # Levelling speed
horizontal_move_z: 10 # Z-axis starting height
retries: 5 # Number of out-of-tolerance retries
retry_tolerance: 0.01 # Sampling tolerance
max_adjust: 10 # Maximum adjustment stroke for levelling
[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
#--------------------------------------------------------------------
[gcode_macro PROBECALIBRATE]
gcode:
G28
G0 X150 Y150 Z1 F3600
# G0 X175 Y175 Z1 F3600 ##350mm
PROBE_CALIBRATE
[gcode_macro G32]
gcode:
BED_MESH_CLEAR # Unloading net beds
G28 # Homing all axes
QUAD_GANTRY_LEVEL # Gantry levelling
G28 # Homing all axes
G0 X150 Y150 Z30 F3600 # 300mm
#G0 X175 Y175 Z30 F3600 # 350mm
#--------------------------------------------------------------------
[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 PRINT_START] #开始打印宏
# Use PRINT_START for the slicer starting script - please customise for your slicer of choice
gcode:
BED_MESH_CLEAR # Unloading net beds
G28 # Homing all axes
QUAD_GANTRY_LEVEL # Gantry levelling
BED_MESH_PROFILE LOAD=default # Loading the net bed
M109 S{ printer.extruder.target } ##Restore print head temperature
G90
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 Y200.0 Z0.28 F1500.0 E17 # Draw the first line
G1 X10.4 Y200.0 Z0.28 F5000.0 # Move to side a little
G1 X10.4 Y20 Z0.28 F1500.0 E32 # Draw the second line
G92 E0 # Reset Extruder
G90
#--------------------------------------------------------------------
[gcode_macro PRINT_END] # Set PRINT_END as the end-of-print macro to customise the after-print action.
gcode:
M400
G92 E0 # Zeroing the extruder
G1 E-10.0 F3600 # Retracting the filament
G91 # relative position
G0 Z1.00 X20.0 Y20.0 F6000 # Remove nozzle
TURN_OFF_HEATERS # Close the hot end
M107 # Switch off the fan.
G1 Z2 F3000 # Move the nozzle up 2 mm
G90 # absolute positioning
G0 X150 Y300 F3600 # Park the nozzle at the rear
BED_MESH_CLEAR # Unloading net beds
#--------------------------------------------------------------------
[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
[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 %}