-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathguppy_cmd.cfg
110 lines (91 loc) · 3.85 KB
/
guppy_cmd.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
[gcode_shell_command guppy_input_shaper]
command: /usr/data/printer_data/config/GuppyScreen/scripts/calibrate_shaper.py
timeout: 600.0
verbose: True
[gcode_shell_command guppy_belts_calibration]
command: /usr/data/printer_data/config/GuppyScreen/scripts/graph_belts.py
timeout: 600.0
verbose: True
[calibrate_shaper_config]
[guppy_module_loader]
[respond]
default_type: echo
default_prefix:
[gcode_macro GUPPY_SHAPERS]
description: Shaper Tuning + Plot Generation
gcode:
{% set x_png = params.X_PNG|default("/usr/data/printer_data/config/resonances_x.png") %}
{% set y_png = params.Y_PNG|default("/usr/data/printer_data/config/resonances_y.png") %}
RESPOND TYPE=command MSG='Homing'
G28
RESPOND TYPE=command MSG='Testing X Resonances'
TEST_RESONANCES AXIS=X NAME=x
M400
RESPOND TYPE=command MSG='Generating X Plots'
RUN_SHELL_COMMAND CMD=guppy_input_shaper PARAMS="/tmp/resonances_x_x.csv -o {x_png}"
RESPOND TYPE=command MSG='Testing X Resonances'
TEST_RESONANCES AXIS=Y NAME=y
M400
RESPOND TYPE=command MSG='Generating Y Plots'
RUN_SHELL_COMMAND CMD=guppy_input_shaper PARAMS="/tmp/resonances_y_y.csv -o {y_png}"
[gcode_macro GUPPY_BELTS_SHAPER_CALIBRATION]
description: Perform a custom half-axis test to analyze and compare the frequency profiles of individual belts on CoreXY printers
gcode:
{% set min_freq = params.FREQ_START|default(5)|float %}
{% set max_freq = params.FREQ_END|default(133.33)|float %}
{% set hz_per_sec = params.HZ_PER_SEC|default(1)|float %}
{% set png_out_path = params.PNG_OUT_PATH|default("/usr/data/printer_data/config/belts_calibration.png") %}
{% set png_width = params.PNG_WIDTH|default(8)|float %}
{% set png_height = params.PNG_HEIGHT|default(4.8)|float %}
TEST_RESONANCES AXIS=1,1 OUTPUT=raw_data NAME=b FREQ_START={min_freq} FREQ_END={max_freq} HZ_PER_SEC={hz_per_sec}
M400
TEST_RESONANCES AXIS=1,-1 OUTPUT=raw_data NAME=a FREQ_START={min_freq} FREQ_END={max_freq} HZ_PER_SEC={hz_per_sec}
M400
RESPOND MSG="Belts comparative frequency profile generation..."
RESPOND MSG="This may take some time (3-5min)"
RUN_SHELL_COMMAND CMD=guppy_belts_calibration PARAMS="-w {png_width} -l {png_height} -n -o {png_out_path} -k /usr/share/klipper /tmp/raw_data_axis=1.000,-1.000_a.csv /tmp/raw_data_axis=1.000,1.000_b.csv"
################################################
###### STANDARD INPUT_SHAPER CALIBRATIONS ######
################################################
# Written by Frix_x#0161 #
# https://github.com/Frix-x/klippain-shaketune
[gcode_macro GUPPY_EXCITATE_AXIS_AT_FREQ]
description: Maintain a specified excitation frequency for a period of time to diagnose and locate a source of vibration
gcode:
{% set frequency = params.FREQUENCY|default(25)|int %}
{% set time = params.TIME|default(10)|int %}
{% set axis = params.AXIS|default("x")|string|lower %}
{% if axis not in ["x", "y", "a", "b"] %}
{ action_raise_error("AXIS selection invalid. Should be either x, y, a or b!") }
{% endif %}
{% if axis == "a" %}
{% set axis = "1,-1" %}
{% elif axis == "b" %}
{% set axis = "1,1" %}
{% endif %}
TEST_RESONANCES OUTPUT=raw_data AXIS={axis} FREQ_START={frequency-1} FREQ_END={frequency+1} HZ_PER_SEC={1/(time/3)}
M400
[gcode_shell_command GUPPY_K1_SSH_RESTART]
command: /etc/init.d/S50dropbear
timeout: 600.0
verbose: True
#### k1 load and unload ###
[gcode_macro _GUPPY_LOAD_MATERIAL]
gcode:
{% set extruder_temp = params.EXTRUDER_TEMP|default(240)|int %}
{% set extrude_len = params.EXTRUDE_LEN|default(35)|int %}
LOAD_MATERIAL_CLOSE_FAN2
M109 S{extruder_temp}
G91
G1 E{extrude_len} F180
LOAD_MATERIAL_RESTORE_FAN2 # k1 stuff
[gcode_macro _GUPPY_QUIT_MATERIAL]
gcode:
{% set extruder_temp = params.EXTRUDER_TEMP|default(240)|int %}
SAVE_GCODE_STATE NAME=myMoveState
M109 S{extruder_temp}
G91
G1 E20 F180
G1 E-30 F180
G1 E-50 F2000
RESTORE_GCODE_STATE NAME=myMoveState