-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.cfg
59 lines (57 loc) · 1.7 KB
/
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
51
52
53
54
55
56
57
58
59
[gcode_macro PRIME_NOZZLE]
gcode:
SAVE_GCODE_STATE NAME=PRIME_NOZZLE_STATE
M117 Priming
G90 ; Absolute coordinates.
M83 ; Relative extruder mode.
G92 E0
; Move to start of line.
G1 Z10 F900
G1 Y30 X3 F18000
G1 Z0.2 F900
; Print the line.
G1 X2.1 Y40 Z0.3 F5000.0 ; move to start-line position
G1 X2.1 Y200.0 Z0.3 F1500.0 E15 ; draw 1st line
G1 X2.4 Y200.0 Z0.3 F5000.0 ; move to side a little
G1 X2.4 Y40 Z0.3 F1500.0 E30 ; draw 2nd line
; G1 E27 F3000 ; retract filament 3mm
G92 E0 ; reset extruder
RESTORE_GCODE_STATE NAME=PRIME_NOZZLE_STATE
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200)|float %}
# Start bed heating
M104 S{EXTRUDER_TEMP}
M140 S{BED_TEMP}
# Use absolute coordinates
G90
# Reset the G-Code Z offset (adjust Z offset if needed)
SET_GCODE_OFFSET Z=0
# Home the printer
G28
# Move the nozzle very close to the bed - changed from 0.15 to 20mm to move away from bed
G1 Z20 F300
# Load default bed mesh
BED_MESH_PROFILE LOAD="default"
# Wait for bed to reach temperature
M190 S{BED_TEMP}
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}
PRIME_NOZZLE
M117 Printing
[gcode_macro END_PRINT]
gcode:
# Turn off bed, extruder, and fan
G92 E0
G1 E-3 F600; retract filament slightly
M140 S0
M104 S0
G91 ; relative movements
G1 F150 ; slow Z rate
G1 Z5 ; Z up 5mm
G90
G1 X0 Y200 F1000 ; prepare for part removal
M84 ; disable motors
M106 S0 ; turn off fan
M117 Print Complete