-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprint_end.cfg
47 lines (45 loc) · 1.82 KB
/
print_end.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
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script - please customise for your slicer of choice
gcode:
# safe anti-stringing move coords
{% set th = printer.toolhead %}
{% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %}
{% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %}
{% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %}
SAVE_GCODE_STATE NAME=STATE_PRINT_END
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-15.0 F1800 ; retract filament
TURN_OFF_HEATERS
LIGHTS_OFF
G90 ; absolute positioning
G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing
G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear
G90
G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear
M107 ; turn off fan
BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END
{% if printer.heater_bed.temperature >= 80 %}
SET_FAN_SPEED FAN=Exhaust SPEED=1
M106 S255
set_nozzle_leds_off
SET_LED_EFFECT EFFECT=print_done
RESPOND MSG="Part cooling: 5 minutes"
G4 P60000
RESPOND MSG="Part cooling: 4 minutes"
G4 P60000
RESPOND MSG="Part cooling: 3 minutes"
G4 P60000
RESPOND MSG="Part cooling: 2 minutes"
G4 P60000
RESPOND MSG="Part cooling: 1 minute"
G4 P30000
RESPOND MSG="Part cooling: 30 seconds"
G4 P30000
{% endif %}
SET_FAN_SPEED FAN=Nevermore SPEED=0
SET_FAN_SPEED FAN=Exhaust SPEED=0
M106 S0
RESPOND MSG="Print finished!"
LIGHTS_OUT