-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.cfg
127 lines (108 loc) · 2.8 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
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
# Start bed heating
M140 S{BED_TEMP}
# Use absolute coordinates
G90
SET_GCODE_OFFSET Z=0.0
G28 X Y
Attach_Probe_Lock
STATUS_HEATING
# Wait for bed to reach temperature
M190 S{BED_TEMP}
G28 Z
QUAD_GANTRY_LEVEL
BED_MESH_CALIBRATE
Dock_Probe_Unlock
# Move the nozzle above purge bucket
G1 X140 Y308 Z5 F30000
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}
CLEAN_NOZZLE
STATUS_PRINTING
LINE_PURGE
[gcode_macro END_PRINT]
gcode:
STATUS_READY
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
# Move nozzle away from print while retracting
G91
G1 X-2 Y-2 E-3 F300
# Raise nozzle by 10mm
G1 Z20 F3000
G90
G1 X140 Y308 F3000
# Disable steppers
M84
[gcode_macro START_PA_TEST]
gcode:
{% set FACTOR = params.FACTOR|default(0.005)|float %}
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500
TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR={FACTOR}
[gcode_macro LOAD_FILAMENT]
gcode:
SAVE_GCODE_STATE NAME=__filament__load
M83
G1 E80 F500
RESTORE_GCODE_STATE NAME=__filament__load
[gcode_macro UNLOAD_FILAMENT]
gcode:
SAVE_GCODE_STATE NAME=__filament__unload
LOAD_FILAMENT
M83
G1 E-80 F500
RESTORE_GCODE_STATE NAME=__filament__unload
[gcode_macro BABYZ]
gcode:
{% set STEP = params.STEP|default(0.05)|float %}
SET_GCODE_OFFSET Z_ADJUST={STEP} MOVE=1
[gcode_macro BABYZ0_01]
gcode:
BABYZ STEP=0.01
[gcode_macro BABYZM0_01]
gcode:
BABYZ STEP=-0.01
[gcode_macro CASE_LIGHT_ON]
gcode:
SET_PIN PIN=caselight VALUE=1
[gcode_macro CASE_LIGHT_OFF]
gcode:
SET_PIN PIN=caselight VALUE=0
[gcode_macro ALL_LIGHTS_OFF]
gcode:
SET_PIN PIN=caselight VALUE=0
status_off
[gcode_macro SLOW_PURGE]
gcode:
SET_GCODE_VARIABLE MACRO=_KAMP_Settings VARIABLE=flow_rate VALUE=3
[gcode_macro FAST_PURGE]
gcode:
SET_GCODE_VARIABLE MACRO=_KAMP_Settings VARIABLE=flow_rate VALUE=12
[gcode_macro CLEAN_NOZZLE]
variable_start_x: 140
variable_start_y: 308
variable_start_z: 5
variable_wipe_dist: -48
variable_wipe_qty: 10
variable_wipe_spd: 300
variable_raise_distance: 10
gcode:
{% if "xyz" not in printer.toolhead.homed_axes %}
G28
{% endif %}
G90 ; absolute positioning
## Move nozzle to start position
G1 X{start_x} Y{start_y} F6000
G1 Z{start_z} F1500
## Wipe nozzle
{% for wipes in range(1, (wipe_qty + 1)) %}
G1 X{start_x + wipe_dist} F{wipe_spd * 60}
G1 X{start_x} F{wipe_spd * 60}
{% endfor %}
## Raise nozzle
G1 Z{raise_distance}