first commit as a standalone module
This commit is contained in:
97
is_workflow/IS_shaper_calibrate.cfg
Normal file
97
is_workflow/IS_shaper_calibrate.cfg
Normal file
@@ -0,0 +1,97 @@
|
||||
################################################
|
||||
###### STANDARD INPUT_SHAPER CALIBRATIONS ######
|
||||
################################################
|
||||
# Written by Frix_x#0161 #
|
||||
# @version: 1.4
|
||||
|
||||
# CHANGELOG:
|
||||
# v1.4: added possibility to only run one axis at a time for the axes shaper calibration
|
||||
# v1.3: added possibility to override the default parameters
|
||||
# v1.2: added EXCITATE_AXIS_AT_FREQ to hold a specific excitating frequency on an axis and diagnose mechanical problems
|
||||
# v1.1: added M400 to validate that the files are correctly saved to disk
|
||||
# v1.0: first version of the automatic input shaper workflow
|
||||
|
||||
|
||||
### What is it ? ###
|
||||
# This macro helps you to configure the input shaper algorithm of Klipper by running the tests sequencially and calling an automatic script
|
||||
# that generate the graphs, manage the files and so on. It's basically a fully automatic input shaper calibration workflow.
|
||||
# Results can be found in your config folder using FLuidd/Maisail file manager.
|
||||
|
||||
# The goal is to make it easy to set, share and use it.
|
||||
|
||||
# Usage:
|
||||
# 1. Call the AXES_SHAPER_CALIBRATION macro, wait for it to end and compute the graphs. Then look for the results in the results folder.
|
||||
# 2. Call the BELTS_SHAPER_CALIBRATION macro, wait for it to end and compute the graphs. Then look for the results in the results folder.
|
||||
# 3. If you find out some strange noise, you can use the EXCITATE_AXIS_AT_FREQ macro to diagnose the origin
|
||||
|
||||
|
||||
[gcode_macro AXES_SHAPER_CALIBRATION]
|
||||
description: Run standard input shaper test for all axes
|
||||
gcode:
|
||||
{% set verbose = params.VERBOSE|default(true) %}
|
||||
{% set min_freq = params.FREQ_START|default(5)|float %}
|
||||
{% set max_freq = params.FREQ_END|default(133.3)|float %}
|
||||
{% set hz_per_sec = params.HZ_PER_SEC|default(1)|float %}
|
||||
{% set axis = params.AXIS|default("all")|string|lower %}
|
||||
|
||||
{% set X, Y = False, False %}
|
||||
|
||||
{% if axis == "all" %}
|
||||
{% set X, Y = True, True %}
|
||||
{% elif axis == "x" %}
|
||||
{% set X = True %}
|
||||
{% elif axis == "y" %}
|
||||
{% set Y = True %}
|
||||
{% else %}
|
||||
{ action_raise_error("AXIS selection invalid. Should be either all, x or y!") }
|
||||
{% endif %}
|
||||
|
||||
{% if X %}
|
||||
TEST_RESONANCES AXIS=X OUTPUT=raw_data NAME=x FREQ_START={min_freq} FREQ_END={max_freq} HZ_PER_SEC={hz_per_sec}
|
||||
M400
|
||||
|
||||
{% if verbose %}
|
||||
RESPOND MSG="X axis shaper graphs generation..."
|
||||
{% endif %}
|
||||
RUN_SHELL_COMMAND CMD=plot_graph PARAMS=SHAPER
|
||||
{% endif %}
|
||||
|
||||
{% if Y %}
|
||||
TEST_RESONANCES AXIS=Y OUTPUT=raw_data NAME=y FREQ_START={min_freq} FREQ_END={max_freq} HZ_PER_SEC={hz_per_sec}
|
||||
M400
|
||||
|
||||
{% if verbose %}
|
||||
RESPOND MSG="Y axis shaper graphs generation..."
|
||||
{% endif %}
|
||||
RUN_SHELL_COMMAND CMD=plot_graph PARAMS=SHAPER
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro BELTS_SHAPER_CALIBRATION]
|
||||
description: Run custom demi-axe test to analyze belts on CoreXY printers
|
||||
gcode:
|
||||
{% set verbose = params.VERBOSE|default(true) %}
|
||||
{% 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 %}
|
||||
|
||||
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
|
||||
|
||||
{% if verbose %}
|
||||
RESPOND MSG="Belts graphs generation..."
|
||||
{% endif %}
|
||||
RUN_SHELL_COMMAND CMD=plot_graph PARAMS=BELTS
|
||||
|
||||
|
||||
[gcode_macro EXCITATE_AXIS_AT_FREQ]
|
||||
description: Maintain a specified input shaper excitating frequency for some time to diagnose vibrations
|
||||
gcode:
|
||||
{% set FREQUENCY = params.FREQUENCY|default(25)|int %}
|
||||
{% set TIME = params.TIME|default(10)|int %}
|
||||
{% set AXIS = params.AXIS|default("x")|string|lower %}
|
||||
|
||||
TEST_RESONANCES OUTPUT=raw_data AXIS={AXIS} FREQ_START={FREQUENCY-1} FREQ_END={FREQUENCY+1} HZ_PER_SEC={1/(TIME/3)}
|
||||
M400
|
||||
Reference in New Issue
Block a user