A series of scripts designed to streamline Klipper's resonance testing workflow
It auto generates the resonance graph, and outputs the graph images into the config folder. These can be viewed directly in Mainsail/Fluid.
The Damping Ratio is automatically computed and displayed in the console and appended to the graph image filename.
Throughout the process there is no need to connect to the PI by SSH or SFTP.
git clone https://github.com/lhndo/ResHelper.git
cd ResHelper
./install.sh
sudo apt install r-base
sudo Rscript install_rs_lib.R
If the library install fails, try installing a Fortran compiler:
sudo apt-get install gfortran
KIAUH
Launch ./kiauh, then go to Advance> Extras> G-Code Shell Command
Manual Method
Download gcode_shell_command.py to /home/pi/klipper/klippy/extras
https://github.com/th33xitus/kiauh/blob/master/resources/gcode_shell_command.py
Restart the klipper service
Gcode Shell Command info: https://github.com/th33xitus/kiauh/blob/master/docs/gcode_shell_command.md
[include reshelper.cfg]
Note: If your host user name is not "pi", then you have to change the paths in reshelper.cfg
Run RESONANCE_TEST_X or RESONANCE_TEST_Y macros and wait for the Console output.
2. View the graph images directly in the browser by going to MACHINE (Mainsail) and then opening the RES_DATA folder.
The files are placed in ~/printer_data/config/RES_DATA/
The damping ratio is displayed in the Console and appended to the filename.
Example:
[input_shaper]
shaper_freq_x: 68.2
shaper_type_x: mzv
damping_ratio_x: 0.055
shaper_freq_y: 54.0
shaper_type_y: zv
damping_ratio_y: 0.0523
For more information please consult: https://www.klipper3d.org/Resonance_Compensation.html
Enjoy!
Based on work by Dmitry, churls and kmobs
https://gist.github.com/kmobs/3a09cc28ec79e62f28d8db2179be7909