Skip to content

Commit

Permalink
Change Configuration_adv.h to allow multi tools,
Browse files Browse the repository at this point in the history
SPINDLE_FEATURE and LASER_FEATURE
  • Loading branch information
DerAndere1 committed Feb 15, 2025
1 parent 4096c6c commit bfc6725
Showing 1 changed file with 24 additions and 31 deletions.
55 changes: 24 additions & 31 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2789,7 +2789,7 @@
* Universal tool change settings.
* Applies to all types of extruders except where explicitly noted.
*/
#if HAS_MULTI_EXTRUDER
#if HAS_MULTI_TOOLS
// Z raise distance for tool-change, as needed for some extruders
#define TOOLCHANGE_ZRAISE 2 // (mm)
//#define TOOLCHANGE_ZRAISE_BEFORE_RETRACT // Apply raise before swap retraction (if enabled)
Expand Down Expand Up @@ -3649,46 +3649,39 @@
*/
//#define CUTTER_POWER_RELATIVE // Set speed proportional to [SPEED_POWER_MIN...SPEED_POWER_MAX]

#if ENABLED(SPINDLE_FEATURE)
//#define SPINDLE_CHANGE_DIR // Enable if your spindle controller can change spindle direction
#define SPINDLE_CHANGE_DIR_STOP // Enable if the spindle should stop before changing spin direction
#define SPINDLE_INVERT_DIR false // Set to "true" if the spin direction is reversed
/**
* M3/M4 Power Equation
*
* Each tool uses different value ranges for speed / power control.
* These parameters are used to convert between tool power units and PWM.
*
* Speed/Power = (PWMDC / 255 * 100 - SPEED_POWER_INTERCEPT) / SPEED_POWER_SLOPE
* PWMDC = (spdpwr - SPEED_POWER_MIN) / (SPEED_POWER_MAX - SPEED_POWER_MIN) / SPEED_POWER_SLOPE
*/
#if ENABLED(SPINDLE_LASER_USE_PWM)
#define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage
#define SPEED_POWER_MIN 0 // (RPM)
#define SPEED_POWER_MAX 30000 // (RPM) SuperPID router controller 0 - 30,000 RPM
#define SPEED_POWER_STARTUP 80 // (RPM) M3/M4 speed/power default (with no arguments)
#endif

#if ENABLED(SPINDLE_FEATURE)
#define SPINDLE_LASER_POWERUP_DELAY 5000 // (ms) Delay to allow the spindle/laser to come up to speed/power
#define SPINDLE_LASER_POWERDOWN_DELAY 5000 // (ms) Delay to allow the spindle to stop

/**
* M3/M4 Power Equation
*
* Each tool uses different value ranges for speed / power control.
* These parameters are used to convert between tool power units and PWM.
*
* Speed/Power = (PWMDC / 255 * 100 - SPEED_POWER_INTERCEPT) / SPEED_POWER_SLOPE
* PWMDC = (spdpwr - SPEED_POWER_MIN) / (SPEED_POWER_MAX - SPEED_POWER_MIN) / SPEED_POWER_SLOPE
*/
#if ENABLED(SPINDLE_LASER_USE_PWM)
#define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage
#define SPEED_POWER_MIN 5000 // (RPM)
#define SPEED_POWER_MAX 30000 // (RPM) SuperPID router controller 0 - 30,000 RPM
#define SPEED_POWER_STARTUP 25000 // (RPM) M3/M4 speed/power default (with no arguments)
#endif

#else
//#define SPINDLE_CHANGE_DIR // Enable if your spindle controller can change spindle direction
#define SPINDLE_CHANGE_DIR_STOP // Enable if the spindle should stop before changing spin direction
#define SPINDLE_INVERT_DIR false // Set to "true" if the spin direction is reversed
#endif

#if ENABLED(SPINDLE_LASER_USE_PWM)
#define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage
#define SPEED_POWER_MIN 0 // (%) 0-100
#define SPEED_POWER_MAX 100 // (%) 0-100
#define SPEED_POWER_STARTUP 80 // (%) M3/M4 speed/power default (with no arguments)
#endif
#if ENABLED(LASER_FEATURE)
#define LASER_POWERUP_DELAY 50 // (ms) Delay to allow the spindle/laser to come up to speed/power
#define LASER_POWERDOWN_DELAY 50 // (ms) Delay to allow the spindle to stop

// Define the minimum and maximum test pulse time values for a laser test fire function
#define LASER_TEST_PULSE_MIN 1 // (ms) Used with Laser Control Menu
#define LASER_TEST_PULSE_MAX 999 // (ms) Caution: Menu may not show more than 3 characters

#define SPINDLE_LASER_POWERUP_DELAY 50 // (ms) Delay to allow the spindle/laser to come up to speed/power
#define SPINDLE_LASER_POWERDOWN_DELAY 50 // (ms) Delay to allow the spindle to stop

/**
* Laser Safety Timeout
*
Expand Down

0 comments on commit bfc6725

Please sign in to comment.