-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmacros.cfg
More file actions
167 lines (150 loc) · 5.01 KB
/
macros.cfg
File metadata and controls
167 lines (150 loc) · 5.01 KB
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
# Conditional G28
[gcode_macro CG28]
gcode:
{% if printer.toolhead.homed_axes != "xyz" %}
G28
{% endif %}
[gcode_macro G32]
gcode:
BED_MESH_CLEAR
QUAD_GANTRY_LEVEL
[gcode_macro PRINT_START]
gcode:
M117 Heating...
M140 S{BED} ; set bed final temp
M104 S{EXTRUDER} ; set extruder final temp
M190 S{BED} ; wait for bed final temp
M109 S{EXTRUDER} ; wait for extruder final temp
G28
Attach_Probe_Lock
M117 Quad Gantry Leveling...
G32
M117 Parking...
Park_Toolhead
M117 Calibrating Z Offset
CALIBRATE_Z
G92 E0 ; reset extruder
Dock_Probe_Unlock
PURGE_LINE
M117 Printing...
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script - please customise for your slicer of choice
gcode:
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-4.0 F3600 ; retract filament
G91 ; relative positioning
# Get Boundaries fro Z
{% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
{% if printer.toolhead.position.z < (max_z - 2) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - printer.toolhead.position.z %}
{% endif %}
G0 Z{z_safe} F3600 ; move nozzle up
G90 ; absolute positioning
G0 X110 Y110 ; move nozzle to remove stringing
TURN_OFF_HEATERS
M107 ; turn off fan
M117 Print Done! :)
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
default_parameter_X: 100 #edit to your park position
default_parameter_Y: 100 #edit to your park position
default_parameter_Z: 10 #edit to your park position
default_parameter_E: 1 #edit to your retract length
gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
{% if printer.extruder.temperature > 180 %}
G1 E-{E} F2100
{% endif %}
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
[gcode_macro RESUME]
rename_existing: BASE_RESUME
default_parameter_E: 1 #edit to your retract length
gcode:
G91
G1 E{E} F2100
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
PRINT_END
BASE_CANCEL_PRINT
[gcode_macro LED_ON]
gcode:
white
[gcode_macro PURGE_LINE]
# A purge line on the left of the bed to prime the extruder
gcode:
G92 E0 ; zero/reset extruder
G1 X2.2 Y5 Z0.3 F18000 ; move to start position
G1 E+15 F150 ; extrude to put the pressure (-20 from purge macro)
G92 E0
G1 X2.2 Y100 Z0.25 F1500 E10 ; extrude the first line
G1 X2.5 Y100 Z0.3 F18000 ; move to side a little
G1 X2.5 Y5 Z0.25 F1500.0 E20 ; extrude the second line
G92 E0 ; zero/reset extruder
G1 Z2.0 E-0.1 F3000 ; move nozzle up and retract tiny bit
G92 E0
# Park bed for heatsoaking
[gcode_macro PARK]
default_parameter_FORCE: 0
gcode:
{% if printer.idle_timeout.state != "Printing" or FORCE|int == 1 %}
CG28 ; Home if not already homed
SAVE_GCODE_STATE NAME=PARK
G90 ; absolute positioning
G0 X60 Y60 Z30 F5000 ; Move to position
RESTORE_GCODE_STATE NAME=PARK
{% else %}
{ action_respond_info("PARK disabled while printing!") }
{% endif %}
# Park front for maintenance / cleaning
[gcode_macro PARKFRONT]
gcode:
{% if printer.idle_timeout.state != "Printing" %}
CG28 ; Home if not already homed
SAVE_GCODE_STATE NAME=PARKFRONT
G90 ; absolute coords
G1 Z60 X60 Y5 F5000 ; Move to position
RESTORE_GCODE_STATE NAME=PARKFRONT
{% else %}
{ action_respond_info("PARKFRONT disabled while printing!") }
{% endif %}
[gcode_macro LOAD]
gcode:
SAVE_GCODE_STATE NAME=LOAD
G91
G1 E82 F900
RESTORE_GCODE_STATE NAME=LOAD
SET_IDLE_TIMEOUT TIMEOUT=7200
[force_move]
enable_force_move: True
# Park Toolhead Routine
[gcode_macro Park_Toolhead]
gcode:
G1 X60 Y60 Z30 F18000
[gcode_macro HEAT_SOAK]
gcode:
{% set bed_temp = params.BED_TEMP|default(60)|float %}
{% set soak_time = params.SOAK_TIME|default(1000*60*15)|int %}
CG28 ; Home the printer
G90 ; Use absolute coordinates
M117 Heating..
#_HEATER_ON
M106 S255 ; set print fan to full speed
M140 S{bed_temp} ; Start bed heating
M190 S{bed_temp} ; Wait for bed to reach temperature
M117 Heat Soaking
G4 P{soak_time} ; Do the soak
M117 Heat Soak Done