Description:
This tool modifies Gcode files to use optimal acceleration for each individual movement speed during printing. Since different accelerations are technically possible at different speeds, it adjusts the acceleration for each speed so that the printer’s capabilities are not exceeded, and no time is lost due to low acceleration values. This results in a much faster workflow, and layer shifts are eliminated.
Operation of the Tool:
The tool uses a table of speed-to-acceleration dependencies. These values are initially determined (if needed) through a script. The tool examines the Gcode, sets interpolated acceleration values based on the table for found speed values, and creates a replacement file used for the actual print.
Dependencies:
To use the tool, the following criteria must be met:
- Installed Gcode_Shell_Command Plugin https://github.com/dw-0/kiauh/blob/master/docs/gcode_shell_command.md
- If needed, independent X and Y acceleration values:
Limited Cartesian: https://github.com/Piezoid/klipper/blob/work-peraxis/klippy/kinematics/limited_cartesian.py
German workaround for LC: Youtube: Unabhängige B... | Cryd Book
Usage:
Copy the “Autoacc” folder to the directory “/home/pi/printer_data/config/scripts”
Include this script in your printer.cfg ([include scripts/Autoacc/autoacc.cfg])
Before starting a print, you must create the necessary table by determining your possible values at different speeds. I recommend using, for example, “https://github.com/cryd-s/klipper_scripts/tree/main/speed_accel_script”. Caution: This macro pushes your printer to its limits. Use at your own risk. This will take some time. The more values you determine, the more accurate the results will be. I personally determine an excessively slow and an excessively fast value, and then I determine as many values as possible in the realistic print speed range. At the end of this .cfg file, enter your determined values in ascending speed order. You can repeat this if needed, for example, due to changes in hardware or similar.
For printers with independent X and Y accelerations (Limited Cartesian), use the following example format “## 270,200000,100000". The "##” must be retained. 270 is the movement speed in mm/s, 200000 is the maximum acceleration value for the X-axis, and 100000 is the maximum acceleration value for the Y-axis. For printers with the same X and Y accelerations, use the following example format “## 270,200000". The "##” must be retained. 270 is the movement speed in mm/s, 200000 is the maximum acceleration value for both X and Y axes.
Since the values you have determined are maximum values that move at the upper limit, it is advisable to soften them somewhat percentage-wise, to avoid generating any layer shifts in the middle of the print. You can define this in the line “#*# Factor in %:90”. Here, 90 represents 90%. In other words, a determined acceleration value of 100,000 will be limited to 90,000 in the Gcode.
From now on, all prints will be done with the modified Gcode. If you define acceleration values in the slicer that are below your maximum values, the print will also use the lower values. If you enter unrealistically high values in the slicer, the acceleration values will be limited to your determined values, and your printer will operate at the limit of the acceleration values.
Before I finished this script, my best Speedbenchy time was just under 10 minutes. The same Gcode, modified by this script, now only took 7:57… I would be interested to know if and by how much it accelerates your prints.
This Script can bring your Printer to its Limits. So be careful. Usage at your own risk.
Autoacc.zip (5.4 KB)