-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
demon_setup_helpers_v1.5.cfg
401 lines (298 loc) · 13.3 KB
/
demon_setup_helpers_v1.5.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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
###################################################
#######>>>>>>>>>> 3DPrintDemon <<<<<<<<<<<#######
####### https://github.com/3DPrintDemon #######
# IF YOU USE & LIKE THESE MACROS PLEASE CONSIDER SUPPORTING MY EFFORTS AT
# https://www.https://ko-fi.com/3dprintdemon
# Heres some super basic but quality of life improving macros for your Klipper printer from your friendly 3DPrintDemon!
# www.3dprintdemon.com
# they're ideal if you're just starting out or just hate typing console commands!
# If you have Klipperscreen some of these functions will be included there, so you can either delete or comment out the ones you dont want here.
# Or you can simply hide the macros you dont want in the Macros browser interface settings window.
# !!!!!IMPORTANT!!!!!
# To get this to work copy & paste the line directly below into your printer.cfg file & save....
# [include demon_essentials.cfg]
# NOTE: remove the "#" at the beginning to enable the line once it is pasted into your printer.cfg file
# Pressure_Advance_Test_Mode
# Automatically sets the printer up ready to calibrate your pressure advance.
# Hit this macro then print the file linked here: https://www.klipper3d.org/prints/square_tower.stl
# further reference to work out your resut here: https://www.klipper3d.org/Pressure_Advance.html
# NOTE: Pressure Advance must be enabled in your system's Extruder section
# Stepper_Buzz_Cycle
# Will give you a guided test of all your motors by buzzing them 1mm to the positive side then back again, if any go negative (to home) then reverse
# their direction by placing a "!" in front of the "Dir" pin for that stepper.
# watch the status window for messages & countdown to which stepper is up next!
# NOTE: If you only have 4 drivers on your system you will need to comment out the line to test stepper_z1
# NOTE: It will NOT test your Extruder - you will have to do that manually
# Use "STEPPER_BUZZ STEPPER=extruder" & be sure to have the nozzle hot for this!
# Printer_PID_Tune
# This will setup & run a full PID tune on your printer with a single click of the macro button.
# It will home your printer, raise the nozzle 50mm, start the parts cooling fan to 50% & heat the printer to full printing temperature.
# Then it will run the hotend PID tune test. Once compteted it shut off the parts cooling fan & start the Bed PID tune.
# NOTE: The FULL hotend & bed PID tune takes a long time! Please wait for it to complete, messages will keep you informed of the systems progress!
# NOTE: You MUST use the SAVE_CONFIG command manually after both tests have completed in the Console or the button at the top of the browser window to save the new values or they will be lost!!
# Auto_Shaper_X
# This will run the input shaping auto calibration of the X axis
# Auto_Shaper_Y
# This will run the input shaping auto calibration of the Y axis
[gcode_macro EDDY_TEMP_COMP]
description: Run the BTT Eddy thermal compensation routine. FOR USB EDDY ONLY!
gcode:
_CONDITIONAL_HOME
Z_PARK
G0 Z5
SET_IDLE_TIMEOUT TIMEOUT=36000
TEMPERATURE_PROBE_CALIBRATE PROBE=btt_eddy TARGET=56 STEP=4
[gcode_macro Pressure_Advance_Test_Mode]
description: Automate the standard Klipper settings for testing PA. Click to ready & then print the Klipper PA test. DO NOT USE FOR ORCA SLICER PA TEST FILE!
gcode:
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
_CONDITIONAL_HOME
M117 PRESSURE ADVANCE TEST MODE ACTIVE! NOT FOR ORCA TEST
M118 PRESSURE ADVANCE TEST MODE ACTIVE! NOT FOR ORCA TEST
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500
TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005 # DIRECT DRIVE
SET_DISPLAY_TEXT MSG="The KLIPPER pressure_advance value can then be calculated as pressure_advance = start +(plus) measured_height x(multiply) factor. For example, 0 +(plus) 12.90 x(multiply) .005 would be .258 THIS IS NOT FOR ORCA TEST"
RESPOND TYPE=echo MSG="The KLIPPER pressure_advance value can then be calculated as pressure_advance = start +(plus) measured_height x(multiply) factor. For example, 0 +(plus) 12.90 x(multiply) .005 would be .258 THIS IS NOT FOR ORCA TEST"
[gcode_macro Stepper_Buzz_Cycle]
description: Run a full system or partial system stepper_buzz on each motor one after the other to check setup. Motors always move in a positive direction first then return.
gcode:
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
{% set buzzX = params.X_BUZZ|default('Yes')|string %}
{% set buzzY = params.Y_BUZZ|default('Yes')|string %}
{% set buzzZ = params.Z_BUZZ|default('Yes')|string %}
{% set buzzZone = params.Z1_BUZZ|default('Yes')|string %}
{% set buzzZtwo = params.Z2_BUZZ|default('Yes')|string %}
{% set buzzZthree = params.Z3_BUZZ|default('Yes')|string %}
{% if buzzX not in ['Yes', 'yes', 'True', 'true']|string and buzzY not in ['Yes', 'yes', 'True', 'true']|string and buzzZ not in ['Yes', 'yes',
'True', 'true']|string and buzzZone not in ['Yes', 'yes', 'True', 'true']|string and buzzZtwo not in ['Yes', 'yes', 'True', 'true']|string and buzzZthree not in ['Yes', 'yes', 'True', 'true']|string %}
{ action_raise_error("No buzz specified, operation cancelled") }
{% endif %}
{% if start_vars.neopixel_led == True %}
STATUS_BUSY
{% endif %}
{% if buzzX in ['Yes', 'yes', 'True', 'true']|string %}
M117 Stepper X Buzz Cycle in 10 Seconds!
M118 Stepper X Buzz Cycle in 10 Seconds!
G4 P5000
M117 5 Seconds!
M118 5 Seconds!
G4 P3000
M117 Stepper X! READY GO!
M118 Stepper X! READY GO!
G4 P2000
STEPPER_BUZZ STEPPER=stepper_x
M400
{% elif buzzX in ['No', 'no', 'False', 'false']|string %}
RESPOND TYPE=COMMAND MSG="X_BUZZ skipped"
{% else %}
RESPOND TYPE=error MSG="X_BUZZ skipped. User input not recognised! Please use yes/no or true/false"
{% endif %}
{% if buzzY in ['Yes', 'yes', 'True', 'true']|string %}
M117 Stepper Y Buzz Cycle in 10 Seconds
M118 Stepper Y Buzz Cycle in 10 Seconds
G4 P5000
M117 5 Seconds!
M118 5 Seconds!
G4 P3000
M117 Stepper Y! READY GO!
M118 Stepper Y! READY GO!
G4 P2000
STEPPER_BUZZ STEPPER=stepper_y
M400
{% elif buzzY in ['No', 'no', 'False', 'false']|string %}
RESPOND TYPE=COMMAND MSG="Y_BUZZ skipped"
{% else %}
RESPOND TYPE=error MSG="Y_BUZZ skipped. User input not recognised! Please use yes/no or true/false"
{% endif %}
{% if buzzZ in ['Yes', 'yes', 'True', 'true']|string %}
M117 Stepper Z Buzz Cycle in 10 Seconds
M118 Stepper Z Buzz Cycle in 10 Seconds
G4 P5000
M117 5 Seconds!
M118 5 Seconds!
G4 P3000
M117 Stepper Z! READY GO!
M118 Stepper Z! READY GO!
G4 P2000
STEPPER_BUZZ STEPPER=stepper_z
M400
{% elif buzzZ in ['No', 'no', 'False', 'false']|string %}
RESPOND TYPE=COMMAND MSG="Z_BUZZ skipped"
{% else %}
RESPOND TYPE=error MSG="Z_BUZZ skipped. User input not recognised! Please use yes/no or true/false"
{% endif %}
{% if buzzZone in ['Yes', 'yes', 'True', 'true']|string %}
{% if ('stepper_z1' in printer.configfile.config) %}
M117 Stepper Z1 Buzz Cycle in 10 Seconds
M118 Stepper Z1 Buzz Cycle in 10 Seconds
G4 P5000
M117 5 Seconds!
M118 5 Seconds!
G4 P3000
M117 Stepper Z1! READY GO!
M118 Stepper Z1! READY GO!
G4 P2000
STEPPER_BUZZ STEPPER=stepper_z1
M400
{% else %}
M118 Stepper Z1 is not available to this system
{% endif %}
{% elif buzzZone in ['No', 'no', 'False', 'false']|string %}
RESPOND TYPE=COMMAND MSG="Z1_BUZZ skipped"
{% else %}
RESPOND TYPE=error MSG="Z1_BUZZ skipped. User input not recognised! Please use yes/no or true/false"
{% endif %}
{% if buzzZtwo in ['Yes', 'yes', 'True', 'true']|string %}
{% if ('stepper_z2' in printer.configfile.config) %}
M117 Stepper Z2 Buzz Cycle in 10 Seconds
M118 Stepper Z2 Buzz Cycle in 10 Seconds
G4 P5000
M117 5 Seconds!
M118 5 Seconds!
G4 P3000
M117 Stepper Z2! READY GO!
M118 Stepper Z2! READY GO!
G4 P2000
STEPPER_BUZZ STEPPER=stepper_z2
M400
{% else %}
M118 Stepper Z2 is not available to this system
{% endif %}
{% elif buzzZtwo in ['No', 'no', 'False', 'false']|string %}
RESPOND TYPE=COMMAND MSG="Z2_BUZZ skipped"
{% else %}
RESPOND TYPE=error MSG="Z2_BUZZ skipped. User input not recognised! Please use yes/no or true/false"
{% endif %}
{% if buzzZthree in ['Yes', 'yes', 'True', 'true']|string %}
{% if ('stepper_z3' in printer.configfile.config) %}
M117 Stepper Z3 Buzz Cycle in 10 Seconds
M118 Stepper Z2 Buzz Cycle in 10 Seconds
G4 P5000
M117 5 Seconds!
M118 5 Seconds!
G4 P3000
M117 Stepper Z3! READY GO!
M118 Stepper Z3! READY GO!
G4 P2000
STEPPER_BUZZ STEPPER=stepper_z3
M400
{% else %}
M118 Stepper Z3 is not available to this system
{% endif %}
{% elif buzzZthree in ['No', 'no', 'False', 'false']|string %}
RESPOND TYPE=COMMAND MSG="Z3_BUZZ skipped"
{% else %}
RESPOND TYPE=error MSG="Z3_BUZZ skipped. User input not recognised! Please use yes/no or true/false"
{% endif %}
M117 CYCLE COMPLETE!
M118 CYCLE COMPLETE!
G4 P6000
M117
{% if start_vars.neopixel_led == True %}
STATUS_READY
{% endif %}
[gcode_macro PID_Tune_Mode]
description: Activates PID tests for the hotend & bed. Choose which to run! Macro auto saves after test. Long test!
gcode:
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
{% set noz_temp = params.NOZZLE_TARGET|default(200)|float %} #<<<<<<<<<<<<<<<<<<< Edit default nozzle test temp (200)
{% set bed_temp = params.BED_TARGET|default(60)|float %} #<<<<<<<<<<<<<<<<<<<< Edit default bed test temp (60)
{% set pid_noz = params.PID_NOZ|default('Yes')|string %}
{% set pid_bed = params.PID_BED|default('Yes')|string %}
{% set x_park = printer.toolhead.axis_maximum.x|float / 2 %}
{% set y_park = printer.toolhead.axis_maximum.y|float / 2 %}
##################################################################
{% if pid_noz not in ['Yes', 'yes', 'True', 'true']|string and pid_noz not in ['Yes', 'yes', 'True', 'true']|string %}
{ action_raise_error("No PID specified, operation cancelled") }
{% endif %}
{% if start_vars.neopixel_led == True %}
STATUS_BUSY
{% endif %}
G90 # Use absoulte coordinates
M117 PID Tune Mode! Long Test!
M118 PID Tune Mode! Long Test!
_CONDITIONAL_HOME
M400
{% if pid_noz in ['Yes', 'yes', 'True', 'true']|string %}
G0 X{x_park} Y{y_park} Z5 F9000 # Goes to center of the bed
M106 S155
{% if start_vars.neopixel_led == True %}
STATUS_HEATING
{% endif %}
M117 EXTRUDER PID TUNE! PLEASE WAIT!
M118 EXTRUDER PID TUNE! PLEASE WAIT!
PID_CALIBRATE HEATER=extruder TARGET={noz_temp}
M400
M106 S0
{% if start_vars.neopixel_led == True %}
STATUS_BUSY
{% endif %}
{% endif %}
{% if pid_bed in ['Yes', 'yes', 'True', 'true']|string %}
M117 EXTRUDER TEST END! DONT SAVE YET!!
M118 EXTRUDER TEST END! DONT SAVE YET!!
G4 P10000
G0 Z50 F9000
{% if start_vars.neopixel_led == True %}
STATUS_HEATING
{% endif %}
M117 HEAT BED PID TUNE! LONG TEST PLEASE WAIT!
M118 HEAT BED PID TUNE! LONG TEST PLEASE WAIT!
PID_CALIBRATE HEATER=heater_bed TARGET={bed_temp}
M400
{% if start_vars.neopixel_led == True %}
STATUS_BUSY
{% endif %}
M117 HEAT BED TEST END!
M118 HEAT BED TEST END!
{% endif %}
G4 P10000
M400
SET_DISPLAY_TEXT MSG="SAVING CONFIG PLEASE WAIT..."
RESPOND TYPE=echo MSG="SAVING CONFIG PLEASE WAIT..."
G4 P5000
SAVE_CONFIG
[gcode_macro Auto_Shaper_Calibrate]
description: Runs the auto shaper test for input shaping
gcode:
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
##################################################################
_CONDITIONAL_HOME
{% if start_vars.neopixel_led == True %}
STATUS_BUSY
{% endif %}
_Z_PARK # Goes to center of the bed
SHAPER_CALIBRATE
[gcode_macro Resonance_Test_X]
description: Runs the input shaper resonance test for the X axis
gcode:
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
_CONDITIONAL_HOME
{% if start_vars.neopixel_led == True %}
STATUS_BUSY
{% endif %}
M117 Testing X axis please wait...
TEST_RESONANCES AXIS=X
M117
{% if start_vars.neopixel_led == True %}
STATUS_READY
{% endif %}
M118 To build graph paste this message into your SSH terminal ............................................ ~/klipper/scripts/calibrate_shaper.py /tmp/resonances_x_*.csv -o /tmp/shaper_calibrate_x.png
[gcode_macro Resonance_Test_Y]
description: Runs the input shaper resonance test for the Y axis
gcode:
{% set start_vars = printer["gcode_macro _START_VARIABLES"] %}
_CONDITIONAL_HOME
{% if start_vars.neopixel_led == True %}
STATUS_BUSY
{% endif %}
M117 Testing Y axis please wait...
TEST_RESONANCES AXIS=Y
M117
{% if start_vars.neopixel_led == True %}
STATUS_READY
{% endif %}
M118 To build graph paste this message into your SSH terminal ............................................ ~/klipper/scripts/calibrate_shaper.py /tmp/resonances_y_*.csv -o /tmp/shaper_calibrate_y.png
[gcode_macro _SETUP_HELPERS_VERSION]
variable_demon_setup: 1.5
gcode: