-
Notifications
You must be signed in to change notification settings - Fork 0
/
006_post_macros.cfg
50 lines (44 loc) · 1.23 KB
/
006_post_macros.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
# post print macros
# Print End
# Called when print is finished
[gcode_macro PRINT_END]
gcode:
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
{% if printer[printer.toolhead.extruder].target > 220 %}
G1 E-5.0 F3600 ; retract filament PETG
{% else %}
G1 E-1.0 F3600 ; retract filament PLA
{% endif %}
G91 ; relative positioning
G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing
TURN_OFF_HEATERS
M107 ; turn off fan
G1 Z4 F3000 ; move nozzle up 2mm
G90 ; absolute positioning
G0 X220 Y220 F3600 ; park nozzle at rear
PRESENT_PRINT
# Present Print
# Called to move the bed down to 150mm
# or down 2mm depending on current Z value
[gcode_macro PRESENT_PRINT]
gcode:
M117 Presenting Print
{% if printer.toolhead.position.z < 148 %}
G90
G1 Z150
{% else %}
G91
G1 Z5
G90
{% endif %}
[gcode_macro SAVE_AT_END]
variable_save: 0
gcode:
SET_GCODE_VARIABLE MACRO=SAVE_AT_END VARIABLE=save VALUE=1
[gcode_macro SAVE_IF_SET]
gcode:
{% if printer["gcode_macro SAVE_AT_END"].save == 1 %}
{printer.gcode.action_respond_info("Saving was requested - saving and restarting now")}
SAVE_CONFIG
{% endif %}