forked from Rat-OS/RatOS-configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.cfg
78 lines (70 loc) · 2.3 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# WARNING: DO NOT EDIT OR INCLUDE THIS FILE. THIS IS A TEMPLATE.
# To change your macros, check the root macros.cfg file.
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
default_parameter_Z: 10
default_parameter_E: 0.6
gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-{E} F2100
G1 Z{Z}
G90
G1 X{printer.toolhead.axis_maximum.x / 2} Y{printer.toolhead.axis_maximum.y} F6000
[gcode_macro RESUME]
rename_existing: BASE_RESUME
default_parameter_E: 0.6
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:
END_PRINT
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
# Filament management
[gcode_macro UNLOAD_FILAMENT]
gcode:
SAVE_GCODE_STATE NAME=unload_state
G91 ;relative positioning
M117 Heating...
M109 S{params.TEMP|default(220, true)} ; Heat up hotend to provided temp or 220 as default as that should work OK with most filaments.
M117 Unloading filament...
G0 E-5 F3600 ;extract filament to cold end area
G4 P3000 ;wait for three seconds
G0 E5 F3600 ;push back the filament to smash any stringing
G0 E-15 F3600 ;Extract back fast in the cold zone
G0 E-130 F300 ;Continue extraction slowly, allow the filament time to cool solid before it reaches the gears
M117 Filament unloaded!
RESTORE_GCODE_STATE NAME=unload_state
[gcode_macro LOAD_FILAMENT]
gcode:
SAVE_GCODE_STATE NAME=load_state
G91 ;relative positioning
M117 Heating...
M109 S{params.TEMP|default(220, true)} ; Heat up hotend to provided temp or 220 as default as that should work OK with most filaments.
M117 Loading filament...
G0 E100 F600 ; Load the filament into the hotend area.
G4 P1000
G0 E40 F100 ; Purge
M400
M117 Filament loaded!
RESTORE_GCODE_STATE NAME=load_state
[gcode_macro PRIME_LINE]
gcode:
G1 Z5 F3000 ; lift
G1 X5 Y10 F12000 ; move to prime
G1 Z0.3 F3000 ; get ready to prime
G92 E0 ; reset extrusion distance
G1 Y80 E16 F1200 ; prime nozzle
G1 Y100 F15000 ; quick wipe
[gcode_macro SET_CENTER_KINEMATIC_POSITION]
gcode:
SET_KINEMATIC_POSITION X={printer.toolhead.axis_maximum.x / 2} Y={printer.toolhead.axis_maximum.y / 2} Z={printer.toolhead.axis_maximum.z / 2}