-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmacros.cfg
139 lines (118 loc) · 3.75 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
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
[gcode_macro START_PRINT]
default_parameter_BED_TEMP: 65
default_parameter_EXTRUDER_TEMP: 215
gcode:
CLEAR_PAUSE
M140 S{BED_TEMP}
G28 ; home printer
G1 ; set units to millimeters2
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
M190 S{BED_TEMP}
SCREWS_TILT_CALCULATE
SET_GCODE_OFFSET Z=-0.10
BED_MESH_PROFILE LOAD={BED_TEMP}
G28 Z ; re-home z after loading mesh profile
G1 X10 Y30 Z5 F3000 ; move to bottom left corner
G1 Z1 F300 ; position head above bed
G92 E0 ; reset extruder
M109 S{EXTRUDER_TEMP}
DRAW_LINE SPEED=1800
[gcode_macro DRAW_LINE]
default_parameter_SPEED: 900
gcode:
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
G1 X10.1 Y20 Z0.28 F{SPEED} ;Move to start position
G1 X10.1 Y200.0 Z0.28 F{SPEED} E15 ;Draw the first line
G1 X10.4 Y200.0 Z0.28 F{SPEED} ;Move to side a little
G1 X10.4 Y20 Z0.28 F{SPEED}.0 E30 ;Draw the second line
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
[gcode_macro SCREWS_TILT]
gcode:
SCREWS_TILT_CALCULATE
[gcode_macro G28_Z]
gcode:
G28 Z
[gcode_macro DISABLE_EXTRUDER]
gcode:
SET_STEPPER_ENABLE STEPPER=extruder ENABLE=0
[gcode_macro ADD_BED_MESH]
default_parameter_TARGET_TEMP: 65
gcode:
M140 S{TARGET_TEMP} # Wait for the bed to hit TARGET_TEMP
G28 #remove line if you ran G28 before starting this macro
M190 S{TARGET_TEMP} # Wait for the bed to hit TARGET_TEMP
BED_MESH_CALIBRATE
BED_MESH_PROFILE SAVE={TARGET_TEMP}
SAVE_CONFIG
[gcode_macro Disable_XY_Steppers]
gcode:
SET_STEPPER_ENABLE STEPPER=stepper_x ENABLE=0
SET_STEPPER_ENABLE STEPPER=stepper_y ENABLE=0
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
M220 S100 ; Reset Speed factor override percentage to default (100%)
M221 S100 ; Reset Extrude factor override percentage to default (100%)
G91 ; Set coordinates to relative
{% if printer.extruder.temperature >= 170 %}
G1 F1800 E-1 ; Retract filament 3 mm to prevent oozing
{% endif %}
;if all axis are homed, lift the hotend to leave room for hot filament to ooze and to keep it clear of the bed.
{% if printer.toolhead.homed_axes == "xyz" %}
G1 F6000 Z10 ; Move Z Axis up 10 mm to allow filament ooze freely
G90 ; Set coordinates to absolute
G1 X10 Y221 F1000 ; Move Printer Head Out of Way
; M84 ; Disable stepper motors - don't so the gantry stays aligned
{% endif %}
;set part fan speed to zero.
M106 S0
;bed and hotend are left at the print temps in case I want to restart.
CLEAR_PAUSE
BASE_CANCEL_PRINT
[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 %}
{action_respond_info("Saving was requested - saving and restarting now")}
SAVE_CONFIG
{% endif %}
[gcode_macro CLEAN_NOZZLE]
gcode:
M104 S245
{% if printer.toolhead.homed_axes != "xyz" %}
G28
{% endif %}
G1 X150 Y150 Z150
[gcode_macro END_PRINT]
gcode:
# Set LEDs to Green for completion
#SET_LED LED=my_neopixel RED=0.0 GREEN=1.0 BLUE=0.0
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
# Move nozzle away from print while retracting
G91 ;releative positioning
G1 X-2 Y-2 E-0.8 F300
# Raise nozzle by 10mm
G1 Z10 F3000
G90 ; Absolute Positioning
G1 X0 Y295 ;Present print
# Disable steppers
# M84 ; don't so the gantry doesn't go out of alignment
SAVE_IF_SET
# Set LEDs to white for illumination
#SET_LED LED=my_neopixel RED=1.0 GREEN=1.0 BLUE=1.0
#SET_SKEW CLEAR=1
[gcode_macro SDCARD_RESET]
gcode:
SDCARD_RESET_FILE
[pause_resume]
recover_velocity: 50
[display_status]