diff --git a/config/default/Configuration_adv.h b/config/default/Configuration_adv.h index b451bd483b..6172921786 100644 --- a/config/default/Configuration_adv.h +++ b/config/default/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h index deae3eb2f0..7d25b340cf 100644 --- a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h +++ b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/ADIMLab/Gantry v1/Configuration_adv.h b/config/examples/ADIMLab/Gantry v1/Configuration_adv.h index 45933ceac3..3d9f9d9774 100644 --- a/config/examples/ADIMLab/Gantry v1/Configuration_adv.h +++ b/config/examples/ADIMLab/Gantry v1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/ADIMLab/Gantry v2/Configuration_adv.h b/config/examples/ADIMLab/Gantry v2/Configuration_adv.h index 4d87b4c63a..fedbbbe4b5 100644 --- a/config/examples/ADIMLab/Gantry v2/Configuration_adv.h +++ b/config/examples/ADIMLab/Gantry v2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Alfawise/U20-bltouch/Configuration_adv.h b/config/examples/Alfawise/U20-bltouch/Configuration_adv.h index a24827cbe9..6f25505caf 100644 --- a/config/examples/Alfawise/U20-bltouch/Configuration_adv.h +++ b/config/examples/Alfawise/U20-bltouch/Configuration_adv.h @@ -1095,7 +1095,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1134,6 +1178,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Alfawise/U20/Configuration_adv.h b/config/examples/Alfawise/U20/Configuration_adv.h index 34d5f34666..9cda109ea8 100644 --- a/config/examples/Alfawise/U20/Configuration_adv.h +++ b/config/examples/Alfawise/U20/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/AliExpress/UM2pExt/Configuration_adv.h b/config/examples/AliExpress/UM2pExt/Configuration_adv.h index 1822560635..f28a61993a 100644 --- a/config/examples/AliExpress/UM2pExt/Configuration_adv.h +++ b/config/examples/AliExpress/UM2pExt/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/A2/Configuration_adv.h b/config/examples/Anet/A2/Configuration_adv.h index e62fdb0447..93cc018506 100644 --- a/config/examples/Anet/A2/Configuration_adv.h +++ b/config/examples/Anet/A2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/A2plus/Configuration_adv.h b/config/examples/Anet/A2plus/Configuration_adv.h index e62fdb0447..93cc018506 100644 --- a/config/examples/Anet/A2plus/Configuration_adv.h +++ b/config/examples/Anet/A2plus/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/A6/Configuration_adv.h b/config/examples/Anet/A6/Configuration_adv.h index f038af92a2..68250f1b01 100644 --- a/config/examples/Anet/A6/Configuration_adv.h +++ b/config/examples/Anet/A6/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/A8/Configuration_adv.h b/config/examples/Anet/A8/Configuration_adv.h index c474f3b7d9..5a6be4aa01 100644 --- a/config/examples/Anet/A8/Configuration_adv.h +++ b/config/examples/Anet/A8/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/A8plus/Configuration_adv.h b/config/examples/Anet/A8plus/Configuration_adv.h index 945ea40d5d..09612fb6f8 100644 --- a/config/examples/Anet/A8plus/Configuration_adv.h +++ b/config/examples/Anet/A8plus/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/A9/Configuration_adv.h b/config/examples/Anet/A9/Configuration_adv.h index 77d33bd9fb..3c4df15d37 100644 --- a/config/examples/Anet/A9/Configuration_adv.h +++ b/config/examples/Anet/A9/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/E10/Configuration_adv.h b/config/examples/Anet/E10/Configuration_adv.h index 8e1b5afd40..beed2871cb 100644 --- a/config/examples/Anet/E10/Configuration_adv.h +++ b/config/examples/Anet/E10/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/E16/BTT SKR 1.3/Configuration_adv.h b/config/examples/Anet/E16/BTT SKR 1.3/Configuration_adv.h index 66d961ae6a..68f7492aee 100644 --- a/config/examples/Anet/E16/BTT SKR 1.3/Configuration_adv.h +++ b/config/examples/Anet/E16/BTT SKR 1.3/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/E16/Stock/Configuration_adv.h b/config/examples/Anet/E16/Stock/Configuration_adv.h index cdfa199841..07025d5c6f 100644 --- a/config/examples/Anet/E16/Stock/Configuration_adv.h +++ b/config/examples/Anet/E16/Stock/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/ET4+/Configuration_adv.h b/config/examples/Anet/ET4+/Configuration_adv.h index 65608343f9..0dbbab9b65 100644 --- a/config/examples/Anet/ET4+/Configuration_adv.h +++ b/config/examples/Anet/ET4+/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/ET4-Pro/Configuration_adv.h b/config/examples/Anet/ET4-Pro/Configuration_adv.h index 65608343f9..0dbbab9b65 100644 --- a/config/examples/Anet/ET4-Pro/Configuration_adv.h +++ b/config/examples/Anet/ET4-Pro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/ET4/Configuration_adv.h b/config/examples/Anet/ET4/Configuration_adv.h index 0c4c714bfe..fba30e82d1 100644 --- a/config/examples/Anet/ET4/Configuration_adv.h +++ b/config/examples/Anet/ET4/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/ET4X/Configuration_adv.h b/config/examples/Anet/ET4X/Configuration_adv.h index 0c4c714bfe..fba30e82d1 100644 --- a/config/examples/Anet/ET4X/Configuration_adv.h +++ b/config/examples/Anet/ET4X/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/ET5-Pro/Configuration_adv.h b/config/examples/Anet/ET5-Pro/Configuration_adv.h index 21a6b4dc66..74ce390a50 100644 --- a/config/examples/Anet/ET5-Pro/Configuration_adv.h +++ b/config/examples/Anet/ET5-Pro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/ET5/Configuration_adv.h b/config/examples/Anet/ET5/Configuration_adv.h index 21a6b4dc66..74ce390a50 100644 --- a/config/examples/Anet/ET5/Configuration_adv.h +++ b/config/examples/Anet/ET5/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Anet/ET5X/Configuration_adv.h b/config/examples/Anet/ET5X/Configuration_adv.h index 21a6b4dc66..74ce390a50 100644 --- a/config/examples/Anet/ET5X/Configuration_adv.h +++ b/config/examples/Anet/ET5X/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/AnyCubic/Chiron/Configuration_adv.h b/config/examples/AnyCubic/Chiron/Configuration_adv.h index cfa67f574c..448b49d1c8 100644 --- a/config/examples/AnyCubic/Chiron/Configuration_adv.h +++ b/config/examples/AnyCubic/Chiron/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/AnyCubic/Mega Zero 2.0/Anycubic V1/Configuration_adv.h b/config/examples/AnyCubic/Mega Zero 2.0/Anycubic V1/Configuration_adv.h index 76468b5bba..aa08a6e8f0 100644 --- a/config/examples/AnyCubic/Mega Zero 2.0/Anycubic V1/Configuration_adv.h +++ b/config/examples/AnyCubic/Mega Zero 2.0/Anycubic V1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/AnyCubic/Mega Zero/Anycubic V1/Configuration_adv.h b/config/examples/AnyCubic/Mega Zero/Anycubic V1/Configuration_adv.h index 9873c1ca28..5b632fc585 100644 --- a/config/examples/AnyCubic/Mega Zero/Anycubic V1/Configuration_adv.h +++ b/config/examples/AnyCubic/Mega Zero/Anycubic V1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/AnyCubic/Mega Zero/BigTreeTech SKR Mini MZ V1.0/Configuration_adv.h b/config/examples/AnyCubic/Mega Zero/BigTreeTech SKR Mini MZ V1.0/Configuration_adv.h index a5b60f2302..d0caf02725 100644 --- a/config/examples/AnyCubic/Mega Zero/BigTreeTech SKR Mini MZ V1.0/Configuration_adv.h +++ b/config/examples/AnyCubic/Mega Zero/BigTreeTech SKR Mini MZ V1.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/AnyCubic/Vyper/Configuration_adv.h b/config/examples/AnyCubic/Vyper/Configuration_adv.h index dbbc67bff1..37b134a841 100644 --- a/config/examples/AnyCubic/Vyper/Configuration_adv.h +++ b/config/examples/AnyCubic/Vyper/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/AnyCubic/i3 Mega/Trigorilla AVR/Configuration_adv.h b/config/examples/AnyCubic/i3 Mega/Trigorilla AVR/Configuration_adv.h index 3702fcfc0e..3951c32569 100644 --- a/config/examples/AnyCubic/i3 Mega/Trigorilla AVR/Configuration_adv.h +++ b/config/examples/AnyCubic/i3 Mega/Trigorilla AVR/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/AnyCubic/i3 Mega/Trigorilla Pro STM32/Configuration_adv.h b/config/examples/AnyCubic/i3 Mega/Trigorilla Pro STM32/Configuration_adv.h index 48dcacc947..076a45bf59 100644 --- a/config/examples/AnyCubic/i3 Mega/Trigorilla Pro STM32/Configuration_adv.h +++ b/config/examples/AnyCubic/i3 Mega/Trigorilla Pro STM32/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/AnyCubic/i3/Configuration_adv.h b/config/examples/AnyCubic/i3/Configuration_adv.h index e630a78b0b..99d789856d 100644 --- a/config/examples/AnyCubic/i3/Configuration_adv.h +++ b/config/examples/AnyCubic/i3/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/ArmEd/Configuration_adv.h b/config/examples/ArmEd/Configuration_adv.h index e8b8216aa6..1d2ce8e2a0 100644 --- a/config/examples/ArmEd/Configuration_adv.h +++ b/config/examples/ArmEd/Configuration_adv.h @@ -1091,7 +1091,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1130,6 +1174,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Artillery/Genius Pro/Configuration_adv.h b/config/examples/Artillery/Genius Pro/Configuration_adv.h index b9348ca5e9..61277080d4 100644 --- a/config/examples/Artillery/Genius Pro/Configuration_adv.h +++ b/config/examples/Artillery/Genius Pro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Artillery/Genius/BLTouch/Configuration_adv.h b/config/examples/Artillery/Genius/BLTouch/Configuration_adv.h index e942102187..e84d53f5b9 100644 --- a/config/examples/Artillery/Genius/BLTouch/Configuration_adv.h +++ b/config/examples/Artillery/Genius/BLTouch/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Artillery/Genius/V1/Configuration_adv.h b/config/examples/Artillery/Genius/V1/Configuration_adv.h index 947288bdad..e74fa731fd 100644 --- a/config/examples/Artillery/Genius/V1/Configuration_adv.h +++ b/config/examples/Artillery/Genius/V1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Artillery/Hornet/Configuration_adv.h b/config/examples/Artillery/Hornet/Configuration_adv.h index 83d29f9d16..fd158f100e 100644 --- a/config/examples/Artillery/Hornet/Configuration_adv.h +++ b/config/examples/Artillery/Hornet/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Artillery/Sidewinder X1/0.9 BMG - E3D V6/Configuration_adv.h b/config/examples/Artillery/Sidewinder X1/0.9 BMG - E3D V6/Configuration_adv.h index 7c87d600aa..44dab4787b 100644 --- a/config/examples/Artillery/Sidewinder X1/0.9 BMG - E3D V6/Configuration_adv.h +++ b/config/examples/Artillery/Sidewinder X1/0.9 BMG - E3D V6/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Artillery/Sidewinder X1/V1/Configuration_adv.h b/config/examples/Artillery/Sidewinder X1/V1/Configuration_adv.h index 947288bdad..e74fa731fd 100644 --- a/config/examples/Artillery/Sidewinder X1/V1/Configuration_adv.h +++ b/config/examples/Artillery/Sidewinder X1/V1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Artillery/Sidewinder X2/Configuration_adv.h b/config/examples/Artillery/Sidewinder X2/Configuration_adv.h index bdd08312d1..a27e01c50e 100644 --- a/config/examples/Artillery/Sidewinder X2/Configuration_adv.h +++ b/config/examples/Artillery/Sidewinder X2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h index f585f27e9e..f22a443e8c 100644 --- a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/BIBO/TouchX/default/Configuration_adv.h b/config/examples/BIBO/TouchX/default/Configuration_adv.h index 9a4be3309f..38dc15624a 100644 --- a/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/BIQU/B1 SE Plus/Configuration_adv.h b/config/examples/BIQU/B1 SE Plus/Configuration_adv.h index 74bd5e102a..ed5586fbff 100644 --- a/config/examples/BIQU/B1 SE Plus/Configuration_adv.h +++ b/config/examples/BIQU/B1 SE Plus/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/BIQU/B1 SE/Configuration_adv.h b/config/examples/BIQU/B1 SE/Configuration_adv.h index e060997139..ff95da195a 100644 --- a/config/examples/BIQU/B1 SE/Configuration_adv.h +++ b/config/examples/BIQU/B1 SE/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/BIQU/B1/Configuration_adv.h b/config/examples/BIQU/B1/Configuration_adv.h index 2c2b1204fc..eddc1eaef4 100644 --- a/config/examples/BIQU/B1/Configuration_adv.h +++ b/config/examples/BIQU/B1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/BIQU/BX/Configuration_adv.h b/config/examples/BIQU/BX/Configuration_adv.h index 5c55edb461..98dd5c8c31 100644 --- a/config/examples/BIQU/BX/Configuration_adv.h +++ b/config/examples/BIQU/BX/Configuration_adv.h @@ -1087,7 +1087,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1126,6 +1170,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/BIQU/Hurakan/Configuration_adv.h b/config/examples/BIQU/Hurakan/Configuration_adv.h index f1375b0f5b..c365f6ae78 100644 --- a/config/examples/BIQU/Hurakan/Configuration_adv.h +++ b/config/examples/BIQU/Hurakan/Configuration_adv.h @@ -1087,7 +1087,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1126,6 +1170,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/BIQU/Thunder Standard/Configuration_adv.h b/config/examples/BIQU/Thunder Standard/Configuration_adv.h index dca8b58a01..1b9c012a0d 100644 --- a/config/examples/BIQU/Thunder Standard/Configuration_adv.h +++ b/config/examples/BIQU/Thunder Standard/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/BQ/Hephestos/Configuration_adv.h b/config/examples/BQ/Hephestos/Configuration_adv.h index 4adf350404..f745073fc5 100644 --- a/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/config/examples/BQ/Hephestos/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/BQ/Hephestos_2/Configuration_adv.h b/config/examples/BQ/Hephestos_2/Configuration_adv.h index 29d34e0718..8ebe708135 100644 --- a/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/BQ/WITBOX/Configuration_adv.h b/config/examples/BQ/WITBOX/Configuration_adv.h index 4adf350404..f745073fc5 100644 --- a/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/config/examples/BQ/WITBOX/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/CTC/A13/Configuration_adv.h b/config/examples/CTC/A13/Configuration_adv.h index 23e2c3c462..35e75c089b 100644 --- a/config/examples/CTC/A13/Configuration_adv.h +++ b/config/examples/CTC/A13/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/CTC/Bizer/Configuration_adv.h b/config/examples/CTC/Bizer/Configuration_adv.h index d7e29b6e29..f927862850 100644 --- a/config/examples/CTC/Bizer/Configuration_adv.h +++ b/config/examples/CTC/Bizer/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Cartesio/Configuration_adv.h b/config/examples/Cartesio/Configuration_adv.h index 52b93eeec3..89ceaa0537 100644 --- a/config/examples/Cartesio/Configuration_adv.h +++ b/config/examples/Cartesio/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10 Mini/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h b/config/examples/Creality/CR-10 Mini/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h index a3bd7bf51e..cb8d00fd7d 100644 --- a/config/examples/Creality/CR-10 Mini/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h +++ b/config/examples/Creality/CR-10 Mini/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10 Mini/CrealityV1/Configuration_adv.h b/config/examples/Creality/CR-10 Mini/CrealityV1/Configuration_adv.h index 303c2c4e3b..a4f8f91e10 100644 --- a/config/examples/Creality/CR-10 Mini/CrealityV1/Configuration_adv.h +++ b/config/examples/Creality/CR-10 Mini/CrealityV1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10 Mini/MEEB-3DP/Configuration_adv.h b/config/examples/Creality/CR-10 Mini/MEEB-3DP/Configuration_adv.h index 7b9f174aa9..685fa9df96 100644 --- a/config/examples/Creality/CR-10 Mini/MEEB-3DP/Configuration_adv.h +++ b/config/examples/Creality/CR-10 Mini/MEEB-3DP/Configuration_adv.h @@ -1085,7 +1085,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1124,6 +1168,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10 S4/CrealityV1/Configuration_adv.h b/config/examples/Creality/CR-10 S4/CrealityV1/Configuration_adv.h index 1fc7acc0f4..7412d34c55 100644 --- a/config/examples/Creality/CR-10 S4/CrealityV1/Configuration_adv.h +++ b/config/examples/Creality/CR-10 S4/CrealityV1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10 S5/BigTreeTech SKR Mini E3 1.2 with TFT35 E3 V3.0/Configuration_adv.h b/config/examples/Creality/CR-10 S5/BigTreeTech SKR Mini E3 1.2 with TFT35 E3 V3.0/Configuration_adv.h index 58ec3953fe..e99d3cc099 100644 --- a/config/examples/Creality/CR-10 S5/BigTreeTech SKR Mini E3 1.2 with TFT35 E3 V3.0/Configuration_adv.h +++ b/config/examples/Creality/CR-10 S5/BigTreeTech SKR Mini E3 1.2 with TFT35 E3 V3.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10 S5/BigTreeTech SKR Mini E3 v3/Configuration_adv.h b/config/examples/Creality/CR-10 S5/BigTreeTech SKR Mini E3 v3/Configuration_adv.h index af9a4077c1..ffd70ca602 100644 --- a/config/examples/Creality/CR-10 S5/BigTreeTech SKR Mini E3 v3/Configuration_adv.h +++ b/config/examples/Creality/CR-10 S5/BigTreeTech SKR Mini E3 v3/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10 S5/CrealityV1/Configuration_adv.h b/config/examples/Creality/CR-10 S5/CrealityV1/Configuration_adv.h index 1fc7acc0f4..7412d34c55 100644 --- a/config/examples/Creality/CR-10 S5/CrealityV1/Configuration_adv.h +++ b/config/examples/Creality/CR-10 S5/CrealityV1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10 S5/CrealityV2.2-BLTouch/Configuration_adv.h b/config/examples/Creality/CR-10 S5/CrealityV2.2-BLTouch/Configuration_adv.h index 42015d57ad..985d6bf3c7 100644 --- a/config/examples/Creality/CR-10 S5/CrealityV2.2-BLTouch/Configuration_adv.h +++ b/config/examples/Creality/CR-10 S5/CrealityV2.2-BLTouch/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10 V2/Configuration_adv.h b/config/examples/Creality/CR-10 V2/Configuration_adv.h index 479a3d6261..41e6e79b5e 100644 --- a/config/examples/Creality/CR-10 V2/Configuration_adv.h +++ b/config/examples/Creality/CR-10 V2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10 V3/Configuration_adv.h b/config/examples/Creality/CR-10 V3/Configuration_adv.h index 3f16f86a3a..b66d744b01 100644 --- a/config/examples/Creality/CR-10 V3/Configuration_adv.h +++ b/config/examples/Creality/CR-10 V3/Configuration_adv.h @@ -1088,7 +1088,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1127,6 +1171,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h b/config/examples/Creality/CR-10/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h index 60b62624fe..535c890f85 100644 --- a/config/examples/Creality/CR-10/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h +++ b/config/examples/Creality/CR-10/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10/CrealityV1/Configuration_adv.h b/config/examples/Creality/CR-10/CrealityV1/Configuration_adv.h index 496ff91db2..f567c4b4b9 100644 --- a/config/examples/Creality/CR-10/CrealityV1/Configuration_adv.h +++ b/config/examples/Creality/CR-10/CrealityV1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10S/BigTreeTech SKR 1.4 Turbo TMC2209/Configuration_adv.h b/config/examples/Creality/CR-10S/BigTreeTech SKR 1.4 Turbo TMC2209/Configuration_adv.h index 7e6efcae2d..4c9b098055 100644 --- a/config/examples/Creality/CR-10S/BigTreeTech SKR 1.4 Turbo TMC2209/Configuration_adv.h +++ b/config/examples/Creality/CR-10S/BigTreeTech SKR 1.4 Turbo TMC2209/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10S/BigTreeTech SKR 2.0 TMC2209/Configuration_adv.h b/config/examples/Creality/CR-10S/BigTreeTech SKR 2.0 TMC2209/Configuration_adv.h index 2535f3f2e3..b8cce1b3d9 100644 --- a/config/examples/Creality/CR-10S/BigTreeTech SKR 2.0 TMC2209/Configuration_adv.h +++ b/config/examples/Creality/CR-10S/BigTreeTech SKR 2.0 TMC2209/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10S/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h b/config/examples/Creality/CR-10S/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h index e45657a2a8..658ffdf7af 100644 --- a/config/examples/Creality/CR-10S/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h +++ b/config/examples/Creality/CR-10S/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10S/BigTreeTech SKR Pro v1.2/Configuration_adv.h b/config/examples/Creality/CR-10S/BigTreeTech SKR Pro v1.2/Configuration_adv.h index 5e21348cce..61ac9157b3 100644 --- a/config/examples/Creality/CR-10S/BigTreeTech SKR Pro v1.2/Configuration_adv.h +++ b/config/examples/Creality/CR-10S/BigTreeTech SKR Pro v1.2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-10S/CrealityV1/Configuration_adv.h b/config/examples/Creality/CR-10S/CrealityV1/Configuration_adv.h index 5aa7423e0f..f65803dee1 100644 --- a/config/examples/Creality/CR-10S/CrealityV1/Configuration_adv.h +++ b/config/examples/Creality/CR-10S/CrealityV1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-20 Pro/Configuration_adv.h b/config/examples/Creality/CR-20 Pro/Configuration_adv.h index 67fafb58aa..0073fec6bc 100644 --- a/config/examples/Creality/CR-20 Pro/Configuration_adv.h +++ b/config/examples/Creality/CR-20 Pro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-20/RepRapWorld Minitronics20/Configuration_adv.h b/config/examples/Creality/CR-20/RepRapWorld Minitronics20/Configuration_adv.h index 3a50ec7c0a..cc661a17e1 100644 --- a/config/examples/Creality/CR-20/RepRapWorld Minitronics20/Configuration_adv.h +++ b/config/examples/Creality/CR-20/RepRapWorld Minitronics20/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-20/Stock/Configuration_adv.h b/config/examples/Creality/CR-20/Stock/Configuration_adv.h index 3a50ec7c0a..cc661a17e1 100644 --- a/config/examples/Creality/CR-20/Stock/Configuration_adv.h +++ b/config/examples/Creality/CR-20/Stock/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-30 PrintMill/Configuration_adv.h b/config/examples/Creality/CR-30 PrintMill/Configuration_adv.h index 6a0ca36b00..c4b37117db 100644 --- a/config/examples/Creality/CR-30 PrintMill/Configuration_adv.h +++ b/config/examples/Creality/CR-30 PrintMill/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-6 SE/Configuration_adv.h b/config/examples/Creality/CR-6 SE/Configuration_adv.h index a7cc4679fd..5f9b9ad24e 100644 --- a/config/examples/Creality/CR-6 SE/Configuration_adv.h +++ b/config/examples/Creality/CR-6 SE/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/CR-8/Configuration_adv.h b/config/examples/Creality/CR-8/Configuration_adv.h index 95f3cc189a..dd7984712c 100644 --- a/config/examples/Creality/CR-8/Configuration_adv.h +++ b/config/examples/Creality/CR-8/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-2 Pro/CrealityV423/Configuration_adv.h b/config/examples/Creality/Ender-2 Pro/CrealityV423/Configuration_adv.h index f210b18ca1..a01b766b23 100644 --- a/config/examples/Creality/Ender-2 Pro/CrealityV423/Configuration_adv.h +++ b/config/examples/Creality/Ender-2 Pro/CrealityV423/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-2/Configuration_adv.h b/config/examples/Creality/Ender-2/Configuration_adv.h index 825ee7def3..9022a33156 100644 --- a/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/config/examples/Creality/Ender-2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 Max/Configuration_adv.h b/config/examples/Creality/Ender-3 Max/Configuration_adv.h index 2304f9c087..4247d87ac1 100644 --- a/config/examples/Creality/Ender-3 Max/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 Max/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 Neo/Configuration_adv.h b/config/examples/Creality/Ender-3 Neo/Configuration_adv.h index b0dcdaaf9d..d33e3ad48f 100644 --- a/config/examples/Creality/Ender-3 Neo/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 Neo/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR 1.4 Turbo/Configuration_adv.h b/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR 1.4 Turbo/Configuration_adv.h index 3f2ed8d3d7..e1a450ee4d 100644 --- a/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR 1.4 Turbo/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR 1.4 Turbo/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 1.0/Configuration_adv.h b/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 1.0/Configuration_adv.h index a7e3bcc7b1..c3d17bf656 100644 --- a/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 1.0/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 1.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h b/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h index a7e3bcc7b1..c3d17bf656 100644 --- a/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h b/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h index 5ca6e59b2e..bc692ee447 100644 --- a/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h b/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h index a11eb3757f..3e4c90a935 100644 --- a/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 Pro/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 Pro/CrealityV1/Configuration_adv.h b/config/examples/Creality/Ender-3 Pro/CrealityV1/Configuration_adv.h index deb2f836d4..f097eb2112 100644 --- a/config/examples/Creality/Ender-3 Pro/CrealityV1/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 Pro/CrealityV1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 Pro/CrealityV422/Configuration_adv.h b/config/examples/Creality/Ender-3 Pro/CrealityV422/Configuration_adv.h index cf59322a3b..72f3912f82 100644 --- a/config/examples/Creality/Ender-3 Pro/CrealityV422/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 Pro/CrealityV422/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 Pro/CrealityV427/Configuration_adv.h b/config/examples/Creality/Ender-3 Pro/CrealityV427/Configuration_adv.h index 34250ea491..a9ff6b212c 100644 --- a/config/examples/Creality/Ender-3 Pro/CrealityV427/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 Pro/CrealityV427/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 S1/STM32F1/Configuration_adv.h b/config/examples/Creality/Ender-3 S1/STM32F1/Configuration_adv.h index c2ea571446..17586b8186 100644 --- a/config/examples/Creality/Ender-3 S1/STM32F1/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 S1/STM32F1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 S1/STM32F4/Configuration_adv.h b/config/examples/Creality/Ender-3 S1/STM32F4/Configuration_adv.h index fbd1fdef30..9d647d27f6 100644 --- a/config/examples/Creality/Ender-3 S1/STM32F4/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 S1/STM32F4/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 V2 Neo/Configuration_adv.h b/config/examples/Creality/Ender-3 V2 Neo/Configuration_adv.h index f50e8cd8ac..8984d2af4a 100644 --- a/config/examples/Creality/Ender-3 V2 Neo/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 V2 Neo/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 V2/BigTreeTech SKR E3 Turbo/CrealityUI/Configuration_adv.h b/config/examples/Creality/Ender-3 V2/BigTreeTech SKR E3 Turbo/CrealityUI/Configuration_adv.h index 8a525c4f06..453bda533c 100644 --- a/config/examples/Creality/Ender-3 V2/BigTreeTech SKR E3 Turbo/CrealityUI/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 V2/BigTreeTech SKR E3 Turbo/CrealityUI/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 V2/BigTreeTech SKR E3 Turbo/MarlinUI/Configuration_adv.h b/config/examples/Creality/Ender-3 V2/BigTreeTech SKR E3 Turbo/MarlinUI/Configuration_adv.h index 74eaaa7a80..fa599cf96f 100644 --- a/config/examples/Creality/Ender-3 V2/BigTreeTech SKR E3 Turbo/MarlinUI/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 V2/BigTreeTech SKR E3 Turbo/MarlinUI/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 V2/BigTreeTech SKR Mini E3 v3/CrealityUI/Configuration_adv.h b/config/examples/Creality/Ender-3 V2/BigTreeTech SKR Mini E3 v3/CrealityUI/Configuration_adv.h index 6ce00e9f6b..4a7042047f 100644 --- a/config/examples/Creality/Ender-3 V2/BigTreeTech SKR Mini E3 v3/CrealityUI/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 V2/BigTreeTech SKR Mini E3 v3/CrealityUI/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 V2/BigTreeTech SKR Mini E3 v3/MarlinUI/Configuration_adv.h b/config/examples/Creality/Ender-3 V2/BigTreeTech SKR Mini E3 v3/MarlinUI/Configuration_adv.h index d8a0d040ef..9ffae3685b 100644 --- a/config/examples/Creality/Ender-3 V2/BigTreeTech SKR Mini E3 v3/MarlinUI/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 V2/BigTreeTech SKR Mini E3 v3/MarlinUI/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 V2/CrealityV422/CrealityUI/Configuration_adv.h b/config/examples/Creality/Ender-3 V2/CrealityV422/CrealityUI/Configuration_adv.h index b1814434c3..e018dc65a4 100644 --- a/config/examples/Creality/Ender-3 V2/CrealityV422/CrealityUI/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 V2/CrealityV422/CrealityUI/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3 V2/CrealityV422/MarlinUI/Configuration_adv.h b/config/examples/Creality/Ender-3 V2/CrealityV422/MarlinUI/Configuration_adv.h index 475472098f..e9b5924c3a 100644 --- a/config/examples/Creality/Ender-3 V2/CrealityV422/MarlinUI/Configuration_adv.h +++ b/config/examples/Creality/Ender-3 V2/CrealityV422/MarlinUI/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/BigTreeTech E3 RRF/Configuration_adv.h b/config/examples/Creality/Ender-3/BigTreeTech E3 RRF/Configuration_adv.h index a8f827f762..f440408111 100644 --- a/config/examples/Creality/Ender-3/BigTreeTech E3 RRF/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/BigTreeTech E3 RRF/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/BigTreeTech SKR 1.4/Configuration_adv.h b/config/examples/Creality/Ender-3/BigTreeTech SKR 1.4/Configuration_adv.h index 5391d02c08..825c912a17 100644 --- a/config/examples/Creality/Ender-3/BigTreeTech SKR 1.4/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/BigTreeTech SKR 1.4/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/2-into-1 Hotend/Configuration_adv.h b/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/2-into-1 Hotend/Configuration_adv.h index 5b03e596c9..55f642c087 100644 --- a/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/2-into-1 Hotend/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/2-into-1 Hotend/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/Dual Z/Configuration_adv.h b/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/Dual Z/Configuration_adv.h index b19eb08f69..b4889f928e 100644 --- a/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/Dual Z/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/Dual Z/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/Single Extruder/Configuration_adv.h b/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/Single Extruder/Configuration_adv.h index 5b03e596c9..55f642c087 100644 --- a/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/Single Extruder/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/BigTreeTech SKR E3 Turbo/Single Extruder/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/BigTreeTech SKR E3-DIP V1.1/Configuration_adv.h b/config/examples/Creality/Ender-3/BigTreeTech SKR E3-DIP V1.1/Configuration_adv.h index 3c7bf2cbd9..f498ced20a 100644 --- a/config/examples/Creality/Ender-3/BigTreeTech SKR E3-DIP V1.1/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/BigTreeTech SKR E3-DIP V1.1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 1.0/Configuration_adv.h b/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 1.0/Configuration_adv.h index 6dc0428b07..855ed6ad0d 100644 --- a/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 1.0/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 1.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h b/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h index 6dc0428b07..855ed6ad0d 100644 --- a/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h b/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h index 7cbbe49d99..1ee4e4725c 100644 --- a/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h b/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h index e5257125cc..1b5bfe428a 100644 --- a/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/CrealityV1/Configuration_adv.h b/config/examples/Creality/Ender-3/CrealityV1/Configuration_adv.h index c36040f591..b81992d650 100644 --- a/config/examples/Creality/Ender-3/CrealityV1/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/CrealityV1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/CrealityV422/Configuration_adv.h b/config/examples/Creality/Ender-3/CrealityV422/Configuration_adv.h index 8c1cfc101f..9dd64a28f4 100644 --- a/config/examples/Creality/Ender-3/CrealityV422/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/CrealityV422/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/CrealityV427/Configuration_adv.h b/config/examples/Creality/Ender-3/CrealityV427/Configuration_adv.h index ce2e353f53..7e70eed53b 100644 --- a/config/examples/Creality/Ender-3/CrealityV427/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/CrealityV427/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/FYSETC Cheetah 1.2/BLTouch/Configuration_adv.h b/config/examples/Creality/Ender-3/FYSETC Cheetah 1.2/BLTouch/Configuration_adv.h index d6ececd55e..939068ee4c 100644 --- a/config/examples/Creality/Ender-3/FYSETC Cheetah 1.2/BLTouch/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/FYSETC Cheetah 1.2/BLTouch/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/FYSETC Cheetah 1.2/base/Configuration_adv.h b/config/examples/Creality/Ender-3/FYSETC Cheetah 1.2/base/Configuration_adv.h index d6ececd55e..939068ee4c 100644 --- a/config/examples/Creality/Ender-3/FYSETC Cheetah 1.2/base/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/FYSETC Cheetah 1.2/base/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/FYSETC Cheetah 2.0/Configuration_adv.h b/config/examples/Creality/Ender-3/FYSETC Cheetah 2.0/Configuration_adv.h index d4fb31fc91..1d086bdabb 100644 --- a/config/examples/Creality/Ender-3/FYSETC Cheetah 2.0/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/FYSETC Cheetah 2.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/FYSETC Cheetah/BLTouch/Configuration_adv.h b/config/examples/Creality/Ender-3/FYSETC Cheetah/BLTouch/Configuration_adv.h index d6ececd55e..939068ee4c 100644 --- a/config/examples/Creality/Ender-3/FYSETC Cheetah/BLTouch/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/FYSETC Cheetah/BLTouch/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/FYSETC Cheetah/base/Configuration_adv.h b/config/examples/Creality/Ender-3/FYSETC Cheetah/base/Configuration_adv.h index d6ececd55e..939068ee4c 100644 --- a/config/examples/Creality/Ender-3/FYSETC Cheetah/base/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/FYSETC Cheetah/base/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/MEEB-3DP/Configuration_adv.h b/config/examples/Creality/Ender-3/MEEB-3DP/Configuration_adv.h index 752de990e3..9d2ce9e8b4 100644 --- a/config/examples/Creality/Ender-3/MEEB-3DP/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/MEEB-3DP/Configuration_adv.h @@ -1085,7 +1085,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1124,6 +1168,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/MKS Robin E3/V1.0/Configuration_adv.h b/config/examples/Creality/Ender-3/MKS Robin E3/V1.0/Configuration_adv.h index 6125e1d211..eae5fa8e7c 100644 --- a/config/examples/Creality/Ender-3/MKS Robin E3/V1.0/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/MKS Robin E3/V1.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/MKS Robin E3/V1.1/Configuration_adv.h b/config/examples/Creality/Ender-3/MKS Robin E3/V1.1/Configuration_adv.h index 9efc454e38..e4c6d88c45 100644 --- a/config/examples/Creality/Ender-3/MKS Robin E3/V1.1/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/MKS Robin E3/V1.1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/MKS Robin E3P/Configuration_adv.h b/config/examples/Creality/Ender-3/MKS Robin E3P/Configuration_adv.h index 27ce8a7549..2a7a4fe0e8 100644 --- a/config/examples/Creality/Ender-3/MKS Robin E3P/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/MKS Robin E3P/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-3/TH3D EZBoard Lite V2/Configuration_adv.h b/config/examples/Creality/Ender-3/TH3D EZBoard Lite V2/Configuration_adv.h index 518a2a6912..9829d7e60c 100644 --- a/config/examples/Creality/Ender-3/TH3D EZBoard Lite V2/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/TH3D EZBoard Lite V2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-4/Configuration_adv.h b/config/examples/Creality/Ender-4/Configuration_adv.h index c2ab3b238e..bd727e2c73 100644 --- a/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/config/examples/Creality/Ender-4/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5 Plus/BigTreeTech SKR 3/Configuration_adv.h b/config/examples/Creality/Ender-5 Plus/BigTreeTech SKR 3/Configuration_adv.h index 7e435b02cb..be2e056747 100644 --- a/config/examples/Creality/Ender-5 Plus/BigTreeTech SKR 3/Configuration_adv.h +++ b/config/examples/Creality/Ender-5 Plus/BigTreeTech SKR 3/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5 Plus/CrealityV1/Configuration_adv.h b/config/examples/Creality/Ender-5 Plus/CrealityV1/Configuration_adv.h index 2b3c93900c..49ff172e26 100644 --- a/config/examples/Creality/Ender-5 Plus/CrealityV1/Configuration_adv.h +++ b/config/examples/Creality/Ender-5 Plus/CrealityV1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR E3 Turbo/Configuration_adv.h b/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR E3 Turbo/Configuration_adv.h index 4b854ed14b..829e5983ae 100644 --- a/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR E3 Turbo/Configuration_adv.h +++ b/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR E3 Turbo/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h b/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h index b687735934..d06384de8a 100644 --- a/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h +++ b/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 2.0 with BLTouch/Configuration_adv.h b/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 2.0 with BLTouch/Configuration_adv.h index b7c3e2c2f6..c7d31514bb 100644 --- a/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 2.0 with BLTouch/Configuration_adv.h +++ b/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 2.0 with BLTouch/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 3.0 with BLTouch-HighTemp/Configuration_adv.h b/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 3.0 with BLTouch-HighTemp/Configuration_adv.h index 1958703f56..bb12f11be0 100644 --- a/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 3.0 with BLTouch-HighTemp/Configuration_adv.h +++ b/config/examples/Creality/Ender-5 Pro/BigTreeTech SKR Mini E3 3.0 with BLTouch-HighTemp/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5 Pro/CrealityV1/Configuration_adv.h b/config/examples/Creality/Ender-5 Pro/CrealityV1/Configuration_adv.h index 982950b3b7..55d1b8d38f 100644 --- a/config/examples/Creality/Ender-5 Pro/CrealityV1/Configuration_adv.h +++ b/config/examples/Creality/Ender-5 Pro/CrealityV1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5 Pro/CrealityV422/Configuration_adv.h b/config/examples/Creality/Ender-5 Pro/CrealityV422/Configuration_adv.h index 5a7e5e11bf..2b6899f98b 100644 --- a/config/examples/Creality/Ender-5 Pro/CrealityV422/Configuration_adv.h +++ b/config/examples/Creality/Ender-5 Pro/CrealityV422/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5 Pro/CrealityV427/Configuration_adv.h b/config/examples/Creality/Ender-5 Pro/CrealityV427/Configuration_adv.h index 2568ab75fc..89329c041f 100644 --- a/config/examples/Creality/Ender-5 Pro/CrealityV427/Configuration_adv.h +++ b/config/examples/Creality/Ender-5 Pro/CrealityV427/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5 S1/Configuration_adv.h b/config/examples/Creality/Ender-5 S1/Configuration_adv.h index f41d4d5a61..521dca5bca 100644 --- a/config/examples/Creality/Ender-5 S1/Configuration_adv.h +++ b/config/examples/Creality/Ender-5 S1/Configuration_adv.h @@ -1091,7 +1091,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1130,6 +1174,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5/BigTreeTech SKR E3 Turbo with BLTouch/Configuration_adv.h b/config/examples/Creality/Ender-5/BigTreeTech SKR E3 Turbo with BLTouch/Configuration_adv.h index 4b854ed14b..829e5983ae 100644 --- a/config/examples/Creality/Ender-5/BigTreeTech SKR E3 Turbo with BLTouch/Configuration_adv.h +++ b/config/examples/Creality/Ender-5/BigTreeTech SKR E3 Turbo with BLTouch/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5/BigTreeTech SKR E3 Turbo/Configuration_adv.h b/config/examples/Creality/Ender-5/BigTreeTech SKR E3 Turbo/Configuration_adv.h index 74f2d7cc34..900ecd9e30 100644 --- a/config/examples/Creality/Ender-5/BigTreeTech SKR E3 Turbo/Configuration_adv.h +++ b/config/examples/Creality/Ender-5/BigTreeTech SKR E3 Turbo/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h b/config/examples/Creality/Ender-5/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h index 3898afd9fc..441052b616 100644 --- a/config/examples/Creality/Ender-5/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h +++ b/config/examples/Creality/Ender-5/BigTreeTech SKR Mini E3 1.2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h b/config/examples/Creality/Ender-5/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h index 14bf16ba8a..865ecbfe3f 100644 --- a/config/examples/Creality/Ender-5/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h +++ b/config/examples/Creality/Ender-5/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5/CrealityV1/Configuration_adv.h b/config/examples/Creality/Ender-5/CrealityV1/Configuration_adv.h index b1a8611b6c..2c3c401606 100644 --- a/config/examples/Creality/Ender-5/CrealityV1/Configuration_adv.h +++ b/config/examples/Creality/Ender-5/CrealityV1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-5/CrealityV427/Configuration_adv.h b/config/examples/Creality/Ender-5/CrealityV427/Configuration_adv.h index bc365504bd..0f12b0d357 100644 --- a/config/examples/Creality/Ender-5/CrealityV427/Configuration_adv.h +++ b/config/examples/Creality/Ender-5/CrealityV427/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Creality/Ender-6/Configuration_adv.h b/config/examples/Creality/Ender-6/Configuration_adv.h index bf9b5325da..3ca7081f5a 100644 --- a/config/examples/Creality/Ender-6/Configuration_adv.h +++ b/config/examples/Creality/Ender-6/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h b/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h index 5b70115985..9d8f0208dc 100644 --- a/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h +++ b/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Daycom/3DP-100/Configuration_adv.h b/config/examples/Daycom/3DP-100/Configuration_adv.h index 39c4655500..d625af6761 100644 --- a/config/examples/Daycom/3DP-100/Configuration_adv.h +++ b/config/examples/Daycom/3DP-100/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/EXP3D/Imprimante multifonction/Configuration_adv.h b/config/examples/EXP3D/Imprimante multifonction/Configuration_adv.h index 28a76d738a..854bf211bb 100644 --- a/config/examples/EXP3D/Imprimante multifonction/Configuration_adv.h +++ b/config/examples/EXP3D/Imprimante multifonction/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/EasyThreeD/ET4000PLUS/Configuration_adv.h b/config/examples/EasyThreeD/ET4000PLUS/Configuration_adv.h index e79b9575e4..35e6401e94 100644 --- a/config/examples/EasyThreeD/ET4000PLUS/Configuration_adv.h +++ b/config/examples/EasyThreeD/ET4000PLUS/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Einstart-S/Configuration_adv.h b/config/examples/Einstart-S/Configuration_adv.h index 601e54ad38..4d4dc6986f 100644 --- a/config/examples/Einstart-S/Configuration_adv.h +++ b/config/examples/Einstart-S/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Elegoo/Neptune 2/Configuration_adv.h b/config/examples/Elegoo/Neptune 2/Configuration_adv.h index 12ebccffb2..635852b09b 100644 --- a/config/examples/Elegoo/Neptune 2/Configuration_adv.h +++ b/config/examples/Elegoo/Neptune 2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Eryone/Thinker SE/Configuration_adv.h b/config/examples/Eryone/Thinker SE/Configuration_adv.h index 5e2ccf8514..bc353223bd 100644 --- a/config/examples/Eryone/Thinker SE/Configuration_adv.h +++ b/config/examples/Eryone/Thinker SE/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Eryone/Thinker V2/Configuration_adv.h b/config/examples/Eryone/Thinker V2/Configuration_adv.h index d903d0f737..580d799a86 100644 --- a/config/examples/Eryone/Thinker V2/Configuration_adv.h +++ b/config/examples/Eryone/Thinker V2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/FYSETC/AIO_II/Configuration_adv.h b/config/examples/FYSETC/AIO_II/Configuration_adv.h index 445b041c48..3be79f2286 100644 --- a/config/examples/FYSETC/AIO_II/Configuration_adv.h +++ b/config/examples/FYSETC/AIO_II/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/FYSETC/F6_13/Configuration_adv.h b/config/examples/FYSETC/F6_13/Configuration_adv.h index 8afb05327d..e6bf7e1829 100644 --- a/config/examples/FYSETC/F6_13/Configuration_adv.h +++ b/config/examples/FYSETC/F6_13/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/FYSETC/S6/Configuration_adv.h b/config/examples/FYSETC/S6/Configuration_adv.h index cd3f591bcb..041e479d9e 100644 --- a/config/examples/FYSETC/S6/Configuration_adv.h +++ b/config/examples/FYSETC/S6/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Felix/DUAL/Configuration_adv.h b/config/examples/Felix/DUAL/Configuration_adv.h index 7c7f5e6f73..d74e5770ac 100644 --- a/config/examples/Felix/DUAL/Configuration_adv.h +++ b/config/examples/Felix/DUAL/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Felix/Single/Configuration_adv.h b/config/examples/Felix/Single/Configuration_adv.h index 7c7f5e6f73..d74e5770ac 100644 --- a/config/examples/Felix/Single/Configuration_adv.h +++ b/config/examples/Felix/Single/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/FlashForge/Creator 2X/Configuration_adv.h b/config/examples/FlashForge/Creator 2X/Configuration_adv.h index 895cf696f1..d1716c49e1 100644 --- a/config/examples/FlashForge/Creator 2X/Configuration_adv.h +++ b/config/examples/FlashForge/Creator 2X/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/FlashForge/CreatorPro/Configuration_adv.h b/config/examples/FlashForge/CreatorPro/Configuration_adv.h index 2b424ba4b2..10e7ddf3a4 100644 --- a/config/examples/FlashForge/CreatorPro/Configuration_adv.h +++ b/config/examples/FlashForge/CreatorPro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/FlyingBear/P902/Configuration_adv.h b/config/examples/FlyingBear/P902/Configuration_adv.h index b6b2e6d75a..419072753f 100644 --- a/config/examples/FlyingBear/P902/Configuration_adv.h +++ b/config/examples/FlyingBear/P902/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/FlyingBear/P905H/Configuration_adv.h b/config/examples/FlyingBear/P905H/Configuration_adv.h index 3c41b26a2f..2a23109658 100644 --- a/config/examples/FlyingBear/P905H/Configuration_adv.h +++ b/config/examples/FlyingBear/P905H/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/FoamCutter/rcKeith/Configuration_adv.h b/config/examples/FoamCutter/rcKeith/Configuration_adv.h index b1e108c147..bb6eaada2b 100644 --- a/config/examples/FoamCutter/rcKeith/Configuration_adv.h +++ b/config/examples/FoamCutter/rcKeith/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/FolgerTech/FT-5 R2/Configuration_adv.h b/config/examples/FolgerTech/FT-5 R2/Configuration_adv.h index 01310ca451..ef0442afce 100644 --- a/config/examples/FolgerTech/FT-5 R2/Configuration_adv.h +++ b/config/examples/FolgerTech/FT-5 R2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/config/examples/FolgerTech/i3-2020/Configuration_adv.h index b92b1c8b5f..9616b3a0b1 100644 --- a/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Formbot/Raptor/Configuration_adv.h b/config/examples/Formbot/Raptor/Configuration_adv.h index 0510832fc9..8bee9ef53e 100644 --- a/config/examples/Formbot/Raptor/Configuration_adv.h +++ b/config/examples/Formbot/Raptor/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h index 10f0cf9b57..be355fa2be 100644 --- a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h +++ b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Formbot/T_Rex_3/Configuration_adv.h b/config/examples/Formbot/T_Rex_3/Configuration_adv.h index fa77a34460..26460d0959 100644 --- a/config/examples/Formbot/T_Rex_3/Configuration_adv.h +++ b/config/examples/Formbot/T_Rex_3/Configuration_adv.h @@ -1090,7 +1090,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1129,6 +1173,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A10/Configuration_adv.h b/config/examples/Geeetech/A10/Configuration_adv.h index 991f65f2e7..f6535bd70c 100644 --- a/config/examples/Geeetech/A10/Configuration_adv.h +++ b/config/examples/Geeetech/A10/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A10D/Configuration_adv.h b/config/examples/Geeetech/A10D/Configuration_adv.h index e818014f2a..d9b4ed7565 100644 --- a/config/examples/Geeetech/A10D/Configuration_adv.h +++ b/config/examples/Geeetech/A10D/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A10M/Stock LCD/Configuration_adv.h b/config/examples/Geeetech/A10M/Stock LCD/Configuration_adv.h index 24713972a9..ff0ec2a2c7 100644 --- a/config/examples/Geeetech/A10M/Stock LCD/Configuration_adv.h +++ b/config/examples/Geeetech/A10M/Stock LCD/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A10M/YHCB2004_V4.1/Configuration_adv.h b/config/examples/Geeetech/A10M/YHCB2004_V4.1/Configuration_adv.h index 24713972a9..ff0ec2a2c7 100644 --- a/config/examples/Geeetech/A10M/YHCB2004_V4.1/Configuration_adv.h +++ b/config/examples/Geeetech/A10M/YHCB2004_V4.1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A10PRO/Configuration_adv.h b/config/examples/Geeetech/A10PRO/Configuration_adv.h index 991f65f2e7..f6535bd70c 100644 --- a/config/examples/Geeetech/A10PRO/Configuration_adv.h +++ b/config/examples/Geeetech/A10PRO/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A10T/Stock LCD/Configuration_adv.h b/config/examples/Geeetech/A10T/Stock LCD/Configuration_adv.h index 24713972a9..ff0ec2a2c7 100644 --- a/config/examples/Geeetech/A10T/Stock LCD/Configuration_adv.h +++ b/config/examples/Geeetech/A10T/Stock LCD/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A10T/YHCB2004_V4.1/Configuration_adv.h b/config/examples/Geeetech/A10T/YHCB2004_V4.1/Configuration_adv.h index 24713972a9..ff0ec2a2c7 100644 --- a/config/examples/Geeetech/A10T/YHCB2004_V4.1/Configuration_adv.h +++ b/config/examples/Geeetech/A10T/YHCB2004_V4.1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A20/Configuration_adv.h b/config/examples/Geeetech/A20/Configuration_adv.h index cf152458b9..fb72ee50a2 100644 --- a/config/examples/Geeetech/A20/Configuration_adv.h +++ b/config/examples/Geeetech/A20/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A20M/Configuration_adv.h b/config/examples/Geeetech/A20M/Configuration_adv.h index cf152458b9..fb72ee50a2 100644 --- a/config/examples/Geeetech/A20M/Configuration_adv.h +++ b/config/examples/Geeetech/A20M/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A20T/Configuration_adv.h b/config/examples/Geeetech/A20T/Configuration_adv.h index cf152458b9..fb72ee50a2 100644 --- a/config/examples/Geeetech/A20T/Configuration_adv.h +++ b/config/examples/Geeetech/A20T/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A30/Configuration_adv.h b/config/examples/Geeetech/A30/Configuration_adv.h index 1a0fe1e1c9..b8fbd666d0 100644 --- a/config/examples/Geeetech/A30/Configuration_adv.h +++ b/config/examples/Geeetech/A30/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A30M/Configuration_adv.h b/config/examples/Geeetech/A30M/Configuration_adv.h index 1a0fe1e1c9..b8fbd666d0 100644 --- a/config/examples/Geeetech/A30M/Configuration_adv.h +++ b/config/examples/Geeetech/A30M/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/A30T/Configuration_adv.h b/config/examples/Geeetech/A30T/Configuration_adv.h index 1a0fe1e1c9..b8fbd666d0 100644 --- a/config/examples/Geeetech/A30T/Configuration_adv.h +++ b/config/examples/Geeetech/A30T/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/D200/Configuration_adv.h b/config/examples/Geeetech/D200/Configuration_adv.h index 2d0b92490a..c04342ce7d 100644 --- a/config/examples/Geeetech/D200/Configuration_adv.h +++ b/config/examples/Geeetech/D200/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/Duplicator5/Configuration_adv.h b/config/examples/Geeetech/Duplicator5/Configuration_adv.h index cd3f591bcb..041e479d9e 100644 --- a/config/examples/Geeetech/Duplicator5/Configuration_adv.h +++ b/config/examples/Geeetech/Duplicator5/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/E180/Configuration_adv.h b/config/examples/Geeetech/E180/Configuration_adv.h index 1a0fe1e1c9..b8fbd666d0 100644 --- a/config/examples/Geeetech/E180/Configuration_adv.h +++ b/config/examples/Geeetech/E180/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/M201/Configuration_adv.h b/config/examples/Geeetech/M201/Configuration_adv.h index 2d0b92490a..c04342ce7d 100644 --- a/config/examples/Geeetech/M201/Configuration_adv.h +++ b/config/examples/Geeetech/M201/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/MeCreator2/Configuration_adv.h b/config/examples/Geeetech/MeCreator2/Configuration_adv.h index 50e8b852be..e19739a240 100644 --- a/config/examples/Geeetech/MeCreator2/Configuration_adv.h +++ b/config/examples/Geeetech/MeCreator2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/Me_creator/Configuration_adv.h b/config/examples/Geeetech/Me_creator/Configuration_adv.h index cd3f591bcb..041e479d9e 100644 --- a/config/examples/Geeetech/Me_creator/Configuration_adv.h +++ b/config/examples/Geeetech/Me_creator/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/Me_ducer/Configuration_adv.h b/config/examples/Geeetech/Me_ducer/Configuration_adv.h index f9b216e1cb..ec0c4ea010 100644 --- a/config/examples/Geeetech/Me_ducer/Configuration_adv.h +++ b/config/examples/Geeetech/Me_ducer/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/PI3A PRO/Configuration_adv.h b/config/examples/Geeetech/PI3A PRO/Configuration_adv.h index 6c1c04c1da..621c2342eb 100644 --- a/config/examples/Geeetech/PI3A PRO/Configuration_adv.h +++ b/config/examples/Geeetech/PI3A PRO/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h index 991f65f2e7..f6535bd70c 100644 --- a/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h index 991f65f2e7..f6535bd70c 100644 --- a/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/HMS434/Configuration_adv.h b/config/examples/HMS434/Configuration_adv.h index 1f5aedcfd7..32b7b1fb2d 100644 --- a/config/examples/HMS434/Configuration_adv.h +++ b/config/examples/HMS434/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Infitary/i3-M508/Configuration_adv.h b/config/examples/Infitary/i3-M508/Configuration_adv.h index c8a2507579..0cf823bac7 100644 --- a/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Intamsys/FunmatHT 4988/Configuration_adv.h b/config/examples/Intamsys/FunmatHT 4988/Configuration_adv.h index 29b6957415..153bace435 100644 --- a/config/examples/Intamsys/FunmatHT 4988/Configuration_adv.h +++ b/config/examples/Intamsys/FunmatHT 4988/Configuration_adv.h @@ -1085,7 +1085,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1124,6 +1168,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/JGAurora/A1/Configuration_adv.h b/config/examples/JGAurora/A1/Configuration_adv.h index 0e3ef5a4a7..e27c8e4498 100644 --- a/config/examples/JGAurora/A1/Configuration_adv.h +++ b/config/examples/JGAurora/A1/Configuration_adv.h @@ -1092,7 +1092,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1131,6 +1175,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/JGAurora/A5/Configuration_adv.h b/config/examples/JGAurora/A5/Configuration_adv.h index dd1f6d1506..eeca596f02 100644 --- a/config/examples/JGAurora/A5/Configuration_adv.h +++ b/config/examples/JGAurora/A5/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/JGAurora/A5S/Configuration_adv.h b/config/examples/JGAurora/A5S/Configuration_adv.h index ce92cf497c..36a9c57d21 100644 --- a/config/examples/JGAurora/A5S/Configuration_adv.h +++ b/config/examples/JGAurora/A5S/Configuration_adv.h @@ -1092,7 +1092,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1131,6 +1175,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/JGAurora/Magic/Configuration_adv.h b/config/examples/JGAurora/Magic/Configuration_adv.h index 21e0469384..58140c71d1 100644 --- a/config/examples/JGAurora/Magic/Configuration_adv.h +++ b/config/examples/JGAurora/Magic/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Kingroon/KP3/Configuration_adv.h b/config/examples/Kingroon/KP3/Configuration_adv.h index aa5b9b32d1..72af5fb253 100644 --- a/config/examples/Kingroon/KP3/Configuration_adv.h +++ b/config/examples/Kingroon/KP3/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Kingroon/KP5L/Configuration_adv.h b/config/examples/Kingroon/KP5L/Configuration_adv.h index c22a71e79a..1930739884 100644 --- a/config/examples/Kingroon/KP5L/Configuration_adv.h +++ b/config/examples/Kingroon/KP5L/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Labists/ET4/Configuration_adv.h b/config/examples/Labists/ET4/Configuration_adv.h index 65608343f9..0dbbab9b65 100644 --- a/config/examples/Labists/ET4/Configuration_adv.h +++ b/config/examples/Labists/ET4/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Longer/LK5/Configuration_adv.h b/config/examples/Longer/LK5/Configuration_adv.h index 43a0a1ee7e..36bba194dd 100644 --- a/config/examples/Longer/LK5/Configuration_adv.h +++ b/config/examples/Longer/LK5/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/LulzBot/Mini2/Teensy/Configuration_adv.h b/config/examples/LulzBot/Mini2/Teensy/Configuration_adv.h index 385e243e2e..224df11504 100644 --- a/config/examples/LulzBot/Mini2/Teensy/Configuration_adv.h +++ b/config/examples/LulzBot/Mini2/Teensy/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/LulzBot/TAZ4/Configuration_adv.h b/config/examples/LulzBot/TAZ4/Configuration_adv.h index 121ae1a11f..c46f1752ec 100644 --- a/config/examples/LulzBot/TAZ4/Configuration_adv.h +++ b/config/examples/LulzBot/TAZ4/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/MBot/Cube/Configuration_adv.h b/config/examples/MBot/Cube/Configuration_adv.h index 630a5060f4..465716871f 100644 --- a/config/examples/MBot/Cube/Configuration_adv.h +++ b/config/examples/MBot/Cube/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/MakerFarm/Pegasus 12/Configuration_adv.h b/config/examples/MakerFarm/Pegasus 12/Configuration_adv.h index bf864fa7ad..95db3341d9 100644 --- a/config/examples/MakerFarm/Pegasus 12/Configuration_adv.h +++ b/config/examples/MakerFarm/Pegasus 12/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/MakerParts/Configuration_adv.h b/config/examples/MakerParts/Configuration_adv.h index 60567acd75..83367c6bfe 100644 --- a/config/examples/MakerParts/Configuration_adv.h +++ b/config/examples/MakerParts/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/MakerTech3D/Proforge2sDual/Configuration_adv.h b/config/examples/MakerTech3D/Proforge2sDual/Configuration_adv.h index 74954a3050..7da17becdf 100644 --- a/config/examples/MakerTech3D/Proforge2sDual/Configuration_adv.h +++ b/config/examples/MakerTech3D/Proforge2sDual/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Malyan/M150/Configuration_adv.h b/config/examples/Malyan/M150/Configuration_adv.h index f5e9d50dc3..a4a014597c 100644 --- a/config/examples/Malyan/M150/Configuration_adv.h +++ b/config/examples/Malyan/M150/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Malyan/M200/Configuration_adv.h b/config/examples/Malyan/M200/Configuration_adv.h index 461821d53f..489187a8e9 100644 --- a/config/examples/Malyan/M200/Configuration_adv.h +++ b/config/examples/Malyan/M200/Configuration_adv.h @@ -1088,7 +1088,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1127,6 +1171,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/config/examples/Micromake/C1/enhanced/Configuration_adv.h index d234f84eaf..32d2fba362 100644 --- a/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Mks/Sbase/Configuration_adv.h b/config/examples/Mks/Sbase/Configuration_adv.h index f97eeab2e9..839c091952 100644 --- a/config/examples/Mks/Sbase/Configuration_adv.h +++ b/config/examples/Mks/Sbase/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Modix/Big60/Configuration_adv.h b/config/examples/Modix/Big60/Configuration_adv.h index 97a6da249c..c292b74b11 100644 --- a/config/examples/Modix/Big60/Configuration_adv.h +++ b/config/examples/Modix/Big60/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Nextion/Configuration_adv.h b/config/examples/Nextion/Configuration_adv.h index ff07a4107a..fb0ec1c08b 100644 --- a/config/examples/Nextion/Configuration_adv.h +++ b/config/examples/Nextion/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/ORD Bot/Hadron/Sanguinololu/Configuration_adv.h b/config/examples/ORD Bot/Hadron/Sanguinololu/Configuration_adv.h index 5f8a2e1659..a651d59867 100644 --- a/config/examples/ORD Bot/Hadron/Sanguinololu/Configuration_adv.h +++ b/config/examples/ORD Bot/Hadron/Sanguinololu/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Opulo/Lumen_REV3/Configuration_adv.h b/config/examples/Opulo/Lumen_REV3/Configuration_adv.h index ef8c9b6b11..c65c7cca7b 100644 --- a/config/examples/Opulo/Lumen_REV3/Configuration_adv.h +++ b/config/examples/Opulo/Lumen_REV3/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Opulo/Lumen_REV4/Configuration_adv.h b/config/examples/Opulo/Lumen_REV4/Configuration_adv.h index 7f3a8a5cf9..f427564894 100644 --- a/config/examples/Opulo/Lumen_REV4/Configuration_adv.h +++ b/config/examples/Opulo/Lumen_REV4/Configuration_adv.h @@ -1085,7 +1085,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1124,6 +1168,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Ortur 4/Configuration_adv.h b/config/examples/Ortur 4/Configuration_adv.h index 351c44ed46..ae8187b1ae 100644 --- a/config/examples/Ortur 4/Configuration_adv.h +++ b/config/examples/Ortur 4/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Polargraph/Configuration_adv.h b/config/examples/Polargraph/Configuration_adv.h index 201d3ed013..28079833b3 100644 --- a/config/examples/Polargraph/Configuration_adv.h +++ b/config/examples/Polargraph/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Prusa/MK3/Configuration_adv.h b/config/examples/Prusa/MK3/Configuration_adv.h index af39ad19ab..7e2b134213 100644 --- a/config/examples/Prusa/MK3/Configuration_adv.h +++ b/config/examples/Prusa/MK3/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Prusa/MK3S-BigTreeTech-BTT002/Configuration_adv.h b/config/examples/Prusa/MK3S-BigTreeTech-BTT002/Configuration_adv.h index d159927516..d535baaa7b 100644 --- a/config/examples/Prusa/MK3S-BigTreeTech-BTT002/Configuration_adv.h +++ b/config/examples/Prusa/MK3S-BigTreeTech-BTT002/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Qidi/Qidi 1/Configuration_adv.h b/config/examples/Qidi/Qidi 1/Configuration_adv.h index d15fc64afe..ecbf65e4c7 100644 --- a/config/examples/Qidi/Qidi 1/Configuration_adv.h +++ b/config/examples/Qidi/Qidi 1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Raiscube/A8r/Configuration_adv.h b/config/examples/Raiscube/A8r/Configuration_adv.h index f038af92a2..68250f1b01 100644 --- a/config/examples/Raiscube/A8r/Configuration_adv.h +++ b/config/examples/Raiscube/A8r/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/RapideLite/RL200/Configuration_adv.h b/config/examples/RapideLite/RL200/Configuration_adv.h index cd3f591bcb..041e479d9e 100644 --- a/config/examples/RapideLite/RL200/Configuration_adv.h +++ b/config/examples/RapideLite/RL200/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Renkforce/RF100/Configuration_adv.h b/config/examples/Renkforce/RF100/Configuration_adv.h index 161291b264..319a6d22cb 100644 --- a/config/examples/Renkforce/RF100/Configuration_adv.h +++ b/config/examples/Renkforce/RF100/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Renkforce/RF100XL/Configuration_adv.h b/config/examples/Renkforce/RF100XL/Configuration_adv.h index 161291b264..319a6d22cb 100644 --- a/config/examples/Renkforce/RF100XL/Configuration_adv.h +++ b/config/examples/Renkforce/RF100XL/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Renkforce/RF100v2/Configuration_adv.h b/config/examples/Renkforce/RF100v2/Configuration_adv.h index 161291b264..319a6d22cb 100644 --- a/config/examples/Renkforce/RF100v2/Configuration_adv.h +++ b/config/examples/Renkforce/RF100v2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/RepRapWorld/Minitronics20/CNC/Configuration_adv.h b/config/examples/RepRapWorld/Minitronics20/CNC/Configuration_adv.h index 0e9a7b5561..9055450f3a 100644 --- a/config/examples/RepRapWorld/Minitronics20/CNC/Configuration_adv.h +++ b/config/examples/RepRapWorld/Minitronics20/CNC/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/RigidBot/Configuration_adv.h b/config/examples/RigidBot/Configuration_adv.h index 8f47b56c43..e1f3d90743 100644 --- a/config/examples/RigidBot/Configuration_adv.h +++ b/config/examples/RigidBot/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/SCARA/MP_SCARA/Configuration_adv.h b/config/examples/SCARA/MP_SCARA/Configuration_adv.h index c5c32cbd5b..a025b5aeb0 100644 --- a/config/examples/SCARA/MP_SCARA/Configuration_adv.h +++ b/config/examples/SCARA/MP_SCARA/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/SCARA/Morgan/Configuration_adv.h b/config/examples/SCARA/Morgan/Configuration_adv.h index edf7a4bb83..7916b56d3b 100644 --- a/config/examples/SCARA/Morgan/Configuration_adv.h +++ b/config/examples/SCARA/Morgan/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h b/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h index 2a3cdb83d4..f42c3a406b 100644 --- a/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h +++ b/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Simax/Mi-M200/Configuration_adv.h b/config/examples/Simax/Mi-M200/Configuration_adv.h index 431be6983c..7fa6fb20ae 100644 --- a/config/examples/Simax/Mi-M200/Configuration_adv.h +++ b/config/examples/Simax/Mi-M200/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Simulator/Configuration_adv.h b/config/examples/Simulator/Configuration_adv.h index e1fa010e7e..14975af575 100644 --- a/config/examples/Simulator/Configuration_adv.h +++ b/config/examples/Simulator/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Sovol/SV-01/BigTreeTech SKR E3 Turbo/Configuration_adv.h b/config/examples/Sovol/SV-01/BigTreeTech SKR E3 Turbo/Configuration_adv.h index efbb13da38..b866cdb18e 100644 --- a/config/examples/Sovol/SV-01/BigTreeTech SKR E3 Turbo/Configuration_adv.h +++ b/config/examples/Sovol/SV-01/BigTreeTech SKR E3 Turbo/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Sovol/SV-01/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h b/config/examples/Sovol/SV-01/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h index fd9abeaf23..8bafb03332 100644 --- a/config/examples/Sovol/SV-01/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h +++ b/config/examples/Sovol/SV-01/BigTreeTech SKR Mini E3 2.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Sovol/SV-01/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h b/config/examples/Sovol/SV-01/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h index 11c5894524..b4d1533f22 100644 --- a/config/examples/Sovol/SV-01/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h +++ b/config/examples/Sovol/SV-01/BigTreeTech SKR Mini E3 3.0/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Sovol/SV-01/CrealityV22/Configuration_adv.h b/config/examples/Sovol/SV-01/CrealityV22/Configuration_adv.h index e150e4a45f..5305680bf6 100644 --- a/config/examples/Sovol/SV-01/CrealityV22/Configuration_adv.h +++ b/config/examples/Sovol/SV-01/CrealityV22/Configuration_adv.h @@ -1088,7 +1088,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1127,6 +1171,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Sovol/SV-01/CrealityV221/Configuration_adv.h b/config/examples/Sovol/SV-01/CrealityV221/Configuration_adv.h index b6a5b11871..ce9965db0e 100644 --- a/config/examples/Sovol/SV-01/CrealityV221/Configuration_adv.h +++ b/config/examples/Sovol/SV-01/CrealityV221/Configuration_adv.h @@ -1088,7 +1088,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1127,6 +1171,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Sovol/SV-02/Configuration_adv.h b/config/examples/Sovol/SV-02/Configuration_adv.h index 86b831031e..0dd67a4951 100644 --- a/config/examples/Sovol/SV-02/Configuration_adv.h +++ b/config/examples/Sovol/SV-02/Configuration_adv.h @@ -1088,7 +1088,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1127,6 +1171,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Sovol/SV-03/Configuration_adv.h b/config/examples/Sovol/SV-03/Configuration_adv.h index cd4da16fe3..edb2610f00 100644 --- a/config/examples/Sovol/SV-03/Configuration_adv.h +++ b/config/examples/Sovol/SV-03/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Sunlu/S8/Configuration_adv.h b/config/examples/Sunlu/S8/Configuration_adv.h index dce0260687..2efb0390c7 100644 --- a/config/examples/Sunlu/S8/Configuration_adv.h +++ b/config/examples/Sunlu/S8/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/TPARA/AXEL_TPARA/Configuration_adv.h b/config/examples/TPARA/AXEL_TPARA/Configuration_adv.h index adf501d091..b91f46b44e 100644 --- a/config/examples/TPARA/AXEL_TPARA/Configuration_adv.h +++ b/config/examples/TPARA/AXEL_TPARA/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tevo/Michelangelo/Configuration_adv.h b/config/examples/Tevo/Michelangelo/Configuration_adv.h index b253861209..094811f3a5 100644 --- a/config/examples/Tevo/Michelangelo/Configuration_adv.h +++ b/config/examples/Tevo/Michelangelo/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tevo/Nereus/Configuration_adv.h b/config/examples/Tevo/Nereus/Configuration_adv.h index 0ada1e840b..741db56a47 100644 --- a/config/examples/Tevo/Nereus/Configuration_adv.h +++ b/config/examples/Tevo/Nereus/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tevo/Tarantula Pro/Configuration_adv.h b/config/examples/Tevo/Tarantula Pro/Configuration_adv.h index 0808635b8e..1ff69fb8a5 100644 --- a/config/examples/Tevo/Tarantula Pro/Configuration_adv.h +++ b/config/examples/Tevo/Tarantula Pro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h b/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h index c118ba690d..73b0931f47 100644 --- a/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h +++ b/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h b/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h index c118ba690d..73b0931f47 100644 --- a/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h +++ b/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tinkerine/Ditto Pro/RAMPS 1.4/Configuration_adv.h b/config/examples/Tinkerine/Ditto Pro/RAMPS 1.4/Configuration_adv.h index 4ab8224c81..2ddb57595a 100644 --- a/config/examples/Tinkerine/Ditto Pro/RAMPS 1.4/Configuration_adv.h +++ b/config/examples/Tinkerine/Ditto Pro/RAMPS 1.4/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/TinyBoy2/Configuration_adv.h b/config/examples/TinyBoy2/Configuration_adv.h index 4e1a701a33..72bd87c4a3 100644 --- a/config/examples/TinyBoy2/Configuration_adv.h +++ b/config/examples/TinyBoy2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tronxy/D01/CXY-v6-191017 board/Configuration_adv.h b/config/examples/Tronxy/D01/CXY-v6-191017 board/Configuration_adv.h index 9e98a188e0..bade1ecb73 100644 --- a/config/examples/Tronxy/D01/CXY-v6-191017 board/Configuration_adv.h +++ b/config/examples/Tronxy/D01/CXY-v6-191017 board/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tronxy/X3A/Configuration_adv.h b/config/examples/Tronxy/X3A/Configuration_adv.h index 97abe2d026..511a781f56 100644 --- a/config/examples/Tronxy/X3A/Configuration_adv.h +++ b/config/examples/Tronxy/X3A/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tronxy/X5S-2E/Green Board (Chitu V5)/Configuration_adv.h b/config/examples/Tronxy/X5S-2E/Green Board (Chitu V5)/Configuration_adv.h index fd8a5f2f2b..dd4ec16f1b 100644 --- a/config/examples/Tronxy/X5S-2E/Green Board (Chitu V5)/Configuration_adv.h +++ b/config/examples/Tronxy/X5S-2E/Green Board (Chitu V5)/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tronxy/X5S-2E/Red Board (Tronxy 3.1.0)/Configuration_adv.h b/config/examples/Tronxy/X5S-2E/Red Board (Tronxy 3.1.0)/Configuration_adv.h index f4bbf667c1..d12daf3e13 100644 --- a/config/examples/Tronxy/X5S-2E/Red Board (Tronxy 3.1.0)/Configuration_adv.h +++ b/config/examples/Tronxy/X5S-2E/Red Board (Tronxy 3.1.0)/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tronxy/X5SA-2E/Configuration_adv.h b/config/examples/Tronxy/X5SA-2E/Configuration_adv.h index 4095441f5e..3f0b6cb472 100644 --- a/config/examples/Tronxy/X5SA-2E/Configuration_adv.h +++ b/config/examples/Tronxy/X5SA-2E/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tronxy/X5SA/Configuration_adv.h b/config/examples/Tronxy/X5SA/Configuration_adv.h index 5598208416..ddfda7e2ef 100644 --- a/config/examples/Tronxy/X5SA/Configuration_adv.h +++ b/config/examples/Tronxy/X5SA/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Tronxy/XY2-Pro/Configuration_adv.h b/config/examples/Tronxy/XY2-Pro/Configuration_adv.h index 3c8eeccf6f..29daf78322 100644 --- a/config/examples/Tronxy/XY2-Pro/Configuration_adv.h +++ b/config/examples/Tronxy/XY2-Pro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Two Trees/BlueR Plus/Configuration_adv.h b/config/examples/Two Trees/BlueR Plus/Configuration_adv.h index 942543db9a..8c9faf5c3e 100644 --- a/config/examples/Two Trees/BlueR Plus/Configuration_adv.h +++ b/config/examples/Two Trees/BlueR Plus/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Two Trees/BlueR/BlueR V1/Configuration_adv.h b/config/examples/Two Trees/BlueR/BlueR V1/Configuration_adv.h index f8ac729944..0962f51937 100644 --- a/config/examples/Two Trees/BlueR/BlueR V1/Configuration_adv.h +++ b/config/examples/Two Trees/BlueR/BlueR V1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Two Trees/BlueR/BlueR V2/Configuration_adv.h b/config/examples/Two Trees/BlueR/BlueR V2/Configuration_adv.h index f8ac729944..0962f51937 100644 --- a/config/examples/Two Trees/BlueR/BlueR V2/Configuration_adv.h +++ b/config/examples/Two Trees/BlueR/BlueR V2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Two Trees/BlueR/BlueR V3/Configuration_adv.h b/config/examples/Two Trees/BlueR/BlueR V3/Configuration_adv.h index 4ef4412950..6346beb77c 100644 --- a/config/examples/Two Trees/BlueR/BlueR V3/Configuration_adv.h +++ b/config/examples/Two Trees/BlueR/BlueR V3/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Two Trees/Sapphire Plus/Sapphire Plus V2.1/Configuration_adv.h b/config/examples/Two Trees/Sapphire Plus/Sapphire Plus V2.1/Configuration_adv.h index c2c469612b..88197d56cc 100644 --- a/config/examples/Two Trees/Sapphire Plus/Sapphire Plus V2.1/Configuration_adv.h +++ b/config/examples/Two Trees/Sapphire Plus/Sapphire Plus V2.1/Configuration_adv.h @@ -1092,7 +1092,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1131,6 +1175,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Two Trees/Sapphire Plus/Sapphire Plus V2/Configuration_adv.h b/config/examples/Two Trees/Sapphire Plus/Sapphire Plus V2/Configuration_adv.h index 47dd0e7a1a..9f475149be 100644 --- a/config/examples/Two Trees/Sapphire Plus/Sapphire Plus V2/Configuration_adv.h +++ b/config/examples/Two Trees/Sapphire Plus/Sapphire Plus V2/Configuration_adv.h @@ -1092,7 +1092,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1131,6 +1175,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Two Trees/Sapphire Pro/Configuration_adv.h b/config/examples/Two Trees/Sapphire Pro/Configuration_adv.h index 6f0c21f2da..9f5257a132 100644 --- a/config/examples/Two Trees/Sapphire Pro/Configuration_adv.h +++ b/config/examples/Two Trees/Sapphire Pro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/UltiMachine/Archim1/Configuration_adv.h b/config/examples/UltiMachine/Archim1/Configuration_adv.h index d900d1a0cd..577fe83619 100644 --- a/config/examples/UltiMachine/Archim1/Configuration_adv.h +++ b/config/examples/UltiMachine/Archim1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/UltiMachine/Archim2/Configuration_adv.h b/config/examples/UltiMachine/Archim2/Configuration_adv.h index cf4a400d88..b2f12b4fa5 100644 --- a/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Ultimaker/Ultimaker 2+/Configuration_adv.h b/config/examples/Ultimaker/Ultimaker 2+/Configuration_adv.h index 9ce9a9fdcc..f3c2df6937 100644 --- a/config/examples/Ultimaker/Ultimaker 2+/Configuration_adv.h +++ b/config/examples/Ultimaker/Ultimaker 2+/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Ultimaker/Ultimaker 2/Configuration_adv.h b/config/examples/Ultimaker/Ultimaker 2/Configuration_adv.h index 2d0237d492..8cf220f271 100644 --- a/config/examples/Ultimaker/Ultimaker 2/Configuration_adv.h +++ b/config/examples/Ultimaker/Ultimaker 2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Ultimaker/Ultimaker Original (1.5.7)/Configuration_adv.h b/config/examples/Ultimaker/Ultimaker Original (1.5.7)/Configuration_adv.h index 75cc637930..0cf74eec9a 100644 --- a/config/examples/Ultimaker/Ultimaker Original (1.5.7)/Configuration_adv.h +++ b/config/examples/Ultimaker/Ultimaker Original (1.5.7)/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Ultimaker/Ultimaker Original Plus (2.1.1)/Configuration_adv.h b/config/examples/Ultimaker/Ultimaker Original Plus (2.1.1)/Configuration_adv.h index 1cc61c9fb8..390e10230b 100644 --- a/config/examples/Ultimaker/Ultimaker Original Plus (2.1.1)/Configuration_adv.h +++ b/config/examples/Ultimaker/Ultimaker Original Plus (2.1.1)/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Ultimaker/Ultimaker Original Plus DXU/Configuration_adv.h b/config/examples/Ultimaker/Ultimaker Original Plus DXU/Configuration_adv.h index bae264d9fa..8ac06c4a60 100644 --- a/config/examples/Ultimaker/Ultimaker Original Plus DXU/Configuration_adv.h +++ b/config/examples/Ultimaker/Ultimaker Original Plus DXU/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/VORONDesign/Configuration_adv.h b/config/examples/VORONDesign/Configuration_adv.h index 39a0451867..59daa1790e 100644 --- a/config/examples/VORONDesign/Configuration_adv.h +++ b/config/examples/VORONDesign/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Velleman/K8200 Upgraded/Configuration_adv.h b/config/examples/Velleman/K8200 Upgraded/Configuration_adv.h index 0393f35f0d..c23faec5ed 100644 --- a/config/examples/Velleman/K8200 Upgraded/Configuration_adv.h +++ b/config/examples/Velleman/K8200 Upgraded/Configuration_adv.h @@ -1099,7 +1099,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1138,6 +1182,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Velleman/K8200/Configuration_adv.h b/config/examples/Velleman/K8200/Configuration_adv.h index b5aaf09e1c..a9b5970d16 100644 --- a/config/examples/Velleman/K8200/Configuration_adv.h +++ b/config/examples/Velleman/K8200/Configuration_adv.h @@ -1099,7 +1099,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1138,6 +1182,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Velleman/K8400/Dual-head/Configuration_adv.h b/config/examples/Velleman/K8400/Dual-head/Configuration_adv.h index decf2ee81b..919c59523a 100644 --- a/config/examples/Velleman/K8400/Dual-head/Configuration_adv.h +++ b/config/examples/Velleman/K8400/Dual-head/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Velleman/K8400/Single-head/Configuration_adv.h b/config/examples/Velleman/K8400/Single-head/Configuration_adv.h index decf2ee81b..919c59523a 100644 --- a/config/examples/Velleman/K8400/Single-head/Configuration_adv.h +++ b/config/examples/Velleman/K8400/Single-head/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/WASP/PowerWASP/Configuration_adv.h b/config/examples/WASP/PowerWASP/Configuration_adv.h index f1b5e387ea..69ee57955e 100644 --- a/config/examples/WASP/PowerWASP/Configuration_adv.h +++ b/config/examples/WASP/PowerWASP/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Wanhao/Duplicator 4S/Configuration_adv.h b/config/examples/Wanhao/Duplicator 4S/Configuration_adv.h index 1b55ae51e1..1dc6a8e8a2 100644 --- a/config/examples/Wanhao/Duplicator 4S/Configuration_adv.h +++ b/config/examples/Wanhao/Duplicator 4S/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index f3fa2a856b..a95def3be3 100644 --- a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Wanhao/Duplicator i3 2.1/Configuration_adv.h b/config/examples/Wanhao/Duplicator i3 2.1/Configuration_adv.h index 20e68c3e35..18d620cead 100644 --- a/config/examples/Wanhao/Duplicator i3 2.1/Configuration_adv.h +++ b/config/examples/Wanhao/Duplicator i3 2.1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h b/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h index af5a8537d7..fd452a0286 100644 --- a/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h +++ b/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Weedo/Tina2/V2/Configuration_adv.h b/config/examples/Weedo/Tina2/V2/Configuration_adv.h index 798680d1a2..428736a562 100644 --- a/config/examples/Weedo/Tina2/V2/Configuration_adv.h +++ b/config/examples/Weedo/Tina2/V2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Weedo/Tina2/V3/Configuration_adv.h b/config/examples/Weedo/Tina2/V3/Configuration_adv.h index 798680d1a2..428736a562 100644 --- a/config/examples/Weedo/Tina2/V3/Configuration_adv.h +++ b/config/examples/Weedo/Tina2/V3/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Weistek/wt150/Configuration_adv.h b/config/examples/Weistek/wt150/Configuration_adv.h index 84e3a26445..ec54cc4ee5 100644 --- a/config/examples/Weistek/wt150/Configuration_adv.h +++ b/config/examples/Weistek/wt150/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Zonestar/P802M/Configuration_adv.h b/config/examples/Zonestar/P802M/Configuration_adv.h index 77f871315e..a64a8dedf8 100644 --- a/config/examples/Zonestar/P802M/Configuration_adv.h +++ b/config/examples/Zonestar/P802M/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Zonestar/P802QR2/BigTreeTech SKR 1.4 Turbo (A4988)/Configuration_adv.h b/config/examples/Zonestar/P802QR2/BigTreeTech SKR 1.4 Turbo (A4988)/Configuration_adv.h index d9369cfd39..753a81a7cc 100644 --- a/config/examples/Zonestar/P802QR2/BigTreeTech SKR 1.4 Turbo (A4988)/Configuration_adv.h +++ b/config/examples/Zonestar/P802QR2/BigTreeTech SKR 1.4 Turbo (A4988)/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/Zonestar/P802QR2/BigTreeTech SKR 1.4 Turbo (TMC2209)/Configuration_adv.h b/config/examples/Zonestar/P802QR2/BigTreeTech SKR 1.4 Turbo (TMC2209)/Configuration_adv.h index 28fd0e8021..1694c5ddbb 100755 --- a/config/examples/Zonestar/P802QR2/BigTreeTech SKR 1.4 Turbo (TMC2209)/Configuration_adv.h +++ b/config/examples/Zonestar/P802QR2/BigTreeTech SKR 1.4 Turbo (TMC2209)/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Anycubic/Kossel Linear Plus/Configuration_adv.h b/config/examples/delta/Anycubic/Kossel Linear Plus/Configuration_adv.h index 11e43d8490..38878f25b3 100644 --- a/config/examples/delta/Anycubic/Kossel Linear Plus/Configuration_adv.h +++ b/config/examples/delta/Anycubic/Kossel Linear Plus/Configuration_adv.h @@ -1087,7 +1087,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1126,6 +1170,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h index ed53a9807d..d9d1c15c96 100644 --- a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h +++ b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Anycubic/Predator/Configuration_adv.h b/config/examples/delta/Anycubic/Predator/Configuration_adv.h index f5ace0ab6b..69224fc25e 100644 --- a/config/examples/delta/Anycubic/Predator/Configuration_adv.h +++ b/config/examples/delta/Anycubic/Predator/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h b/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h index 0696cd3b91..4357890425 100644 --- a/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h +++ b/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h b/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h index 0696cd3b91..4357890425 100644 --- a/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h +++ b/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/FLSUN/Q5-nano_v1/Configuration_adv.h b/config/examples/delta/FLSUN/Q5-nano_v1/Configuration_adv.h index 88b409ccde..0033b65008 100644 --- a/config/examples/delta/FLSUN/Q5-nano_v1/Configuration_adv.h +++ b/config/examples/delta/FLSUN/Q5-nano_v1/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/FLSUN/QQ-S/Configuration_adv.h b/config/examples/delta/FLSUN/QQ-S/Configuration_adv.h index 0bcbe3c006..9dfe7f6f8a 100644 --- a/config/examples/delta/FLSUN/QQ-S/Configuration_adv.h +++ b/config/examples/delta/FLSUN/QQ-S/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/FLSUN/QQS-Pro/Configuration_adv.h b/config/examples/delta/FLSUN/QQS-Pro/Configuration_adv.h index d270f1b593..0bda027422 100644 --- a/config/examples/delta/FLSUN/QQS-Pro/Configuration_adv.h +++ b/config/examples/delta/FLSUN/QQS-Pro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index aa862584a8..1610e0f141 100644 --- a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/config/examples/delta/FLSUN/kossel/Configuration_adv.h index aa862584a8..1610e0f141 100644 --- a/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index e44e499314..4ec60c446a 100644 --- a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Geeetech/G2/Configuration_adv.h b/config/examples/delta/Geeetech/G2/Configuration_adv.h index fc223da8a5..1f29e40123 100644 --- a/config/examples/delta/Geeetech/G2/Configuration_adv.h +++ b/config/examples/delta/Geeetech/G2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Geeetech/G2Pro/Configuration_adv.h b/config/examples/delta/Geeetech/G2Pro/Configuration_adv.h index fc223da8a5..1f29e40123 100644 --- a/config/examples/delta/Geeetech/G2Pro/Configuration_adv.h +++ b/config/examples/delta/Geeetech/G2Pro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Geeetech/G2S/Configuration_adv.h b/config/examples/delta/Geeetech/G2S/Configuration_adv.h index fc223da8a5..1f29e40123 100644 --- a/config/examples/delta/Geeetech/G2S/Configuration_adv.h +++ b/config/examples/delta/Geeetech/G2S/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Geeetech/G2SPro/Configuration_adv.h b/config/examples/delta/Geeetech/G2SPro/Configuration_adv.h index fc223da8a5..1f29e40123 100644 --- a/config/examples/delta/Geeetech/G2SPro/Configuration_adv.h +++ b/config/examples/delta/Geeetech/G2SPro/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h index 0d6af1edc6..8ef56472da 100644 --- a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h +++ b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Hatchbox_Alpha/Configuration_adv.h b/config/examples/delta/Hatchbox_Alpha/Configuration_adv.h index 076f08f0c2..0f4bbc00af 100644 --- a/config/examples/delta/Hatchbox_Alpha/Configuration_adv.h +++ b/config/examples/delta/Hatchbox_Alpha/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/MKS/SBASE/Configuration_adv.h b/config/examples/delta/MKS/SBASE/Configuration_adv.h index 30352d1597..cc07f6b872 100644 --- a/config/examples/delta/MKS/SBASE/Configuration_adv.h +++ b/config/examples/delta/MKS/SBASE/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Malyan M300/Configuration_adv.h b/config/examples/delta/Malyan M300/Configuration_adv.h index 3021ebd488..be17db869f 100644 --- a/config/examples/delta/Malyan M300/Configuration_adv.h +++ b/config/examples/delta/Malyan M300/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Tevo Little Monster/Configuration_adv.h b/config/examples/delta/Tevo Little Monster/Configuration_adv.h index 55f5022a96..9324f9bf96 100644 --- a/config/examples/delta/Tevo Little Monster/Configuration_adv.h +++ b/config/examples/delta/Tevo Little Monster/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/Velleman/K8800/Configuration_adv.h b/config/examples/delta/Velleman/K8800/Configuration_adv.h index abe9dc46d2..85526a734e 100644 --- a/config/examples/delta/Velleman/K8800/Configuration_adv.h +++ b/config/examples/delta/Velleman/K8800/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/generic/Configuration_adv.h b/config/examples/delta/generic/Configuration_adv.h index e44e499314..4ec60c446a 100644 --- a/config/examples/delta/generic/Configuration_adv.h +++ b/config/examples/delta/generic/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/kossel_clear/Configuration_adv.h b/config/examples/delta/kossel_clear/Configuration_adv.h index 4df93a07a0..9bccbbeebd 100644 --- a/config/examples/delta/kossel_clear/Configuration_adv.h +++ b/config/examples/delta/kossel_clear/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/delta/kossel_xl/Configuration_adv.h b/config/examples/delta/kossel_xl/Configuration_adv.h index 41934a93c8..3231e96564 100644 --- a/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/config/examples/delta/kossel_xl/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 2c58eedb6a..7b7e54608d 100644 --- a/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/linear_axes/Octopus 8 LINEAR_AXES/Configuration_adv.h b/config/examples/linear_axes/Octopus 8 LINEAR_AXES/Configuration_adv.h index c8c9aca27a..f1dd7cd032 100644 --- a/config/examples/linear_axes/Octopus 8 LINEAR_AXES/Configuration_adv.h +++ b/config/examples/linear_axes/Octopus 8 LINEAR_AXES/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false, false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/linear_axes/RAMPS 5 LINEAR_AXES/Configuration_adv.h b/config/examples/linear_axes/RAMPS 5 LINEAR_AXES/Configuration_adv.h index 01e2674a97..416743d0d5 100644 --- a/config/examples/linear_axes/RAMPS 5 LINEAR_AXES/Configuration_adv.h +++ b/config/examples/linear_axes/RAMPS 5 LINEAR_AXES/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/makibox/Configuration_adv.h b/config/examples/makibox/Configuration_adv.h index 88ba989071..254972c1e2 100644 --- a/config/examples/makibox/Configuration_adv.h +++ b/config/examples/makibox/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles diff --git a/config/examples/tvrrug/Round2/Configuration_adv.h b/config/examples/tvrrug/Round2/Configuration_adv.h index e508a062ab..722a21d18b 100644 --- a/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/config/examples/tvrrug/Round2/Configuration_adv.h @@ -1086,7 +1086,51 @@ #endif -// @section motion +// @section motion control + +/** + * Fixed-time-based Motion Control -- EXPERIMENTAL + * Enable/disable and set parameters with G-code M493. + */ +//#define FT_MOTION +#if ENABLED(FT_MOTION) + #define FTM_DEFAULT_MODE ftMotionMode_ENABLED // Default mode of fixed time control. (Enums in ft_types.h) + #define FTM_DEFAULT_DYNFREQ_MODE dynFreqMode_DISABLED // Default mode of dynamic frequency calculation. (Enums in ft_types.h) + #define FTM_SHAPING_DEFAULT_X_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_SHAPING_DEFAULT_Y_FREQ 37.0f // (Hz) Default peak frequency used by input shapers. + #define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false). + #define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. + #define FTM_SHAPING_ZETA 0.1f // Zeta used by input shapers. + #define FTM_SHAPING_V_TOL 0.05f // Vibration tolerance used by EI input shapers. + + /** + * Advanced configuration + */ + #define FTM_BATCH_SIZE 100 // Batch size for trajectory generation; + // half the window size for Ulendo FBS. + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (1 / FTM_TS) + #define FTM_TS 0.001f // (s) Time step for trajectory generation. (1 / FTM_FS) + #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update. + #define FTM_MIN_TICKS ((STEPPER_TIMER_RATE) / (FTM_STEPPER_FS)) // Minimum stepper ticks between steps. + #define FTM_MIN_SHAPE_FREQ 10 // Minimum shaping frequency. + #define FTM_ZMAX 100 // Maximum delays for shaping functions (even numbers only!). + // Calculate as: + // 1/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZV. + // (FTM_FS / FTM_MIN_SHAPE_FREQ) for ZVD, MZV. + // 3/2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 2HEI. + // 2 * (FTM_FS / FTM_MIN_SHAPE_FREQ) for 3HEI. + #define FTM_STEPS_PER_UNIT_TIME 20 // Interpolated stepper commands per unit time. + // Calculate as (FTM_STEPPER_FS / FTM_FS). + #define FTM_CTS_COMPARE_VAL 10 // Comparison value used in interpolation algorithm. + // Calculate as (FTM_STEPS_PER_UNIT_TIME / 2). + // These values may be configured to adjust duration of loop(). + #define FTM_STEPS_PER_LOOP 60 // Number of stepper commands to generate each loop(). + #define FTM_POINTS_PER_LOOP 100 // Number of trajectory points to generate each loop(). + + // This value may be configured to adjust duration to consume the command buffer. + // Try increasing this value if stepper motion is not smooth. + #define FTM_STEPPERCMD_BUFF_SIZE 1000 // Size of the stepper command buffers. +#endif /** * Input Shaping -- EXPERIMENTAL @@ -1125,6 +1169,8 @@ //#define SHAPING_MENU // Add a menu to the LCD to set shaping parameters. #endif +// @section motion + #define AXIS_RELATIVE_MODES { false, false, false, false } // Add a Duplicate option for well-separated conjoined nozzles