Jyers / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. | Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.

Home Page:http://marlinfw.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MAX_ACCEL_EDIT_VALUES not working?

Ergonomicmike opened this issue · comments

Description

LCh-77/Marlin/tree/bugfix-2.1.x_JYERSUI-Enhanced as of today.

Ender 3 V2, v4.2.2

Perhaps I'm not understanding correctly how the code is supposed to work. Here's a snippet of the vanilla code in question:

From Configuration.h:

/**
 * Default Max Acceleration (speed change with time) (linear=mm/(s^2), rotational=°/(s^2))
 * (Maximum start speed for accelerated moves)
 * Override with M201
 *                                      X, Y, Z [, I [, J [, K...]]], E0 [, E1[, E2...]]
 */
#define DEFAULT_MAX_ACCELERATION      { 500, 500, 100, 1000 }  // Ender Configs

//#define LIMITED_MAX_ACCEL_EDITING     // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
  #define MAX_ACCEL_EDIT_VALUES       { 6000, 6000, 200, 10000 } // ...or, set your own edit limits
#endif

If I uncomment

#define LIMITED_MAX_ACCCEL_EDITING

then I expect to be able to set my E-Accel up to 20000 if I want.

But I can only increase E-Accel to 2x the Default value.

Steps to Reproduce

Uncomment //#define LIMITED_MAX_ACCCEL_EDITING

in Configuration.h and compile.

Expected behavior:

I expect to be able to increase my Max E Accel to 20000.

Actual behavior:

I can only increase my Max E Accel to 2000, which is 2x of DEFAULT_MAX_ACCELERATION.

Additional Information

So it seems as though the line to define the MAX_ACCEL_EDIT_VALUES is being ignored, and the line before it, which the comment says increases the Defaults to 2x is controlling.

For now, as a workaround, I simple set the Default E-Accel to 10000 and then dial it down after I flash the firmware.

MAX_ACCEL_EDIT_VALUES is not used in JYERSUI.

The editing values are taken from DEFAULT_MAX_ACCELERATION:

constexpr float default_max_feedrate[] = DEFAULT_MAX_FEEDRATE;
constexpr float default_max_acceleration[] = DEFAULT_MAX_ACCELERATION;
constexpr float default_steps[] = DEFAULT_AXIS_STEPS_PER_UNIT;
#if HAS_CLASSIC_JERK
constexpr float default_max_jerk[] = { DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_EJERK };
#endif

And maximums defined as DEFAULT_MAX_ACCELERATION x 2:

Modify_Value(planner.settings.max_acceleration_mm_per_s2[X_AXIS], 0, default_max_acceleration[X_AXIS] * 2, 1);

Thanks again. As in my previous issue, perhaps a comment in the example Jyers Configuration.h then that Max Accel Edit Values are not used.

Marlin configuration files are very generic because they are used by hundreds of printers, you must learn how to use the Search function in VSCode to know if a value is used or not in JYersUI.