-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
demon_prepare_menu_v1.2.cfg
242 lines (169 loc) · 8.02 KB
/
demon_prepare_menu_v1.2.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
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
###################################################
#######>>>>>>>>>> 3DPrintDemon <<<<<<<<<<<#######
####### https://github.com/3DPrintDemon #######
# IF YOU USE & LIKE THESE MACROS PLEASE CONSIDER SUPPORTING MY EFFORTS AT
# https://ko-fi.com/3dprintdemon
# NOTE: The load_clean, unload_clean & clean_nozzle macros are in the demon_clean_load.cfg file
# NOTE: See included demon_instructions.md file for copy/paste lines for your Klipperscreen.conf file to create the Prepare menu
[gcode_macro Ready_UP_PLA]
description: Ready the printer for printing PLA
gcode:
{% set clean_vars = printer["gcode_macro _CLEAN_VARIABLES"] %}
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
{% if printer.print_stats.state != "standby" %}
RESPOND TYPE=error MSG="Request denied, current printer state not Standby"
{% else %}
{% if start_vars.neopixel_led == True %}
STATUS_HEATING
{% endif %}
{% if start_vars.chamber_fan == True or start_vars.chamber_sensor == True %}
SET_TEMPERATURE_FAN_TARGET TEMPERATURE_FAN=chamber TARGET=28
{% endif %}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={clean_vars.ready_up_pla_bed}
M109 S{clean_vars.ready_up_pla_noz}
_CONDITIONAL_HOME
_CONDITIONAL_CLEAN
{% endif %}
[gcode_macro Ready_UP_ASA]
description: Ready the printer for printing ASA
gcode:
{% set clean_vars = printer["gcode_macro _CLEAN_VARIABLES"] %}
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
{% if printer.print_stats.state != "standby" %}
RESPOND TYPE=error MSG="Request denied, current printer state not Standby"
{% else %}
{% if start_vars.neopixel_led == True %}
STATUS_HEATING
{% endif %}
{% if start_vars.chamber_fan == True or start_vars.chamber_sensor == True %}
SET_TEMPERATURE_FAN_TARGET TEMPERATURE_FAN=chamber TARGET=55
{% endif %}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={clean_vars.ready_up_asa_bed}
M109 S{clean_vars.ready_up_asa_noz}
_CONDITIONAL_HOME
_CONDITIONAL_CLEAN
{% endif %}
[gcode_macro Ready_UP_PETG]
description: Ready the printer for printing PETG
gcode:
{% set clean_vars = printer["gcode_macro _CLEAN_VARIABLES"] %}
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
{% if printer.print_stats.state != "standby" %}
RESPOND TYPE=error MSG="Request denied, current printer state not Standby"
{% else %}
{% if start_vars.neopixel_led == True %}
STATUS_HEATING
{% endif %}
{% if start_vars.chamber_fan == True or start_vars.chamber_sensor == True %}
SET_TEMPERATURE_FAN_TARGET TEMPERATURE_FAN=chamber TARGET=28
{% endif %}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={clean_vars.ready_up_petg_bed}
M109 S{clean_vars.ready_up_petg_noz}
_CONDITIONAL_HOME
_CONDITIONAL_CLEAN
{% endif %}
[gcode_macro Ready_UP_TPU]
description: Ready the printer for printing TPU
gcode:
{% set clean_vars = printer["gcode_macro _CLEAN_VARIABLES"] %}
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
{% if printer.print_stats.state != "standby" %}
RESPOND TYPE=error MSG="Request denied, current printer state not Standby"
{% else %}
{% if start_vars.neopixel_led == True %}
STATUS_HEATING
{% endif %}
{% if start_vars.chamber_fan == True or start_vars.chamber_sensor == True %}
SET_TEMPERATURE_FAN_TARGET TEMPERATURE_FAN=chamber TARGET=28
{% endif %}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={clean_vars.ready_up_tpu_bed}
M109 S{clean_vars.ready_up_tpu_noz}
_CONDITIONAL_HOME
_CONDITIONAL_CLEAN
{% endif %}
[gcode_macro Ready_UP_CUSTOM]
description: Ready the printer for printing with your settings
gcode:
{% set clean_vars = printer["gcode_macro _CLEAN_VARIABLES"] %}
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
{% set noz = params.NOZZLE|default(160)|int %}
{% set bed = params.BED|default(60)|int %}
{% set chamber = params.CHAMBER_FAN|default(50)|int %}
{% set timeout = params.IDLE_TIMEOUT_MINUTES|default(60)|int %}
{% set park = params.PARK_OVER_BED|default('Yes')|string %}
{% if printer.print_stats.state != "standby" %}
RESPOND TYPE=error MSG="Request denied, current printer state not Standby"
{% else %}
{% if start_vars.neopixel_led == True %}
STATUS_HEATING
{% endif %}
SET_IDLE_TIMEOUT TIMEOUT={timeout * 60}
{% if start_vars.chamber_fan == True or start_vars.chamber_sensor == True %}
SET_TEMPERATURE_FAN_TARGET TEMPERATURE_FAN=chamber TARGET={chamber}
{% endif %}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bed}
M109 S{noz}
_CONDITIONAL_HOME
_CONDITIONAL_CLEAN
{% if park in ['Yes', 'yes', 'True', 'true']|string %}
_Z_PARK
{% endif %}
{% endif %}
[gcode_macro HEATSOAK_TOGGLE]
description: Toggle the PRINT_START Heatsoaks on & off with each click of this button! State must be set BEFORE you start a print!
gcode:
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
{% if start_vars.start_my_print_already == False %}
RESPOND TYPE=error MSG="PRINT_START HEATSOAKS WILL NOW BE SKIPPED!"
SET_GCODE_VARIABLE MACRO=_START_VARIABLES VARIABLE=start_my_print_already VALUE=True
{% elif start_vars.start_my_print_already == True %}
RESPOND TYPE=error MSG="PRINT_START HEATSOAKS ARE NOW ACTIVE!"
SET_GCODE_VARIABLE MACRO=_START_VARIABLES VARIABLE=start_my_print_already VALUE=False
{% endif %}
[gcode_macro PRESENT_TOOLHEAD]
description: Moves the toolhead to a position for easy access & maintance
gcode:
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
{% set x_present = printer.toolhead.axis_maximum.x|float / 2 %}
{% set y_present = printer.toolhead.axis_minimum.y|float + 25 %}
{% set z_present = printer.toolhead.axis_maximum.z|float / 2 %}
{% if printer.print_stats.state != "standby" %}
RESPOND TYPE=error MSG="Present Toolhead request denied, current printer state not Standby"
{% else %}
_CONDITIONAL_HOME
{% if start_vars.present_use_default == True %}
G0 X{x_present} Y{y_present} Z{z_present} F{start_vars.present_speed * 60}
{% else %}
{% if start_vars.present_toolhead_z|float < printer.toolhead.axis_maximum.z|float - 35 and
start_vars.present_toolhead_z|float > printer.toolhead.axis_minimum.z|float + 5 %}
G0 X{start_vars.present_toolhead_x} Y{start_vars.present_toolhead_y} Z{start_vars.present_toolhead_z} F{start_vars.present_speed * 60}
{% else %}
RESPOND TYPE=error MSG="Present Toolhead request denied, present_toolhead_z variable set not in accepted range. Please set above 5mm & 35mm less than max Z in the demon_user_settings file."
{% endif %}
{% endif %}
{% if start_vars.neopixel_led == True %}
STATUS_READY
{% endif %}
_SAVE
{% endif %}
[gcode_macro STOW_TOOLHEAD]
description: Stows the toolhead back to a parking position. Uses the clean_vars.park_x/y/z variables in the demon_user_settings file!
gcode:
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
{% if printer.print_stats.state != "standby" %}
RESPOND TYPE=error MSG="Stow Toolhead request denied, current printer state not Standby"
{% else %}
{% if start_vars.stow_toolhead_z in range (5, 51) %}
_CONDITIONAL_HOME
G0 X{start_vars.stow_toolhead_x|float} Y{start_vars.stow_toolhead_y|float} Z{start_vars.stow_toolhead_z|int} F{start_vars.stow_speed|int * 60}
{% if start_vars.neopixel_led == True %}
STATUS_READY
{% endif %}
_SAVE
{% else %}
RESPOND TYPE=error MSG="Stow Toolhead request denied, stow_toolhead_z variable not in accepted range. Please set between 5-50mm in the demon_user_settings file."
{% endif %}
{% endif %}
[gcode_macro _PREPARE_MENU_VERSION]
variable_demon_prepare_menu: 1.2
gcode: