Skip to content
forked from lhndo/ResHelper

A series of scripts designed to streamline Klipper's resonance testing workflow.

Notifications You must be signed in to change notification settings

porkcube/ResHelper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ResHelper

A series of scripts designed to streamline Klipper's resonance testing workflow

What does this do?

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.

Installation:

1. Download and install ResHelper Scripts

git clone https://github.com/lhndo/ResHelper.git
cd ResHelper
./install.sh

2. Install Rscript

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

3. Install G-Code Shell Command

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

4. Include the configuration file in your printer.cfg

[include reshelper.cfg]
Note: If your host user name is not "pi", then you have to change the paths in reshelper.cfg

5. Restart Klipper



Usage:

1. Run the Resonance Test Macros

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.

3. Add the resonance test results to your printer.cfg

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

Support


Buy Me a Coffee at ko-fi.com

About

A series of scripts designed to streamline Klipper's resonance testing workflow.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 77.7%
  • R 22.3%