################################################ ###### STANDARD INPUT_SHAPER CALIBRATIONS ###### ################################################ # Written by Frix_x#0161 # [gcode_macro COMPARE_BELTS_RESPONSES] 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 keep_results = params.KEEP_N_RESULTS|default(3)|int %} {% set keep_csv = params.KEEP_CSV|default(0)|int %} {% set kinematics = printer.configfile.settings.printer.kinematics %} RESPOND MSG="{kinematics} kinematics detected" {% if kinematics != "corexy" %} RESPOND MSG="Note that this test is not useful for this kinematics because the belt paths are not symmetrical!" {% endif %} {% if kinematics == "corexy" %} 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 {% else %} TEST_RESONANCES AXIS=1,0 OUTPUT=raw_data NAME=x FREQ_START={min_freq} FREQ_END={max_freq} HZ_PER_SEC={hz_per_sec} M400 TEST_RESONANCES AXIS=0,1 OUTPUT=raw_data NAME=y FREQ_START={min_freq} FREQ_END={max_freq} HZ_PER_SEC={hz_per_sec} M400 {% endif %} RESPOND MSG="Belts comparative frequency profile generation..." RESPOND MSG="This may take some time (3-5min)" RUN_SHELL_COMMAND CMD=shaketune PARAMS="--type belts --kinematics {kinematics} {% if keep_csv %}--keep_csv{% endif %} --keep_results {keep_results}"