From d7d80418aedad1c89e27fcba6aab9aa48187b5cc Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 27 Jun 2019 23:06:49 -0500 Subject: [PATCH] Singleton for cutting tools (#14429) --- Marlin/Configuration_adv.h | 52 ++++---- Marlin/src/HAL/HAL_AVR/SanityCheck.h | 66 ++-------- Marlin/src/HAL/HAL_LINUX/SanityCheck.h | 47 +------ Marlin/src/HAL/HAL_LPC1768/SanityCheck.h | 46 +------ Marlin/src/HAL/HAL_STM32/SanityCheck.h | 46 +------ Marlin/src/HAL/HAL_STM32F1/SanityCheck.h | 45 +------ Marlin/src/HAL/HAL_STM32F4/SanityCheck.h | 46 +------ Marlin/src/HAL/HAL_STM32F7/SanityCheck.h | 48 +------ Marlin/src/Marlin.cpp | 15 +-- Marlin/src/feature/spindle_laser.cpp | 99 ++++++++++++++ Marlin/src/feature/spindle_laser.h | 83 ++++++++++++ Marlin/src/gcode/control/M3-M5.cpp | 124 +++--------------- Marlin/src/gcode/gcode.cpp | 2 +- Marlin/src/gcode/gcode.h | 8 +- Marlin/src/inc/Conditionals_adv.h | 2 + Marlin/src/inc/Conditionals_post.h | 2 +- Marlin/src/inc/SanityCheck.h | 70 +++++++++- Marlin/src/lcd/language/language_en.h | 12 ++ Marlin/src/lcd/menu/menu.cpp | 3 +- Marlin/src/lcd/menu/menu.h | 11 +- Marlin/src/lcd/menu/menu_main.cpp | 9 ++ Marlin/src/lcd/menu/menu_spindle_laser.cpp | 54 ++++++++ Marlin/src/lcd/menu/menu_temperature.cpp | 46 ------- Marlin/src/libs/numtostr.cpp | 23 ++-- Marlin/src/libs/numtostr.h | 7 +- Marlin/src/pins/pins_3DRAG.h | 2 +- Marlin/src/pins/pins_AZTEEG_X3.h | 2 +- Marlin/src/pins/pins_AZTEEG_X3_PRO.h | 2 +- Marlin/src/pins/pins_COHESION3D_MINI.h | 2 +- Marlin/src/pins/pins_COHESION3D_REMIX.h | 2 +- Marlin/src/pins/pins_FORMBOT_RAPTOR2.h | 2 +- Marlin/src/pins/pins_MINITRONICS.h | 2 +- Marlin/src/pins/pins_RAMPS.h | 10 +- Marlin/src/pins/pins_RAMPS_FD_V1.h | 2 +- Marlin/src/pins/pins_RAMPS_LINUX.h | 2 +- Marlin/src/pins/pins_RAMPS_RE_ARM.h | 8 +- Marlin/src/pins/pins_SANGUINOLOLU_11.h | 6 +- Marlin/src/pins/pins_STM3R_MINI.h | 2 +- Marlin/src/pins/pins_ULTIMAIN_2.h | 2 +- Marlin/src/pins/pins_ULTIMAKER_OLD.h | 8 +- Marlin/src/pins/pins_Z_BOLT_X_SERIES.h | 2 +- buildroot/share/tests/megaatmega2560-tests | 6 +- config/default/Configuration_adv.h | 52 ++++---- .../3DFabXYZ/Migbot/Configuration_adv.h | 52 ++++---- .../AlephObjects/TAZ4/Configuration_adv.h | 52 ++++---- .../AliExpress/UM2pExt/Configuration_adv.h | 52 ++++---- config/examples/Anet/A2/Configuration_adv.h | 52 ++++---- .../examples/Anet/A2plus/Configuration_adv.h | 52 ++++---- config/examples/Anet/A6/Configuration_adv.h | 52 ++++---- config/examples/Anet/A8/Configuration_adv.h | 52 ++++---- .../examples/Anet/A8plus/Configuration_adv.h | 52 ++++---- config/examples/Anet/E16/Configuration_adv.h | 52 ++++---- .../examples/AnyCubic/i3/Configuration_adv.h | 52 ++++---- config/examples/ArmEd/Configuration_adv.h | 52 ++++---- .../BIBO/TouchX/cyclops/Configuration_adv.h | 52 ++++---- .../BIBO/TouchX/default/Configuration_adv.h | 52 ++++---- .../examples/BQ/Hephestos/Configuration_adv.h | 52 ++++---- .../BQ/Hephestos_2/Configuration_adv.h | 52 ++++---- config/examples/BQ/WITBOX/Configuration_adv.h | 52 ++++---- config/examples/Cartesio/Configuration_adv.h | 52 ++++---- .../Creality/CR-10/Configuration_adv.h | 52 ++++---- .../Creality/CR-10S/Configuration_adv.h | 52 ++++---- .../Creality/CR-10_5S/Configuration_adv.h | 52 ++++---- .../Creality/CR-10mini/Configuration_adv.h | 52 ++++---- .../Creality/CR-8/Configuration_adv.h | 52 ++++---- .../Creality/Ender-2/Configuration_adv.h | 52 ++++---- .../Creality/Ender-3/Configuration_adv.h | 52 ++++---- .../Creality/Ender-4/Configuration_adv.h | 52 ++++---- .../Dagoma/Disco Ultimate/Configuration_adv.h | 52 ++++---- .../Sidewinder X1/Configuration_adv.h | 52 ++++---- .../examples/Einstart-S/Configuration_adv.h | 52 ++++---- config/examples/Felix/Configuration_adv.h | 52 ++++---- .../FlashForge/CreatorPro/Configuration_adv.h | 52 ++++---- .../FolgerTech/i3-2020/Configuration_adv.h | 52 ++++---- .../Formbot/Raptor/Configuration_adv.h | 52 ++++---- .../Formbot/T_Rex_2+/Configuration_adv.h | 52 ++++---- .../Formbot/T_Rex_3/Configuration_adv.h | 52 ++++---- .../Fysetc/AIO_II/Configuration_adv.h | 52 ++++---- .../Fysetc/CHEETAH/Configuration_adv.h | 52 ++++---- .../examples/Fysetc/F6_13/Configuration_adv.h | 52 ++++---- .../examples/Geeetech/A10/Configuration_adv.h | 52 ++++---- .../Geeetech/A10M/Configuration_adv.h | 52 ++++---- .../Geeetech/A20M/Configuration_adv.h | 52 ++++---- .../Geeetech/MeCreator2/Configuration_adv.h | 52 ++++---- .../Prusa i3 Pro C/Configuration_adv.h | 52 ++++---- .../Prusa i3 Pro W/Configuration_adv.h | 52 ++++---- .../Infitary/i3-M508/Configuration_adv.h | 52 ++++---- .../examples/JGAurora/A1/Configuration_adv.h | 52 ++++---- .../examples/JGAurora/A5/Configuration_adv.h | 52 ++++---- .../examples/JGAurora/A5S/Configuration_adv.h | 52 ++++---- .../examples/MakerParts/Configuration_adv.h | 52 ++++---- .../examples/Malyan/M150/Configuration_adv.h | 52 ++++---- .../examples/Malyan/M200/Configuration_adv.h | 52 ++++---- .../Micromake/C1/enhanced/Configuration_adv.h | 52 ++++---- config/examples/Mks/Robin/Configuration_adv.h | 52 ++++---- config/examples/Mks/Sbase/Configuration_adv.h | 52 ++++---- .../RapideLite/RL200/Configuration_adv.h | 52 ++++---- config/examples/RigidBot/Configuration_adv.h | 52 ++++---- config/examples/SCARA/Configuration_adv.h | 52 ++++---- .../Black_STM32F407VET6/Configuration_adv.h | 52 ++++---- .../examples/Sanguinololu/Configuration_adv.h | 52 ++++---- .../Tevo/Tarantula Pro/Configuration_adv.h | 52 ++++---- config/examples/TheBorg/Configuration_adv.h | 52 ++++---- config/examples/TinyBoy2/Configuration_adv.h | 52 ++++---- .../examples/Tronxy/X3A/Configuration_adv.h | 52 ++++---- .../Tronxy/X5S-2E/Configuration_adv.h | 52 ++++---- .../UltiMachine/Archim1/Configuration_adv.h | 52 ++++---- .../UltiMachine/Archim2/Configuration_adv.h | 52 ++++---- .../examples/VORONDesign/Configuration_adv.h | 52 ++++---- .../Velleman/K8200/Configuration_adv.h | 52 ++++---- .../Velleman/K8400/Configuration_adv.h | 52 ++++---- .../WASP/PowerWASP/Configuration_adv.h | 52 ++++---- .../Wanhao/Duplicator 6/Configuration_adv.h | 52 ++++---- .../delta/Anycubic/Kossel/Configuration_adv.h | 52 ++++---- .../FLSUN/auto_calibrate/Configuration_adv.h | 52 ++++---- .../delta/FLSUN/kossel/Configuration_adv.h | 52 ++++---- .../FLSUN/kossel_mini/Configuration_adv.h | 52 ++++---- .../Geeetech/Rostock 301/Configuration_adv.h | 52 ++++---- .../delta/MKS/SBASE/Configuration_adv.h | 52 ++++---- .../Tevo Little Monster/Configuration_adv.h | 52 ++++---- .../delta/generic/Configuration_adv.h | 52 ++++---- .../delta/kossel_mini/Configuration_adv.h | 52 ++++---- .../delta/kossel_xl/Configuration_adv.h | 52 ++++---- .../gCreate/gMax1.5+/Configuration_adv.h | 52 ++++---- config/examples/makibox/Configuration_adv.h | 52 ++++---- .../tvrrug/Round2/Configuration_adv.h | 52 ++++---- config/examples/wt150/Configuration_adv.h | 52 ++++---- 127 files changed, 2773 insertions(+), 2675 deletions(-) create mode 100644 Marlin/src/feature/spindle_laser.cpp create mode 100644 Marlin/src/feature/spindle_laser.h create mode 100644 Marlin/src/lcd/menu/menu_spindle_laser.cpp diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 8339e7ab7..454bcbe20 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/Marlin/src/HAL/HAL_AVR/SanityCheck.h b/Marlin/src/HAL/HAL_AVR/SanityCheck.h index 68bfdc16a..3bcd2f7c2 100644 --- a/Marlin/src/HAL/HAL_AVR/SanityCheck.h +++ b/Marlin/src/HAL/HAL_AVR/SanityCheck.h @@ -22,7 +22,7 @@ #pragma once /** - * Test AVR specific configuration values for errors at compile-time. + * Test AVR-specific configuration values for errors at compile-time. */ /** @@ -43,65 +43,15 @@ #endif /** - * Sanity checks for Spindle / Laser + * Sanity checks for Spindle / Laser PWM */ -#if ENABLED(SPINDLE_LASER_ENABLE) - #if !PIN_EXISTS(SPINDLE_LASER_ENA) - #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN." - #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR) - #error "SPINDLE_DIR_PIN not defined." - #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM) - #if !(WITHIN(SPINDLE_LASER_PWM_PIN, 2, 13) || WITHIN(SPINDLE_LASER_PWM_PIN, 44, 46)) - #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin." - #elif SPINDLE_LASER_POWERUP_DELAY < 1 - #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0." - #elif SPINDLE_LASER_POWERDOWN_DELAY < 1 - #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0." - #elif !defined(SPINDLE_LASER_PWM_INVERT) - #error "SPINDLE_LASER_PWM_INVERT missing." - #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX) - #error "SPINDLE_LASER_PWM equation constant(s) missing." - #elif SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13) - #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt." - #elif PIN_EXISTS(X_MAX) && X_MAX_PIN == SPINDLE_LASER_PWM_PIN - #error "SPINDLE_LASER_PWM pin is in use by X_MAX endstop." - #elif PIN_EXISTS(X_MIN) && X_MIN_PIN == SPINDLE_LASER_PWM_PIN - #error "SPINDLE_LASER_PWM pin is in use by X_MIN endstop." - #elif PIN_EXISTS(Z_STEP) && Z_STEP_PIN == SPINDLE_LASER_PWM_PIN - #error "SPINDLE_LASER_PWM pin in use by Z_STEP." - #elif NUM_SERVOS > 0 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5) - #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system." - #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN." - #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN." - #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN." - #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN." - #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN." - #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN." - #elif PIN_EXISTS(E5_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E5_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E5_AUTO_FAN_PIN." - #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by FAN_PIN." - #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN - #error "SPINDLE_LASER_PWM_PIN is used by FAN1_PIN." - #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN - #error "SPINDLE_LASER_PWM_PIN is used by FAN2_PIN." - #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN." - #elif PIN_EXISTS(MOTOR_CURRENT_PWM_XY) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_XY_PIN - #error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_XY." - #elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_Z_PIN - #error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_Z." - #elif PIN_EXISTS(MOTOR_CURRENT_PWM_E) && SPINDLE_LASER_PWM_PIN == MOTOR_CURRENT_PWM_E_PIN - #error "SPINDLE_LASER_PWM_PIN is used by MOTOR_CURRENT_PWM_E." - #endif +#if ENABLED(SPINDLE_LASER_PWM) + #if SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13) + #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt." + #elif NUM_SERVOS > 0 && (WITHIN(SPINDLE_LASER_PWM_PIN, 2, 3) || SPINDLE_LASER_PWM_PIN == 5) + #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system." #endif -#endif // SPINDLE_LASER_ENABLE +#endif /** * The Trinamic library includes SoftwareSerial.h, leading to a compile error. diff --git a/Marlin/src/HAL/HAL_LINUX/SanityCheck.h b/Marlin/src/HAL/HAL_LINUX/SanityCheck.h index 0b4322512..bb65bed6c 100644 --- a/Marlin/src/HAL/HAL_LINUX/SanityCheck.h +++ b/Marlin/src/HAL/HAL_LINUX/SanityCheck.h @@ -21,50 +21,13 @@ */ /** - * Test X86_64 configuration values for errors at compile-time. + * Test X86_64-specific configuration values for errors at compile-time. */ -#if ENABLED(SPINDLE_LASER_ENABLE) - #if !PIN_EXISTS(SPINDLE_LASER_ENA) - #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN." - #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR) - #error "SPINDLE_DIR_PIN not defined." - #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM) - #if !PWM_PIN(SPINDLE_LASER_PWM_PIN) - #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin." - #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) - #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" - #elif SPINDLE_LASER_POWERUP_DELAY < 1 - #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0." - #elif SPINDLE_LASER_POWERDOWN_DELAY < 1 - #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0." - #elif !defined(SPINDLE_LASER_PWM_INVERT) - #error "SPINDLE_LASER_PWM_INVERT missing." - #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX) - #error "SPINDLE_LASER_PWM equation constant(s) missing." - #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN." - #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN." - #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN." - #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN." - #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN." - #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN." - #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN." - #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN." - #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN." - #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN." - #endif - #endif -#endif // SPINDLE_LASER_ENABLE +// Emulating RAMPS +#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) + #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" +#endif #if ENABLED(FAST_PWM_FAN) #error "FAST_PWM_FAN is not yet implemented for this platform." diff --git a/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h index c0ba833f2..4813be28f 100644 --- a/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h +++ b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h @@ -21,50 +21,12 @@ */ /** - * Test Re-ARM specific configuration values for errors at compile-time. + * Test LPC176x-specific configuration values for errors at compile-time. */ -#if ENABLED(SPINDLE_LASER_ENABLE) - #if !PIN_EXISTS(SPINDLE_LASER_ENA) - #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN." - #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR) - #error "SPINDLE_DIR_PIN not defined." - #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM) - #if !PWM_PIN(SPINDLE_LASER_PWM_PIN) - #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin." - #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) - #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" - #elif SPINDLE_LASER_POWERUP_DELAY < 1 - #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0." - #elif SPINDLE_LASER_POWERDOWN_DELAY < 1 - #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0." - #elif !defined(SPINDLE_LASER_PWM_INVERT) - #error "SPINDLE_LASER_PWM_INVERT missing." - #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX) - #error "SPINDLE_LASER_PWM equation constant(s) missing." - #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN." - #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN." - #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN." - #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN." - #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN." - #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN." - #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN." - #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN." - #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN." - #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN." - #endif - #endif -#endif // SPINDLE_LASER_ENABLE +//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) +// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" +//#endif #if IS_RE_ARM_BOARD && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI) #error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 require TMC_USE_SW_SPI" diff --git a/Marlin/src/HAL/HAL_STM32/SanityCheck.h b/Marlin/src/HAL/HAL_STM32/SanityCheck.h index 6c6ede24b..8188c8747 100644 --- a/Marlin/src/HAL/HAL_STM32/SanityCheck.h +++ b/Marlin/src/HAL/HAL_STM32/SanityCheck.h @@ -22,49 +22,11 @@ #pragma once /** - * Test Re-ARM specific configuration values for errors at compile-time. + * Test STM32-specific configuration values for errors at compile-time. */ -#if ENABLED(SPINDLE_LASER_ENABLE) - #if !PIN_EXISTS(SPINDLE_LASER_ENA) - #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN." - #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR) - #error "SPINDLE_DIR_PIN not defined." - #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM) - #if !PWM_PIN(SPINDLE_LASER_PWM_PIN) - #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin." - #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) - #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" - #elif SPINDLE_LASER_POWERUP_DELAY < 1 - #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0." - #elif SPINDLE_LASER_POWERDOWN_DELAY < 1 - #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0." - #elif !defined(SPINDLE_LASER_PWM_INVERT) - #error "SPINDLE_LASER_PWM_INVERT missing." - #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX) - #error "SPINDLE_LASER_PWM equation constant(s) missing." - #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN." - #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN." - #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN." - #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN." - #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN." - #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN." - #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN." - #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN." - #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN." - #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN." - #endif - #endif -#endif // SPINDLE_LASER_ENABLE +//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) +// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" +//#endif #if ENABLED(EMERGENCY_PARSER) #error "EMERGENCY_PARSER is not yet implemented for STM32. Disable EMERGENCY_PARSER to continue." diff --git a/Marlin/src/HAL/HAL_STM32F1/SanityCheck.h b/Marlin/src/HAL/HAL_STM32F1/SanityCheck.h index c1470ca51..483ee9f39 100644 --- a/Marlin/src/HAL/HAL_STM32F1/SanityCheck.h +++ b/Marlin/src/HAL/HAL_STM32F1/SanityCheck.h @@ -21,52 +21,9 @@ */ /** - * HAL for stm32duino.com based on Libmaple and compatible (STM32F1) + * Test STM32F1-specific configuration values for errors at compile-time. */ -/** - * Test Re-ARM specific configuration values for errors at compile-time. - */ -#if ENABLED(SPINDLE_LASER_ENABLE) - #if !PIN_EXISTS(SPINDLE_LASER_ENA) - #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN." - #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR) - #error "SPINDLE_DIR_PIN not defined." - #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM) - #if !PWM_PIN(SPINDLE_LASER_PWM_PIN) - #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin." - #elif SPINDLE_LASER_POWERUP_DELAY < 0 - #error "SPINDLE_LASER_POWERUP_DELAY must be positive" - #elif SPINDLE_LASER_POWERDOWN_DELAY < 0 - #error "SPINDLE_LASER_POWERDOWN_DELAY must be positive" - #elif !defined(SPINDLE_LASER_PWM_INVERT) - #error "SPINDLE_LASER_PWM_INVERT missing." - #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX) - #error "SPINDLE_LASER_PWM equation constant(s) missing." - #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN." - #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN." - #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN." - #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN." - #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN." - #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN." - #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN." - #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN." - #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN." - #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN." - #endif - #endif -#endif // SPINDLE_LASER_ENABLE - #if ENABLED(EMERGENCY_PARSER) #error "EMERGENCY_PARSER is not yet implemented for STM32F1. Disable EMERGENCY_PARSER to continue." #endif diff --git a/Marlin/src/HAL/HAL_STM32F4/SanityCheck.h b/Marlin/src/HAL/HAL_STM32F4/SanityCheck.h index 441daf925..7b1629bb2 100644 --- a/Marlin/src/HAL/HAL_STM32F4/SanityCheck.h +++ b/Marlin/src/HAL/HAL_STM32F4/SanityCheck.h @@ -21,49 +21,11 @@ */ /** - * Test Re-ARM specific configuration values for errors at compile-time. + * Test STM32F4-specific configuration values for errors at compile-time. */ -#if ENABLED(SPINDLE_LASER_ENABLE) - #if !PIN_EXISTS(SPINDLE_LASER_ENA) - #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN." - #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR) - #error "SPINDLE_DIR_PIN not defined." - #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM) - #if !PWM_PIN(SPINDLE_LASER_PWM_PIN) - #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin." - #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) - #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" - #elif SPINDLE_LASER_POWERUP_DELAY < 1 - #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0." - #elif SPINDLE_LASER_POWERDOWN_DELAY < 1 - #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0." - #elif !defined(SPINDLE_LASER_PWM_INVERT) - #error "SPINDLE_LASER_PWM_INVERT missing." - #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX) - #error "SPINDLE_LASER_PWM equation constant(s) missing." - #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN." - #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN." - #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN." - #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN." - #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN." - #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN." - #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN." - #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN." - #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN." - #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN." - #endif - #endif -#endif // SPINDLE_LASER_ENABLE +//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) +// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" +//#endif #if ENABLED(EMERGENCY_PARSER) #error "EMERGENCY_PARSER is not yet implemented for STM32F4. Disable EMERGENCY_PARSER to continue." diff --git a/Marlin/src/HAL/HAL_STM32F7/SanityCheck.h b/Marlin/src/HAL/HAL_STM32F7/SanityCheck.h index 8ba1f870c..cb999ef97 100644 --- a/Marlin/src/HAL/HAL_STM32F7/SanityCheck.h +++ b/Marlin/src/HAL/HAL_STM32F7/SanityCheck.h @@ -21,51 +21,11 @@ */ /** - * Test Re-ARM specific configuration values for errors at compile-time. + * Test STM32F7-specific configuration values for errors at compile-time. */ -#if ENABLED(SPINDLE_LASER_ENABLE) - #if !PIN_EXISTS(SPINDLE_LASER_ENA) - #error "SPINDLE_LASER_ENABLE requires SPINDLE_LASER_ENA_PIN." - #elif SPINDLE_DIR_CHANGE && !PIN_EXISTS(SPINDLE_DIR) - #error "SPINDLE_DIR_PIN not defined." - #elif ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM) - #if !PWM_PIN(SPINDLE_LASER_PWM_PIN) - #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin." - #elif !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) - #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" - #elif SPINDLE_LASER_POWERUP_DELAY < 1 - #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0." - #elif SPINDLE_LASER_POWERDOWN_DELAY < 1 - #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0." - #elif !defined(SPINDLE_LASER_PWM_INVERT) - #error "SPINDLE_LASER_PWM_INVERT missing." - #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX) - #error "SPINDLE_LASER_PWM equation constant(s) missing." - #elif PIN_EXISTS(CASE_LIGHT) && SPINDLE_LASER_PWM_PIN == CASE_LIGHT_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CASE_LIGHT_PIN." - #elif PIN_EXISTS(E0_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E0_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E0_AUTO_FAN_PIN." - #elif PIN_EXISTS(E1_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E1_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E1_AUTO_FAN_PIN." - #elif PIN_EXISTS(E2_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E2_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E2_AUTO_FAN_PIN." - #elif PIN_EXISTS(E3_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E3_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E3_AUTO_FAN_PIN." - #elif PIN_EXISTS(E4_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E4_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E4_AUTO_FAN_PIN." - #elif PIN_EXISTS(E5_AUTO_FAN) && SPINDLE_LASER_PWM_PIN == E5_AUTO_FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by E5_AUTO_FAN_PIN." - #elif PIN_EXISTS(FAN) && SPINDLE_LASER_PWM_PIN == FAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN_PIN." - #elif PIN_EXISTS(FAN1) && SPINDLE_LASER_PWM_PIN == FAN1_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN1_PIN." - #elif PIN_EXISTS(FAN2) && SPINDLE_LASER_PWM_PIN == FAN2_PIN - #error "SPINDLE_LASER_PWM_PIN is used FAN2_PIN." - #elif PIN_EXISTS(CONTROLLERFAN) && SPINDLE_LASER_PWM_PIN == CONTROLLERFAN_PIN - #error "SPINDLE_LASER_PWM_PIN is used by CONTROLLERFAN_PIN." - #endif - #endif -#endif // SPINDLE_LASER_ENABLE +//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) +// #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" +//#endif #if ENABLED(EMERGENCY_PARSER) #error "EMERGENCY_PARSER is not yet implemented for STM32F7. Disable EMERGENCY_PARSER to continue." diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 4ec88d8ae..cd02fc38e 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -106,6 +106,10 @@ #include "feature/tmc_util.h" #endif +#if HAS_CUTTER + #include "feature/spindle_laser.h" +#endif + #if ENABLED(SDSUPPORT) CardReader card; #endif @@ -967,15 +971,8 @@ void setup() { OUT_WRITE(PHOTOGRAPH_PIN, LOW); #endif - #if ENABLED(SPINDLE_LASER_ENABLE) - OUT_WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ENABLE_INVERT); // init spindle to off - #if SPINDLE_DIR_CHANGE - OUT_WRITE(SPINDLE_DIR_PIN, SPINDLE_INVERT_DIR ? 255 : 0); // init rotation to clockwise (M3) - #endif - #if ENABLED(SPINDLE_LASER_PWM) && defined(SPINDLE_LASER_PWM_PIN) && SPINDLE_LASER_PWM_PIN >= 0 - SET_PWM(SPINDLE_LASER_PWM_PIN); - analogWrite(SPINDLE_LASER_PWM_PIN, SPINDLE_LASER_PWM_INVERT ? 255 : 0); // set to lowest speed - #endif + #if HAS_CUTTER + cutter.init(); #endif #if ENABLED(COOLANT_MIST) diff --git a/Marlin/src/feature/spindle_laser.cpp b/Marlin/src/feature/spindle_laser.cpp new file mode 100644 index 000000000..8c0316c78 --- /dev/null +++ b/Marlin/src/feature/spindle_laser.cpp @@ -0,0 +1,99 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * feature/spindle_laser.cpp + */ + +#include "../inc/MarlinConfig.h" + +#if HAS_CUTTER + +#include "spindle_laser.h" + +SpindleLaser cutter; + +cutter_power_t SpindleLaser::power; // = 0 + +void SpindleLaser::init() { + OUT_WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_HIGH); // Init spindle to off + #if ENABLED(SPINDLE_CHANGE_DIR) + OUT_WRITE(SPINDLE_DIR_PIN, SPINDLE_INVERT_DIR ? 255 : 0); // Init rotation to clockwise (M3) + #endif + #if ENABLED(SPINDLE_LASER_PWM) && PIN_EXISTS(SPINDLE_LASER_PWM) + SET_PWM(SPINDLE_LASER_PWM_PIN); + analogWrite(SPINDLE_LASER_PWM_PIN, SPINDLE_LASER_PWM_INVERT ? 255 : 0); // set to lowest speed + #endif +} + +#if ENABLED(SPINDLE_LASER_PWM) + + /** + * ocr_val_mode() is used for debugging and to get the points needed to compute the RPM vs ocr_val line + * + * it accepts inputs of 0-255 + */ + void SpindleLaser::set_ocr(const uint8_t ocr) { + WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ACTIVE_HIGH); // turn spindle on (active low) + #if ENABLED(SPINDLE_LASER_PWM) + analogWrite(SPINDLE_LASER_PWM_PIN, (SPINDLE_LASER_PWM_INVERT) ? 255 - ocr : ocr); + #endif + } + +#endif + +void SpindleLaser::update_output() { + const bool ena = enabled(); + #if ENABLED(SPINDLE_LASER_PWM) + if (ena) { + constexpr float inv_slope = RECIPROCAL(SPEED_POWER_SLOPE), + min_ocr = (SPEED_POWER_MIN - (SPEED_POWER_INTERCEPT)) * inv_slope, // Minimum allowed + max_ocr = (SPEED_POWER_MAX - (SPEED_POWER_INTERCEPT)) * inv_slope; // Maximum allowed + int16_t ocr_val; + if (power <= SPEED_POWER_MIN) ocr_val = min_ocr; // Use minimum if set below + else if (power >= SPEED_POWER_MAX) ocr_val = max_ocr; // Use maximum if set above + else ocr_val = (power - (SPEED_POWER_INTERCEPT)) * inv_slope; // Use calculated OCR value + set_ocr(ocr_val & 0xFF); // ...limited to Atmel PWM max + } + else { // Convert RPM to PWM duty cycle + WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_HIGH); // Turn spindle off (active low) + analogWrite(SPINDLE_LASER_PWM_PIN, SPINDLE_LASER_PWM_INVERT ? 255 : 0); // Only write low byte + } + #else + WRITE(SPINDLE_LASER_ENA_PIN, ena ? SPINDLE_LASER_ACTIVE_HIGH : !SPINDLE_LASER_ACTIVE_HIGH); + #endif + power_delay(ena); +} + +#if ENABLED(SPINDLE_CHANGE_DIR) + + void SpindleLaser::set_direction(const bool reverse) { + const bool dir_state = (reverse == SPINDLE_INVERT_DIR); // Forward (M3) HIGH when not inverted + #if ENABLED(SPINDLE_STOP_ON_DIR_CHANGE) + if (enabled() && READ(SPINDLE_DIR_PIN) != dir_state) disable(); + #endif + WRITE(SPINDLE_DIR_PIN, dir_state); + } + +#endif + +#endif // HAS_CUTTER diff --git a/Marlin/src/feature/spindle_laser.h b/Marlin/src/feature/spindle_laser.h new file mode 100644 index 000000000..cb514d5f3 --- /dev/null +++ b/Marlin/src/feature/spindle_laser.h @@ -0,0 +1,83 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * feature/spindle_laser.h + * Support for Laser Power or Spindle Power & Direction + */ + +#include "../inc/MarlinConfig.h" + +#if ENABLED(SPINDLE_FEATURE) + #define _MSG_CUTTER(M) MSG_SPINDLE_##M +#else + #define _MSG_CUTTER(M) MSG_LASER_##M +#endif +#define MSG_CUTTER(M) _MSG_CUTTER(M) + +#if SPEED_POWER_MAX > 255 + #define cutter_power_t uint16_t + #define CUTTER_MENU_TYPE uint16_5 +#else + #define cutter_power_t uint8_t + #define CUTTER_MENU_TYPE uint8 +#endif + +class SpindleLaser { +public: + static cutter_power_t power; + + static void init(); + + static inline bool enabled() { return !!power; } + + static inline void set_power(const uint8_t pwr) { power = pwr; update_output(); } + + static inline void set_enabled(const bool enable) { set_power(enable ? 255 : 0); } + + //static bool active() { return READ(SPINDLE_LASER_ENA_PIN) == SPINDLE_LASER_ACTIVE_HIGH; } + + #if ENABLED(SPINDLE_LASER_PWM) + static void update_output(); + static void set_ocr(const uint8_t ocr); + static inline void set_ocr_power(const uint8_t pwr) { power = pwr; set_ocr(pwr); } + #else + static inline void update_output() { } + #endif + + // Wait for spindle to spin up or spin down + static inline void power_delay(const bool on) { safe_delay(on ? SPINDLE_LASER_POWERUP_DELAY : SPINDLE_LASER_POWERDOWN_DELAY); } + + #if ENABLED(SPINDLE_CHANGE_DIR) + static void set_direction(const bool reverse); + #else + static inline void set_direction(const bool reverse) { UNUSED(reverse); } + #endif + + static inline void disable() { set_enabled(false); } + static inline void enable_forward() { set_direction(false); set_enabled(true); } + static inline void enable_reverse() { set_direction(true); set_enabled(true); } + +}; + +extern SpindleLaser cutter; diff --git a/Marlin/src/gcode/control/M3-M5.cpp b/Marlin/src/gcode/control/M3-M5.cpp index 132f7bb39..6b8497ea4 100644 --- a/Marlin/src/gcode/control/M3-M5.cpp +++ b/Marlin/src/gcode/control/M3-M5.cpp @@ -22,23 +22,23 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(SPINDLE_LASER_ENABLE) +#if HAS_CUTTER #include "../gcode.h" +#include "../../feature/spindle_laser.h" #include "../../module/stepper.h" -uint8_t spindle_laser_power; // = 0 - /** - * M3: Spindle Clockwise - * M4: Spindle Counter-clockwise + * M3 - Cutter ON (Clockwise) + * M4 - Cutter ON (Counter-clockwise) * - * S0 turns off spindle. + * S - Set power. S0 turns it off. + * O - Set power and OCR * - * If no speed PWM output is defined then M3/M4 just turns it on. + * If no PWM pin is defined then M3/M4 just turns it on. * - * At least 12.8KHz (50Hz * 256) is needed for spindle PWM. - * Hardware PWM is required. ISRs are too slow. + * At least 12.8KHz (50Hz * 256) is needed for Spindle PWM. + * Hardware PWM is required on AVR. ISRs are too slow. * * NOTE: WGM for timers 3, 4, and 5 must be either Mode 1 or Mode 5. * No other settings give a PWM signal that goes from 0 to 5 volts. @@ -59,114 +59,28 @@ uint8_t spindle_laser_power; // = 0 * * PWM duty cycle goes from 0 (off) to 255 (always on). */ - -// Wait for spindle to come up to speed -inline void delay_for_power_up() { safe_delay(SPINDLE_LASER_POWERUP_DELAY); } - -// Wait for spindle to stop turning -inline void delay_for_power_down() { safe_delay(SPINDLE_LASER_POWERDOWN_DELAY); } - -/** - * ocr_val_mode() is used for debugging and to get the points needed to compute the RPM vs ocr_val line - * - * it accepts inputs of 0-255 - */ - -inline void set_spindle_laser_ocr(const uint8_t ocr) { - WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ENABLE_INVERT); // turn spindle on (active low) - #if ENABLED(SPINDLE_LASER_PWM) - analogWrite(SPINDLE_LASER_PWM_PIN, (SPINDLE_LASER_PWM_INVERT) ? 255 - ocr : ocr); - #endif -} - -#if ENABLED(SPINDLE_LASER_PWM) - - void update_spindle_laser_power() { - if (spindle_laser_power == 0) { - WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ENABLE_INVERT); // turn spindle off (active low) - analogWrite(SPINDLE_LASER_PWM_PIN, SPINDLE_LASER_PWM_INVERT ? 255 : 0); // only write low byte - delay_for_power_down(); - } - else { // Convert RPM to PWM duty cycle - constexpr float inv_slope = 1.0f / (SPEED_POWER_SLOPE), - min_ocr = (SPEED_POWER_MIN - (SPEED_POWER_INTERCEPT)) * inv_slope, // Minimum allowed - max_ocr = (SPEED_POWER_MAX - (SPEED_POWER_INTERCEPT)) * inv_slope; // Maximum allowed - int16_t ocr_val; - if (spindle_laser_power <= SPEED_POWER_MIN) ocr_val = min_ocr; // Use minimum if set below - else if (spindle_laser_power >= SPEED_POWER_MAX) ocr_val = max_ocr; // Use maximum if set above - else ocr_val = (spindle_laser_power - (SPEED_POWER_INTERCEPT)) * inv_slope; // Use calculated OCR value - set_spindle_laser_ocr(ocr_val & 0xFF); // ...limited to Atmel PWM max - delay_for_power_up(); - } - } - -#endif // SPINDLE_LASER_PWM - -bool spindle_laser_enabled() { - return !!spindle_laser_power; // READ(SPINDLE_LASER_ENA_PIN) == SPINDLE_LASER_ENABLE_INVERT; -} - -void set_spindle_laser_enabled(const bool enable) { - // Enabled by PWM setting elsewhere - spindle_laser_power = enable ? 255 : 0; - #if ENABLED(SPINDLE_LASER_PWM) - update_spindle_laser_power(); - #else - if (enable) { - WRITE(SPINDLE_LASER_ENA_PIN, SPINDLE_LASER_ENABLE_INVERT); - delay_for_power_up(); - } - else { - WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ENABLE_INVERT); - delay_for_power_down(); - } - #endif -} - -#if SPINDLE_DIR_CHANGE - - void set_spindle_direction(const bool reverse_dir) { - const bool dir_state = (reverse_dir == SPINDLE_INVERT_DIR); // Forward (M3) HIGH when not inverted - if (SPINDLE_STOP_ON_DIR_CHANGE && spindle_laser_enabled() && READ(SPINDLE_DIR_PIN) != dir_state) - set_spindle_laser_enabled(false); - WRITE(SPINDLE_DIR_PIN, dir_state); - } - -#endif - void GcodeSuite::M3_M4(const bool is_M4) { - planner.synchronize(); // wait until previous movement commands (G0/G0/G2/G3) have completed before playing with the spindle + planner.synchronize(); // Wait for previous movement commands (G0/G0/G2/G3) to complete before changing power - #if SPINDLE_DIR_CHANGE - set_spindle_direction(is_M4); - #endif + cutter.set_direction(is_M4); - /** - * Our final value for ocr_val is an unsigned 8 bit value between 0 and 255 which usually means uint8_t. - * Went to uint16_t because some of the uint8_t calculations would sometimes give 1000 0000 rather than 1111 1111. - * Then needed to AND the uint16_t result with 0x00FF to make sure we only wrote the byte of interest. - */ #if ENABLED(SPINDLE_LASER_PWM) - if (parser.seen('O')) { - spindle_laser_power = parser.value_byte(); - set_spindle_laser_ocr(spindle_laser_power); - } - else { - spindle_laser_power = parser.intval('S', 255); - update_spindle_laser_power(); - } + if (parser.seen('O')) + cutter.set_ocr_power(parser.value_byte()); // The OCR is a value from 0 to 255 (uint8_t) + else + cutter.set_power(parser.intval('S', 255)); #else - set_spindle_laser_enabled(true); + cutter.set_enabled(true); #endif } /** - * M5 turn off spindle + * M5 - Cutter OFF */ void GcodeSuite::M5() { planner.synchronize(); - set_spindle_laser_enabled(false); + cutter.set_enabled(false); } -#endif // SPINDLE_LASER_ENABLE +#endif // HAS_CUTTER diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 98091f78f..4b4bc70a2 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -322,7 +322,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 1: M0_M1(); break; // M1: Conditional stop - Wait for user button press on LCD #endif - #if ENABLED(SPINDLE_LASER_ENABLE) + #if HAS_CUTTER case 3: M3_M4(false); break; // M3: Turn ON Laser | Spindle (clockwise), set Power | Speed case 4: M3_M4(true ); break; // M4: Turn ON Laser | Spindle (counter-clockwise), set Power | Speed case 5: M5(); break; // M5: Turn OFF Laser | Spindle diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index d5656c7a4..8878cf9ab 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -75,9 +75,9 @@ * * M0 - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled) * M1 -> M0 - * M3 - Turn ON Laser | Spindle (clockwise), set Power | Speed. (Requires SPINDLE_LASER_ENABLE) - * M4 - Turn ON Laser | Spindle (counter-clockwise), set Power | Speed. (Requires SPINDLE_LASER_ENABLE) - * M5 - Turn OFF Laser | Spindle. (Requires SPINDLE_LASER_ENABLE) + * M3 - Turn ON Laser | Spindle (clockwise), set Power | Speed. (Requires SPINDLE_FEATURE or LASER_FEATURE) + * M4 - Turn ON Laser | Spindle (counter-clockwise), set Power | Speed. (Requires SPINDLE_FEATURE or LASER_FEATURE) + * M5 - Turn OFF Laser | Spindle. (Requires SPINDLE_FEATURE or LASER_FEATURE) * M7 - Turn mist coolant ON. (Requires COOLANT_CONTROL) * M8 - Turn flood coolant ON. (Requires COOLANT_CONTROL) * M9 - Turn coolant OFF. (Requires COOLANT_CONTROL) @@ -453,7 +453,7 @@ private: static void M0_M1(); #endif - #if ENABLED(SPINDLE_LASER_ENABLE) + #if HAS_CUTTER static void M3_M4(const bool is_M4); static void M5(); #endif diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 0e2295cba..f4b0c3fb1 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -26,6 +26,8 @@ * Defines that depend on advanced configuration. */ +#define HAS_CUTTER EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #if !defined(__AVR__) || !defined(USBCON) // Define constants and variables for buffering serial data. // Use only 0 or powers of 2 greater than 1 diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 83d081d93..06f51920f 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -1692,7 +1692,7 @@ #endif #endif -// needs to be here so that we catch the above changes to our defines +// Defined here to catch the above defines #if ENABLED(SDCARD_SORT_ALPHA) #define HAS_FOLDER_SORTING (FOLDER_SORTING || ENABLED(SDSORT_GCODE)) #endif diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a0a416e3e..37174c9b7 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -348,8 +348,16 @@ #error "MAX6675_SS is now MAX6675_SS_PIN. Please update your configuration and/or pins." #elif defined(MAX6675_SS2) #error "MAX6675_SS2 is now MAX6675_SS2_PIN. Please update your configuration and/or pins." +#elif defined(SPINDLE_LASER_ENABLE) + #error "SPINDLE_LASER_ENABLE is now SPINDLE_FEATURE or LASER_FEATURE. Please update your Configuration_adv.h." #elif defined(SPINDLE_LASER_ENABLE_PIN) - #error "SPINDLE_LASER_ENABLE_PIN is now SPINDLE_LASER_ENA_PIN. Please update your configuration and/or pins." + #error "SPINDLE_LASER_ENABLE_PIN is now SPINDLE_LASER_ENA_PIN. Please update your Configuration_adv.h and/or pins." +#elif defined(SPINDLE_DIR_CHANGE) + #error "SPINDLE_DIR_CHANGE is now SPINDLE_CHANGE_DIR. Please update your Configuration_adv.h." +#elif defined(SPINDLE_STOP_ON_DIR_CHANGE) + #error "SPINDLE_STOP_ON_DIR_CHANGE is now SPINDLE_CHANGE_DIR_STOP. Please update your Configuration_adv.h." +#elif defined(SPINDLE_LASER_ENABLE_INVERT) + #error "SPINDLE_LASER_ENABLE_INVERT is now SPINDLE_LASER_ACTIVE_HIGH. Please update your Configuration_adv.h." #elif defined(CHAMBER_HEATER_PIN) #error "CHAMBER_HEATER_PIN is now HEATER_CHAMBER_PIN. Please update your configuration and/or pins." #elif defined(TMC_Z_CALIBRATION) @@ -2284,3 +2292,63 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #error "MIN_ and MAX_SOFTWARE_ENDSTOPS are both required with offset hotends." #endif #endif + +#if HAS_CUTTER + #define _PIN_CONFLICT(P) (PIN_EXISTS(P) && P##_PIN == SPINDLE_LASER_PWM_PIN) + #if BOTH(SPINDLE_FEATURE, LASER_FEATURE) + #error "Enable only one of SPINDLE_FEATURE or LASER_FEATURE." + #elif !PIN_EXISTS(SPINDLE_LASER_ENA) + #error "(SPINDLE|LASER)_FEATURE requires SPINDLE_LASER_ENA_PIN." + #elif ENABLED(SPINDLE_CHANGE_DIR) && !PIN_EXISTS(SPINDLE_DIR) + #error "SPINDLE_DIR_PIN is required for SPINDLE_CHANGE_DIR." + #elif ENABLED(SPINDLE_LASER_PWM) + #if !defined(SPINDLE_LASER_PWM_PIN) || SPINDLE_LASER_PWM_PIN < 0 + #error "SPINDLE_LASER_PWM_PIN is required for SPINDLE_LASER_PWM." + #elif !PWM_PIN(SPINDLE_LASER_PWM_PIN) + #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin." + #elif SPINDLE_LASER_POWERUP_DELAY < 1 + #error "SPINDLE_LASER_POWERUP_DELAY must be greater than 0." + #elif SPINDLE_LASER_POWERDOWN_DELAY < 1 + #error "SPINDLE_LASER_POWERDOWN_DELAY must be greater than 0." + #elif !defined(SPINDLE_LASER_PWM_INVERT) + #error "SPINDLE_LASER_PWM_INVERT is required for (SPINDLE|LASER)_FEATURE." + #elif !defined(SPEED_POWER_SLOPE) || !defined(SPEED_POWER_INTERCEPT) || !defined(SPEED_POWER_MIN) || !defined(SPEED_POWER_MAX) + #error "SPINDLE_LASER_PWM equation constant(s) missing." + #elif _PIN_CONFLICT(X_MIN) + #error "SPINDLE_LASER_PWM pin conflicts with X_MIN_PIN." + #elif _PIN_CONFLICT(X_MAX) + #error "SPINDLE_LASER_PWM pin conflicts with X_MAX_PIN." + #elif _PIN_CONFLICT(Z_STEP) + #error "SPINDLE_LASER_PWM pin conflicts with Z_STEP_PIN." + #elif _PIN_CONFLICT(CASE_LIGHT) + #error "SPINDLE_LASER_PWM_PIN conflicts with CASE_LIGHT_PIN." + #elif _PIN_CONFLICT(E0_AUTO_FAN) + #error "SPINDLE_LASER_PWM_PIN conflicts with E0_AUTO_FAN_PIN." + #elif _PIN_CONFLICT(E1_AUTO_FAN) + #error "SPINDLE_LASER_PWM_PIN conflicts with E1_AUTO_FAN_PIN." + #elif _PIN_CONFLICT(E2_AUTO_FAN) + #error "SPINDLE_LASER_PWM_PIN conflicts with E2_AUTO_FAN_PIN." + #elif _PIN_CONFLICT(E3_AUTO_FAN) + #error "SPINDLE_LASER_PWM_PIN conflicts with E3_AUTO_FAN_PIN." + #elif _PIN_CONFLICT(E4_AUTO_FAN) + #error "SPINDLE_LASER_PWM_PIN conflicts with E4_AUTO_FAN_PIN." + #elif _PIN_CONFLICT(E5_AUTO_FAN) + #error "SPINDLE_LASER_PWM_PIN conflicts with E5_AUTO_FAN_PIN." + #elif _PIN_CONFLICT(FAN) + #error "SPINDLE_LASER_PWM_PIN conflicts with FAN_PIN." + #elif _PIN_CONFLICT(FAN1) + #error "SPINDLE_LASER_PWM_PIN conflicts with FAN1_PIN." + #elif _PIN_CONFLICT(FAN2) + #error "SPINDLE_LASER_PWM_PIN conflicts with FAN2_PIN." + #elif _PIN_CONFLICT(CONTROLLERFAN) + #error "SPINDLE_LASER_PWM_PIN conflicts with CONTROLLERFAN_PIN." + #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_XY) + #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_XY." + #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_Z) + #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_Z." + #elif _PIN_CONFLICT(MOTOR_CURRENT_PWM_E) + #error "SPINDLE_LASER_PWM_PIN conflicts with MOTOR_CURRENT_PWM_E." + #endif + #endif + #undef _PIN_CONFLICT +#endif diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 2fee46b2f..dcb96e6d7 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -190,6 +190,18 @@ #ifndef MSG_LASER_POWER #define MSG_LASER_POWER _UxGT("Laser power") #endif +#ifndef MSG_SPINDLE_MENU + #define MSG_SPINDLE_MENU _UxGT("Spindle Control") +#endif +#ifndef MSG_SPINDLE_OFF + #define MSG_SPINDLE_OFF _UxGT("Spindle Off") +#endif +#ifndef MSG_SPINDLE_ON + #define MSG_SPINDLE_ON _UxGT("Spindle On") +#endif +#ifndef MSG_SPINDLE_POWER + #define MSG_SPINDLE_POWER _UxGT("Spindle power") +#endif #ifndef MSG_SPINDLE_REVERSE #define MSG_SPINDLE_REVERSE _UxGT("Spindle Reverse") #endif diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index f13b370d2..16dfd22a4 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -162,7 +162,8 @@ DEFINE_MENU_EDIT_ITEM(int4); // 1234, -123 right-justified DEFINE_MENU_EDIT_ITEM(int8); // 123, -12 right-justified DEFINE_MENU_EDIT_ITEM(uint8); // 123 right-justified DEFINE_MENU_EDIT_ITEM(uint16_3); // 123, -12 right-justified -DEFINE_MENU_EDIT_ITEM(uint16_4); // 1234, -123 right-justified +DEFINE_MENU_EDIT_ITEM(uint16_4); // 1234 right-justified +DEFINE_MENU_EDIT_ITEM(uint16_5); // 12345 right-justified DEFINE_MENU_EDIT_ITEM(float3); // 123 right-justified DEFINE_MENU_EDIT_ITEM(float52); // 123.45 DEFINE_MENU_EDIT_ITEM(float43); // 1.234 diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index 8135d2a97..fb1e45474 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -51,8 +51,9 @@ DECLARE_MENU_EDIT_TYPE(int16_t, int3, i16tostr3, 1 ); // 123 DECLARE_MENU_EDIT_TYPE(int16_t, int4, i16tostr4sign, 1 ); // 1234, -123 right-justified DECLARE_MENU_EDIT_TYPE(int8_t, int8, i8tostr3, 1 ); // 123, -12 right-justified DECLARE_MENU_EDIT_TYPE(uint8_t, uint8, ui8tostr3, 1 ); // 123 right-justified -DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_3, ui16tostr3, 1 ); // 123, -12 right-justified -DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_4, ui16tostr4, 0.1 ); // 1234, -123 right-justified +DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_3, ui16tostr3, 1 ); // 123 right-justified +DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_4, ui16tostr4, 0.1 ); // 1234 right-justified +DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_5, ui16tostr5, 0.01 ); // 12345 right-justified DECLARE_MENU_EDIT_TYPE(float, float3, ftostr3, 1 ); // 123 right-justified DECLARE_MENU_EDIT_TYPE(float, float52, ftostr42_52, 100 ); // _2.34, 12.34, -2.34 or 123.45, -23.45 DECLARE_MENU_EDIT_TYPE(float, float43, ftostr43sign, 1000 ); // 1.234 @@ -121,8 +122,9 @@ DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int3); // 123, -12 right-justif DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int4); // 1234, -123 right-justified DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(int8); // 123, -12 right-justified DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint8); // 123 right-justified -DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_3); // 123, -12 right-justified -DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_4); // 1234, -123 right-justified +DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_3); // 123 right-justified +DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_4); // 1234 right-justified +DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_5); // 12345 right-justified DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float3); // 123 right-justified DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float52); // _2.34, 12.34, -2.34 or 123.45, -23.45 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float43); // 1.234 @@ -206,6 +208,7 @@ DECLARE_MENU_EDIT_ITEM(int8); DECLARE_MENU_EDIT_ITEM(uint8); DECLARE_MENU_EDIT_ITEM(uint16_3); DECLARE_MENU_EDIT_ITEM(uint16_4); +DECLARE_MENU_EDIT_ITEM(uint16_5); DECLARE_MENU_EDIT_ITEM(float3); DECLARE_MENU_EDIT_ITEM(float52); DECLARE_MENU_EDIT_ITEM(float43); diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index b1887a9bb..0d338f148 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -74,6 +74,11 @@ void menu_configuration(); void menu_led(); #endif +#if HAS_CUTTER + #include "../../feature/spindle_laser.h" + void menu_spindle_laser(); +#endif + #if ENABLED(MIXING_EXTRUDER) void menu_mixer(); #endif @@ -153,6 +158,10 @@ void menu_main() { MENU_ITEM(submenu, MSG_MOTION, menu_motion); } + #if HAS_CUTTER + MENU_ITEM(submenu, MSG_CUTTER(MENU), menu_spindle_laser); + #endif + MENU_ITEM(submenu, MSG_TEMPERATURE, menu_temperature); #if ENABLED(MIXING_EXTRUDER) diff --git a/Marlin/src/lcd/menu/menu_spindle_laser.cpp b/Marlin/src/lcd/menu/menu_spindle_laser.cpp new file mode 100644 index 000000000..d26be6f1e --- /dev/null +++ b/Marlin/src/lcd/menu/menu_spindle_laser.cpp @@ -0,0 +1,54 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +// +// Spindle / Laser Menu +// + +#include "../../inc/MarlinConfig.h" + +#if HAS_CUTTER + + #include "menu.h" + + #include "../../feature/spindle_laser.h" + + void menu_spindle_laser() { + + START_MENU(); + MENU_BACK(MSG_MAIN); + if (cutter.enabled()) { + #if ENABLED(SPINDLE_LASER_PWM) + MENU_ITEM_EDIT_CALLBACK(CUTTER_MENU_TYPE, MSG_CUTTER(POWER), &cutter.power, SPEED_POWER_MIN, SPEED_POWER_MAX, cutter.update_output); + #endif + MENU_ITEM(function, MSG_CUTTER(OFF), cutter.disable); + } + else { + MENU_ITEM(function, MSG_CUTTER(ON), cutter.enable_forward); + #if ENABLED(SPINDLE_CHANGE_DIR) + MENU_ITEM(function, MSG_SPINDLE_REVERSE, cutter.enable_reverse); + #endif + } + END_MENU(); + } + +#endif // HAS_CUTTER diff --git a/Marlin/src/lcd/menu/menu_temperature.cpp b/Marlin/src/lcd/menu/menu_temperature.cpp index dd6bd233a..c84e56435 100644 --- a/Marlin/src/lcd/menu/menu_temperature.cpp +++ b/Marlin/src/lcd/menu/menu_temperature.cpp @@ -303,48 +303,6 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb #endif // HAS_TEMP_HOTEND || HAS_HEATED_BED -#if ENABLED(SPINDLE_LASER_ENABLE) - - extern uint8_t spindle_laser_power; - bool spindle_laser_enabled(); - void set_spindle_laser_enabled(const bool enabled); - #if ENABLED(SPINDLE_LASER_PWM) - void update_spindle_laser_power(); - #endif - - inline void _lcd_spindle_laser_off() { set_spindle_laser_enabled(false); } - void set_spindle_direction(bool); - inline void _lcd_spindle_laser_on(const bool is_M4) { - #if SPINDLE_DIR_CHANGE - set_spindle_direction(is_M4); - #endif - set_spindle_laser_enabled(true); - } - inline void _lcd_spindle_laser_on() { _lcd_spindle_laser_on(false); } - #if SPINDLE_DIR_CHANGE - inline void _lcd_spindle_on_reverse() { _lcd_spindle_laser_on(true); } - #endif - - void menu_spindle_laser() { - START_MENU(); - MENU_BACK(MSG_MAIN); - if (spindle_laser_enabled()) { - #if ENABLED(SPINDLE_LASER_PWM) - MENU_ITEM_EDIT_CALLBACK(uint8, MSG_LASER_POWER, &spindle_laser_power, SPEED_POWER_MIN, SPEED_POWER_MAX, update_spindle_laser_power); - #endif - MENU_ITEM(function, MSG_LASER_OFF, _lcd_spindle_laser_off); - } - else { - MENU_ITEM(function, MSG_LASER_ON, _lcd_spindle_laser_on); - #if SPINDLE_DIR_CHANGE - MENU_ITEM(function, MSG_SPINDLE_REVERSE, _lcd_spindle_on_reverse); - #endif - } - END_MENU(); - } - -#endif // SPINDLE_LASER_ENABLE - void menu_temperature() { START_MENU(); MENU_BACK(MSG_MAIN); @@ -415,10 +373,6 @@ void menu_temperature() { #endif #endif // FAN_COUNT > 0 - #if ENABLED(SPINDLE_LASER_ENABLE) - MENU_ITEM(submenu, MSG_LASER_MENU, menu_spindle_laser); - #endif - #if HAS_TEMP_HOTEND // diff --git a/Marlin/src/libs/numtostr.cpp b/Marlin/src/libs/numtostr.cpp index 09ebf64d2..78f7370fb 100644 --- a/Marlin/src/libs/numtostr.cpp +++ b/Marlin/src/libs/numtostr.cpp @@ -57,12 +57,14 @@ char* i8tostr3(const int8_t x) { return &conv[4]; } -// Convert unsigned 16bit int to string 123 format -char* ui16tostr3(const uint16_t xx) { +// Convert unsigned 16bit int to string 12345 format +char* ui16tostr5(const uint16_t xx) { + conv[2] = RJDIGIT(xx, 10000); + conv[3] = RJDIGIT(xx, 1000); conv[4] = RJDIGIT(xx, 100); conv[5] = RJDIGIT(xx, 10); conv[6] = DIGIMOD(xx, 1); - return &conv[4]; + return &conv[2]; } // Convert unsigned 16bit int to string 1234 format @@ -74,6 +76,14 @@ char* ui16tostr4(const uint16_t xx) { return &conv[3]; } +// Convert unsigned 16bit int to string 123 format +char* ui16tostr3(const uint16_t xx) { + conv[4] = RJDIGIT(xx, 100); + conv[5] = RJDIGIT(xx, 10); + conv[6] = DIGIMOD(xx, 1); + return &conv[4]; +} + // Convert signed 16bit int to rj string with 123 or -12 format char* i16tostr3(const int16_t x) { int xx = x; @@ -215,12 +225,7 @@ char* ftostr54sign(const float &f, char plus/*=' '*/) { // Convert unsigned float to rj string with 12345 format char* ftostr5rj(const float &f) { const long i = ((f < 0 ? -f : f) * 10 + 5) / 10; - conv[2] = RJDIGIT(i, 10000); - conv[3] = RJDIGIT(i, 1000); - conv[4] = RJDIGIT(i, 100); - conv[5] = RJDIGIT(i, 10); - conv[6] = DIGIMOD(i, 1); - return &conv[2]; + return ui16tostr5(i); } // Convert signed float to string with +1234.5 format diff --git a/Marlin/src/libs/numtostr.h b/Marlin/src/libs/numtostr.h index a0da4804e..91f88b984 100644 --- a/Marlin/src/libs/numtostr.h +++ b/Marlin/src/libs/numtostr.h @@ -32,12 +32,15 @@ char* ui8tostr3(const uint8_t i); // Convert int8_t to string with 123 format char* i8tostr3(const int8_t x); -// Convert uint16_t to string with 123 format -char* ui16tostr3(const uint16_t x); +// Convert uint16_t to string with 12345 format +char* ui16tostr5(const uint16_t x); // Convert uint16_t to string with 1234 format char* ui16tostr4(const uint16_t x); +// Convert uint16_t to string with 123 format +char* ui16tostr3(const uint16_t x); + // Convert int16_t to string with 123 format char* i16tostr3(const int16_t x); diff --git a/Marlin/src/pins/pins_3DRAG.h b/Marlin/src/pins/pins_3DRAG.h index f82269b70..361ef107d 100644 --- a/Marlin/src/pins/pins_3DRAG.h +++ b/Marlin/src/pins/pins_3DRAG.h @@ -140,7 +140,7 @@ #undef SPINDLE_LASER_ENA_PIN #undef SPINDLE_DIR_PIN -#if ENABLED(SPINDLE_LASER_ENABLE) +#if HAS_CUTTER #if !EXTRUDERS #undef E0_DIR_PIN #undef E0_ENABLE_PIN diff --git a/Marlin/src/pins/pins_AZTEEG_X3.h b/Marlin/src/pins/pins_AZTEEG_X3.h index e7076cba9..15029fc30 100644 --- a/Marlin/src/pins/pins_AZTEEG_X3.h +++ b/Marlin/src/pins/pins_AZTEEG_X3.h @@ -84,7 +84,7 @@ #undef SPINDLE_LASER_ENA_PIN #undef SPINDLE_DIR_PIN -#if ENABLED(SPINDLE_LASER_ENABLE) +#if HAS_CUTTER #undef SDA // use EXP3 header #undef SCL #if SERVO0_PIN == 7 diff --git a/Marlin/src/pins/pins_AZTEEG_X3_PRO.h b/Marlin/src/pins/pins_AZTEEG_X3_PRO.h index bae70258e..e34ce4b3e 100644 --- a/Marlin/src/pins/pins_AZTEEG_X3_PRO.h +++ b/Marlin/src/pins/pins_AZTEEG_X3_PRO.h @@ -157,7 +157,7 @@ #undef SPINDLE_LASER_ENA_PIN #undef SPINDLE_DIR_PIN -#if ENABLED(SPINDLE_LASER_ENABLE) // EXP2 header +#if HAS_CUTTER // EXP2 header #if ANY(VIKI2, miniVIKI) #undef BTN_EN2 #define BTN_EN2 31 // need 7 for the spindle speed PWM diff --git a/Marlin/src/pins/pins_COHESION3D_MINI.h b/Marlin/src/pins/pins_COHESION3D_MINI.h index 2076a5aeb..b4aa2397d 100644 --- a/Marlin/src/pins/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/pins_COHESION3D_MINI.h @@ -116,7 +116,7 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(SPINDLE_LASER_ENABLE) +#if HAS_CUTTER #undef HEATER_0_PIN #define SPINDLE_LASER_ENA_PIN P2_07 // FET 1 #undef HEATER_BED_PIN diff --git a/Marlin/src/pins/pins_COHESION3D_REMIX.h b/Marlin/src/pins/pins_COHESION3D_REMIX.h index e97742746..feb270b64 100644 --- a/Marlin/src/pins/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/pins_COHESION3D_REMIX.h @@ -137,7 +137,7 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(SPINDLE_LASER_ENABLE) +#if HAS_CUTTER #undef HEATER_0_PIN #undef HEATER_BED_PIN #undef FAN_PIN diff --git a/Marlin/src/pins/pins_FORMBOT_RAPTOR2.h b/Marlin/src/pins/pins_FORMBOT_RAPTOR2.h index 733308f97..278f83422 100644 --- a/Marlin/src/pins/pins_FORMBOT_RAPTOR2.h +++ b/Marlin/src/pins/pins_FORMBOT_RAPTOR2.h @@ -40,7 +40,7 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA) +#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA) #if !NUM_SERVOS // Try to use servo connector first #define SPINDLE_LASER_ENA_PIN 6 // Pin should have a pullup/pulldown! #define SPINDLE_LASER_PWM_PIN 4 // MUST BE HARDWARE PWM diff --git a/Marlin/src/pins/pins_MINITRONICS.h b/Marlin/src/pins/pins_MINITRONICS.h index f54a4f85f..cac17779a 100644 --- a/Marlin/src/pins/pins_MINITRONICS.h +++ b/Marlin/src/pins/pins_MINITRONICS.h @@ -130,7 +130,7 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(SPINDLE_LASER_ENABLE) // assumes we're only doing CNC work (no 3D printing) +#if HAS_CUTTER // assumes we're only doing CNC work (no 3D printing) #undef HEATER_BED_PIN #undef TEMP_BED_PIN // need to free up some pins but also need to #undef TEMP_0_PIN // re-assign them (to unused pins) because Marlin diff --git a/Marlin/src/pins/pins_RAMPS.h b/Marlin/src/pins/pins_RAMPS.h index 9bee431fe..9e0d7f89c 100644 --- a/Marlin/src/pins/pins_RAMPS.h +++ b/Marlin/src/pins/pins_RAMPS.h @@ -255,17 +255,17 @@ #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN) #if NUM_SERVOS <= 1 // try to use servo connector first - #define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM + #define CASE_LIGHT_PIN 6 // MUST BE HARDWARE PWM #elif AUX2_PINS_FREE - #define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM + #define CASE_LIGHT_PIN 44 // MUST BE HARDWARE PWM #endif #endif // // M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA) - #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first +#if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN) + #if !NUM_SERVOS // Use servo connector if possible #define SPINDLE_LASER_ENA_PIN 4 // Pin should have a pullup/pulldown! #define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 5 @@ -273,6 +273,8 @@ #define SPINDLE_LASER_ENA_PIN 40 // Pin should have a pullup/pulldown! #define SPINDLE_LASER_PWM_PIN 44 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 65 + #else + #error "No auto-assignable Spindle/Laser pins available." #endif #endif diff --git a/Marlin/src/pins/pins_RAMPS_FD_V1.h b/Marlin/src/pins/pins_RAMPS_FD_V1.h index 875c2e76b..633da90c3 100644 --- a/Marlin/src/pins/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/pins_RAMPS_FD_V1.h @@ -227,7 +227,7 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if HOTENDS < 3 && ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA) +#if HOTENDS < 3 && HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA) #define SPINDLE_LASER_ENA_PIN 45 // Use E2 ENA #define SPINDLE_LASER_PWM_PIN 12 // MUST BE HARDWARE PWM #define SPINDLE_DIR_PIN 47 // Use E2 DIR diff --git a/Marlin/src/pins/pins_RAMPS_LINUX.h b/Marlin/src/pins/pins_RAMPS_LINUX.h index ff99ed7be..e22a3ba01 100644 --- a/Marlin/src/pins/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/pins_RAMPS_LINUX.h @@ -228,7 +228,7 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA) +#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA) #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first #define SPINDLE_LASER_ENA_PIN 4 // Pin should have a pullup/pulldown! #define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM diff --git a/Marlin/src/pins/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/pins_RAMPS_RE_ARM.h index 3cb537689..5e4ad77fe 100644 --- a/Marlin/src/pins/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/pins_RAMPS_RE_ARM.h @@ -239,9 +239,13 @@ // M3/M4/M5 - Spindle/Laser Control // Use servo pins, if available // -#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA) +#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA) #if NUM_SERVOS > 1 - #error "SPINDLE_LASER_ENABLE requires 3 free servo pins." + #if ENABLED(SPINDLE_FEATURE) + #error "SPINDLE_FEATURE requires 3 free servo pins." + #else + #error "LASER_FEATURE requires 3 free servo pins." + #endif #endif #define SPINDLE_LASER_ENA_PIN SERVO1_PIN // (6) Pin should have a pullup/pulldown! #define SPINDLE_LASER_PWM_PIN SERVO3_PIN // (4) MUST BE HARDWARE PWM diff --git a/Marlin/src/pins/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/pins_SANGUINOLOLU_11.h index 15cfad896..7b2030087 100644 --- a/Marlin/src/pins/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/pins_SANGUINOLOLU_11.h @@ -137,7 +137,7 @@ #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED #endif -#if DISABLED(SPINDLE_LASER_ENABLE) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL) // try to use IO Header +#if NONE(SPINDLE_FEATURE, LASER_FEATURE) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL) // try to use IO Header #define CASE_LIGHT_PIN 4 // MUST BE HARDWARE PWM - see if IO Header is available #endif @@ -276,7 +276,7 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(SPINDLE_LASER_ENABLE) +#if HAS_CUTTER #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !BOTH(ULTRA_LCD, NEWPANEL) // try to use IO Header #define SPINDLE_LASER_ENA_PIN 10 // Pin should have a pullup/pulldown! @@ -322,4 +322,4 @@ #define SPINDLE_LASER_ENA_PIN 21 // Pin should have a pullup! #define SPINDLE_DIR_PIN -1 // No pin available on the socket for the direction pin #endif -#endif // SPINDLE_LASER_ENABLE +#endif diff --git a/Marlin/src/pins/pins_STM3R_MINI.h b/Marlin/src/pins/pins_STM3R_MINI.h index 2088ea7a4..63eda1252 100644 --- a/Marlin/src/pins/pins_STM3R_MINI.h +++ b/Marlin/src/pins/pins_STM3R_MINI.h @@ -106,7 +106,7 @@ #define TEMP_2_PIN PA3 // Laser control -#if ENABLED(SPINDLE_LASER_ENABLE) +#if HAS_CUTTER #define SPINDLE_LASER_PWM_PIN PB8 #define SPINDLE_LASER_ENA_PIN PD5 #endif diff --git a/Marlin/src/pins/pins_ULTIMAIN_2.h b/Marlin/src/pins/pins_ULTIMAIN_2.h index 821494d12..ac4d1c24a 100644 --- a/Marlin/src/pins/pins_ULTIMAIN_2.h +++ b/Marlin/src/pins/pins_ULTIMAIN_2.h @@ -128,7 +128,7 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(SPINDLE_LASER_ENABLE) // use the LED_PIN for spindle speed control or case light +#if HAS_CUTTER // use the LED_PIN for spindle speed control or case light #undef LED_PIN #define SPINDLE_DIR_PIN 16 #define SPINDLE_LASER_ENA_PIN 17 // Pin should have a pullup! diff --git a/Marlin/src/pins/pins_ULTIMAKER_OLD.h b/Marlin/src/pins/pins_ULTIMAKER_OLD.h index 2ea264d88..4064d9013 100644 --- a/Marlin/src/pins/pins_ULTIMAKER_OLD.h +++ b/Marlin/src/pins/pins_ULTIMAKER_OLD.h @@ -80,7 +80,7 @@ #endif #if ENABLED(BOARD_REV_1_0) - #if ENABLED(SPINDLE_LASER_ENABLE) + #if HAS_CUTTER #define X_STOP_PIN 13 // SW1 (didn't change) - also has a useable hardware PWM #define Y_STOP_PIN 12 // SW2 #define Z_STOP_PIN 11 // SW3 @@ -106,7 +106,7 @@ // // Z Probe (when not Z_MIN_PIN) // -#if !defined(Z_MIN_PROBE_PIN) && !BOTH(SPINDLE_LASER_ENABLE, BOARD_REV_1_0) +#if !defined(Z_MIN_PROBE_PIN) && !(HAS_CUTTER && ENABLED(BOARD_REV_1_0)) #define Z_MIN_PROBE_PIN Z_MAX_PIN #endif @@ -125,7 +125,7 @@ #define Z_DIR_PIN 39 #define Z_ENABLE_PIN 35 -#if BOTH(SPINDLE_LASER_ENABLE, BOARD_REV_1_1_TO_1_3) && EXTRUDERS == 1 +#if HAS_CUTTER && ENABLED(BOARD_REV_1_1_TO_1_3) && EXTRUDERS == 1 // Move E0 to the spare and get Spindle/Laser signals from E0 #define E0_STEP_PIN 49 #define E0_DIR_PIN 47 @@ -214,7 +214,7 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(SPINDLE_LASER_ENABLE) +#if HAS_CUTTER #if EITHER(BOARD_REV_1_0, BOARD_REV_1_5) // Use the last three SW positions #define SPINDLE_DIR_PIN 10 // 1.0: SW4 1.5: EXP3-6 ("10") #define SPINDLE_LASER_PWM_PIN 9 // 1.0: SW5 1.5: EXP3-7 ( "9") .. MUST BE HARDWARE PWM diff --git a/Marlin/src/pins/pins_Z_BOLT_X_SERIES.h b/Marlin/src/pins/pins_Z_BOLT_X_SERIES.h index b8d4fdee3..191147001 100644 --- a/Marlin/src/pins/pins_Z_BOLT_X_SERIES.h +++ b/Marlin/src/pins/pins_Z_BOLT_X_SERIES.h @@ -177,7 +177,7 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENA) +#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA) #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first #define SPINDLE_LASER_ENA_PIN 4 // Pin should have a pullup/pulldown! #define SPINDLE_LASER_PWM_PIN 6 // MUST BE HARDWARE PWM diff --git a/buildroot/share/tests/megaatmega2560-tests b/buildroot/share/tests/megaatmega2560-tests index 49b077e31..119438af0 100755 --- a/buildroot/share/tests/megaatmega2560-tests +++ b/buildroot/share/tests/megaatmega2560-tests @@ -58,7 +58,7 @@ opt_set TEMP_SENSOR_3 20 opt_set TEMP_SENSOR_4 1000 opt_set TEMP_SENSOR_BED 1 opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT SKEW_CORRECTION \ - EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT GCODE_MACROS SPINDLE_LASER_ENABLE \ + EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT GCODE_MACROS \ USB_FLASH_DRIVE_SUPPORT SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES LIGHTWEIGHT_UI \ CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING BABYSTEP_XY LIN_ADVANCE NANODLP_Z_SYNC QUICK_HOME JUNCTION_DEVIATION MULTI_NOZZLE_DUPLICATION exec_test $1 $2 "Azteeg X3 with 5 extruders, RRDFGSC, probeless UBL, Linear Advance, and more" @@ -87,8 +87,8 @@ exec_test $1 $2 "RAMPS with ZONESTAR_LCD, Servo Probe, 3-Point ABL, DEBUG_LEVELI # Test MESH_BED_LEVELING feature, with LCD # restore_configs -opt_enable MESH_BED_LEVELING G26_MESH_EDITING MESH_G28_REST_ORIGIN LCD_BED_LEVELING MESH_EDIT_MENU ULTIMAKERCONTROLLER -exec_test $1 $2 "MESH_BED_LEVELING feature, with LCD" +opt_enable SPINDLE_FEATURE MESH_BED_LEVELING G26_MESH_EDITING MESH_G28_REST_ORIGIN LCD_BED_LEVELING MESH_EDIT_MENU ULTIMAKERCONTROLLER +exec_test $1 $2 "Spindle, MESH_BED_LEVELING, and LCD" # # Test MINIRAMBO with PWM_MOTOR_CURRENT and many features diff --git a/config/default/Configuration_adv.h b/config/default/Configuration_adv.h index 3dd9a673f..82190449a 100644 --- a/config/default/Configuration_adv.h +++ b/config/default/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h index 4134562e3..cffb6842c 100644 --- a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h +++ b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 5621b211a..d2db52ff1 100644 --- a/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/AliExpress/UM2pExt/Configuration_adv.h b/config/examples/AliExpress/UM2pExt/Configuration_adv.h index 8d8b300f5..b7c6ea557 100644 --- a/config/examples/AliExpress/UM2pExt/Configuration_adv.h +++ b/config/examples/AliExpress/UM2pExt/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Anet/A2/Configuration_adv.h b/config/examples/Anet/A2/Configuration_adv.h index c988f8218..c0724e11c 100644 --- a/config/examples/Anet/A2/Configuration_adv.h +++ b/config/examples/Anet/A2/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Anet/A2plus/Configuration_adv.h b/config/examples/Anet/A2plus/Configuration_adv.h index c988f8218..c0724e11c 100644 --- a/config/examples/Anet/A2plus/Configuration_adv.h +++ b/config/examples/Anet/A2plus/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Anet/A6/Configuration_adv.h b/config/examples/Anet/A6/Configuration_adv.h index ac340d3b0..ba1fdb63d 100644 --- a/config/examples/Anet/A6/Configuration_adv.h +++ b/config/examples/Anet/A6/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Anet/A8/Configuration_adv.h b/config/examples/Anet/A8/Configuration_adv.h index 56481693a..4a9f54b4d 100644 --- a/config/examples/Anet/A8/Configuration_adv.h +++ b/config/examples/Anet/A8/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Anet/A8plus/Configuration_adv.h b/config/examples/Anet/A8plus/Configuration_adv.h index 095214594..db7162fb5 100644 --- a/config/examples/Anet/A8plus/Configuration_adv.h +++ b/config/examples/Anet/A8plus/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Anet/E16/Configuration_adv.h b/config/examples/Anet/E16/Configuration_adv.h index ba52e4978..3d23a4094 100644 --- a/config/examples/Anet/E16/Configuration_adv.h +++ b/config/examples/Anet/E16/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/AnyCubic/i3/Configuration_adv.h b/config/examples/AnyCubic/i3/Configuration_adv.h index 7a2a4b0eb..99db07809 100644 --- a/config/examples/AnyCubic/i3/Configuration_adv.h +++ b/config/examples/AnyCubic/i3/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/ArmEd/Configuration_adv.h b/config/examples/ArmEd/Configuration_adv.h index 32a374fa0..a12d56e22 100644 --- a/config/examples/ArmEd/Configuration_adv.h +++ b/config/examples/ArmEd/Configuration_adv.h @@ -2125,36 +2125,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h index b0e0f0023..cefd204c7 100644 --- a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/BIBO/TouchX/default/Configuration_adv.h b/config/examples/BIBO/TouchX/default/Configuration_adv.h index e6d8673d4..26708ace4 100644 --- a/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/BQ/Hephestos/Configuration_adv.h b/config/examples/BQ/Hephestos/Configuration_adv.h index 47e960164..ad2db8e8f 100644 --- a/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/config/examples/BQ/Hephestos/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/BQ/Hephestos_2/Configuration_adv.h b/config/examples/BQ/Hephestos_2/Configuration_adv.h index ae4c205b6..75485afc0 100644 --- a/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -2129,36 +2129,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/BQ/WITBOX/Configuration_adv.h b/config/examples/BQ/WITBOX/Configuration_adv.h index 47e960164..ad2db8e8f 100644 --- a/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/config/examples/BQ/WITBOX/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Cartesio/Configuration_adv.h b/config/examples/Cartesio/Configuration_adv.h index 2a2be5cdf..a981df400 100644 --- a/config/examples/Cartesio/Configuration_adv.h +++ b/config/examples/Cartesio/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Creality/CR-10/Configuration_adv.h b/config/examples/Creality/CR-10/Configuration_adv.h index ef0bad95b..ae461d75e 100644 --- a/config/examples/Creality/CR-10/Configuration_adv.h +++ b/config/examples/Creality/CR-10/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Creality/CR-10S/Configuration_adv.h b/config/examples/Creality/CR-10S/Configuration_adv.h index 916d5b2f8..caa4f0fec 100644 --- a/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/config/examples/Creality/CR-10S/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Creality/CR-10_5S/Configuration_adv.h b/config/examples/Creality/CR-10_5S/Configuration_adv.h index efb37fcc8..b006919d7 100644 --- a/config/examples/Creality/CR-10_5S/Configuration_adv.h +++ b/config/examples/Creality/CR-10_5S/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Creality/CR-10mini/Configuration_adv.h b/config/examples/Creality/CR-10mini/Configuration_adv.h index 194e1fb98..d3584a083 100644 --- a/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Creality/CR-8/Configuration_adv.h b/config/examples/Creality/CR-8/Configuration_adv.h index 39166dea0..b013843a8 100644 --- a/config/examples/Creality/CR-8/Configuration_adv.h +++ b/config/examples/Creality/CR-8/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Creality/Ender-2/Configuration_adv.h b/config/examples/Creality/Ender-2/Configuration_adv.h index a99ce4331..98e3eb412 100644 --- a/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/config/examples/Creality/Ender-2/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Creality/Ender-3/Configuration_adv.h b/config/examples/Creality/Ender-3/Configuration_adv.h index bf3db48cc..1f62b760b 100644 --- a/config/examples/Creality/Ender-3/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Creality/Ender-4/Configuration_adv.h b/config/examples/Creality/Ender-4/Configuration_adv.h index 18d4ce597..0533774f0 100644 --- a/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/config/examples/Creality/Ender-4/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h b/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h index e283bdad0..85a49df14 100644 --- a/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h +++ b/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h b/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h index 45e64e3f5..dc2c0b918 100755 --- a/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h +++ b/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Einstart-S/Configuration_adv.h b/config/examples/Einstart-S/Configuration_adv.h index 1d28d2fdd..6ea4e2bd0 100644 --- a/config/examples/Einstart-S/Configuration_adv.h +++ b/config/examples/Einstart-S/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Felix/Configuration_adv.h b/config/examples/Felix/Configuration_adv.h index 8e8973fab..afbe8f9dc 100644 --- a/config/examples/Felix/Configuration_adv.h +++ b/config/examples/Felix/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/FlashForge/CreatorPro/Configuration_adv.h b/config/examples/FlashForge/CreatorPro/Configuration_adv.h index 867915c83..c193bd57a 100644 --- a/config/examples/FlashForge/CreatorPro/Configuration_adv.h +++ b/config/examples/FlashForge/CreatorPro/Configuration_adv.h @@ -2120,36 +2120,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 8635203df..d5dfe4000 100644 --- a/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Formbot/Raptor/Configuration_adv.h b/config/examples/Formbot/Raptor/Configuration_adv.h index 01e0db733..0753ccaf1 100644 --- a/config/examples/Formbot/Raptor/Configuration_adv.h +++ b/config/examples/Formbot/Raptor/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h index dc17649d6..d3b351154 100644 --- a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h +++ b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h @@ -2125,36 +2125,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Formbot/T_Rex_3/Configuration_adv.h b/config/examples/Formbot/T_Rex_3/Configuration_adv.h index f2f226e2c..990d58581 100644 --- a/config/examples/Formbot/T_Rex_3/Configuration_adv.h +++ b/config/examples/Formbot/T_Rex_3/Configuration_adv.h @@ -2125,36 +2125,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Fysetc/AIO_II/Configuration_adv.h b/config/examples/Fysetc/AIO_II/Configuration_adv.h index fb7d33760..5b846a736 100644 --- a/config/examples/Fysetc/AIO_II/Configuration_adv.h +++ b/config/examples/Fysetc/AIO_II/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Fysetc/CHEETAH/Configuration_adv.h b/config/examples/Fysetc/CHEETAH/Configuration_adv.h index 87d5f4de5..c06dd564c 100644 --- a/config/examples/Fysetc/CHEETAH/Configuration_adv.h +++ b/config/examples/Fysetc/CHEETAH/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Fysetc/F6_13/Configuration_adv.h b/config/examples/Fysetc/F6_13/Configuration_adv.h index 5a11c03a0..df8598430 100644 --- a/config/examples/Fysetc/F6_13/Configuration_adv.h +++ b/config/examples/Fysetc/F6_13/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Geeetech/A10/Configuration_adv.h b/config/examples/Geeetech/A10/Configuration_adv.h index 2bb1ad83b..3b2798a1c 100644 --- a/config/examples/Geeetech/A10/Configuration_adv.h +++ b/config/examples/Geeetech/A10/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Geeetech/A10M/Configuration_adv.h b/config/examples/Geeetech/A10M/Configuration_adv.h index e61e7178e..ac62d2764 100644 --- a/config/examples/Geeetech/A10M/Configuration_adv.h +++ b/config/examples/Geeetech/A10M/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Geeetech/A20M/Configuration_adv.h b/config/examples/Geeetech/A20M/Configuration_adv.h index abe146bf7..70231c377 100644 --- a/config/examples/Geeetech/A20M/Configuration_adv.h +++ b/config/examples/Geeetech/A20M/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Geeetech/MeCreator2/Configuration_adv.h b/config/examples/Geeetech/MeCreator2/Configuration_adv.h index 19c263099..67ab2d478 100644 --- a/config/examples/Geeetech/MeCreator2/Configuration_adv.h +++ b/config/examples/Geeetech/MeCreator2/Configuration_adv.h @@ -2120,36 +2120,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** 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 2bb1ad83b..3b2798a1c 100644 --- a/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** 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 2bb1ad83b..3b2798a1c 100644 --- a/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Infitary/i3-M508/Configuration_adv.h b/config/examples/Infitary/i3-M508/Configuration_adv.h index a2c805102..8178dfdb9 100644 --- a/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/JGAurora/A1/Configuration_adv.h b/config/examples/JGAurora/A1/Configuration_adv.h index a0deef379..4abbb7c74 100644 --- a/config/examples/JGAurora/A1/Configuration_adv.h +++ b/config/examples/JGAurora/A1/Configuration_adv.h @@ -2126,36 +2126,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/JGAurora/A5/Configuration_adv.h b/config/examples/JGAurora/A5/Configuration_adv.h index ec4f59d79..56d1f14d1 100644 --- a/config/examples/JGAurora/A5/Configuration_adv.h +++ b/config/examples/JGAurora/A5/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/JGAurora/A5S/Configuration_adv.h b/config/examples/JGAurora/A5S/Configuration_adv.h index a0deef379..4abbb7c74 100644 --- a/config/examples/JGAurora/A5S/Configuration_adv.h +++ b/config/examples/JGAurora/A5S/Configuration_adv.h @@ -2126,36 +2126,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/MakerParts/Configuration_adv.h b/config/examples/MakerParts/Configuration_adv.h index 0e56f40e4..aa20a83c5 100644 --- a/config/examples/MakerParts/Configuration_adv.h +++ b/config/examples/MakerParts/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Malyan/M150/Configuration_adv.h b/config/examples/Malyan/M150/Configuration_adv.h index 0b527ef37..b7b410126 100644 --- a/config/examples/Malyan/M150/Configuration_adv.h +++ b/config/examples/Malyan/M150/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Malyan/M200/Configuration_adv.h b/config/examples/Malyan/M200/Configuration_adv.h index 768a13d15..65af378ed 100644 --- a/config/examples/Malyan/M200/Configuration_adv.h +++ b/config/examples/Malyan/M200/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/config/examples/Micromake/C1/enhanced/Configuration_adv.h index 3522d62e4..c58d0439d 100644 --- a/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Mks/Robin/Configuration_adv.h b/config/examples/Mks/Robin/Configuration_adv.h index 3ad7a482c..54a2ecfce 100644 --- a/config/examples/Mks/Robin/Configuration_adv.h +++ b/config/examples/Mks/Robin/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Mks/Sbase/Configuration_adv.h b/config/examples/Mks/Sbase/Configuration_adv.h index 921179e73..af7a88bed 100644 --- a/config/examples/Mks/Sbase/Configuration_adv.h +++ b/config/examples/Mks/Sbase/Configuration_adv.h @@ -2122,36 +2122,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/RapideLite/RL200/Configuration_adv.h b/config/examples/RapideLite/RL200/Configuration_adv.h index a793a1aa4..b3555b11f 100644 --- a/config/examples/RapideLite/RL200/Configuration_adv.h +++ b/config/examples/RapideLite/RL200/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/RigidBot/Configuration_adv.h b/config/examples/RigidBot/Configuration_adv.h index 5233865d6..b08625dec 100644 --- a/config/examples/RigidBot/Configuration_adv.h +++ b/config/examples/RigidBot/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/SCARA/Configuration_adv.h b/config/examples/SCARA/Configuration_adv.h index f6affb8f3..f1263551a 100644 --- a/config/examples/SCARA/Configuration_adv.h +++ b/config/examples/SCARA/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h b/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h index f9c170668..1fa2b41ff 100644 --- a/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h +++ b/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Sanguinololu/Configuration_adv.h b/config/examples/Sanguinololu/Configuration_adv.h index 9d5e7a625..df16e6096 100644 --- a/config/examples/Sanguinololu/Configuration_adv.h +++ b/config/examples/Sanguinololu/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Tevo/Tarantula Pro/Configuration_adv.h b/config/examples/Tevo/Tarantula Pro/Configuration_adv.h index 63ac676ea..898ed1a38 100755 --- a/config/examples/Tevo/Tarantula Pro/Configuration_adv.h +++ b/config/examples/Tevo/Tarantula Pro/Configuration_adv.h @@ -2117,36 +2117,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/TheBorg/Configuration_adv.h b/config/examples/TheBorg/Configuration_adv.h index 3156664ba..39dea8bca 100644 --- a/config/examples/TheBorg/Configuration_adv.h +++ b/config/examples/TheBorg/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/TinyBoy2/Configuration_adv.h b/config/examples/TinyBoy2/Configuration_adv.h index 9da41887f..a6db83a77 100644 --- a/config/examples/TinyBoy2/Configuration_adv.h +++ b/config/examples/TinyBoy2/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Tronxy/X3A/Configuration_adv.h b/config/examples/Tronxy/X3A/Configuration_adv.h index dfb66e8af..9a1edb6b6 100644 --- a/config/examples/Tronxy/X3A/Configuration_adv.h +++ b/config/examples/Tronxy/X3A/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Tronxy/X5S-2E/Configuration_adv.h b/config/examples/Tronxy/X5S-2E/Configuration_adv.h index 224c3e1c7..7e3aa8039 100644 --- a/config/examples/Tronxy/X5S-2E/Configuration_adv.h +++ b/config/examples/Tronxy/X5S-2E/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/UltiMachine/Archim1/Configuration_adv.h b/config/examples/UltiMachine/Archim1/Configuration_adv.h index 8f8ed9217..10fdef4ef 100644 --- a/config/examples/UltiMachine/Archim1/Configuration_adv.h +++ b/config/examples/UltiMachine/Archim1/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/UltiMachine/Archim2/Configuration_adv.h b/config/examples/UltiMachine/Archim2/Configuration_adv.h index 57d03352a..ebb7e9d8a 100644 --- a/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/VORONDesign/Configuration_adv.h b/config/examples/VORONDesign/Configuration_adv.h index 2e0654997..cb996c1bd 100644 --- a/config/examples/VORONDesign/Configuration_adv.h +++ b/config/examples/VORONDesign/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Velleman/K8200/Configuration_adv.h b/config/examples/Velleman/K8200/Configuration_adv.h index 3bbe12bde..98f2aaf39 100644 --- a/config/examples/Velleman/K8200/Configuration_adv.h +++ b/config/examples/Velleman/K8200/Configuration_adv.h @@ -2134,36 +2134,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Velleman/K8400/Configuration_adv.h b/config/examples/Velleman/K8400/Configuration_adv.h index e6fa4038c..9cae06a1c 100644 --- a/config/examples/Velleman/K8400/Configuration_adv.h +++ b/config/examples/Velleman/K8400/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/WASP/PowerWASP/Configuration_adv.h b/config/examples/WASP/PowerWASP/Configuration_adv.h index 4971b99b7..6a988ad14 100644 --- a/config/examples/WASP/PowerWASP/Configuration_adv.h +++ b/config/examples/WASP/PowerWASP/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index 94f7c9341..9e44cdfe0 100644 --- a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h index 22fbb103f..9981bb566 100644 --- a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h +++ b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 60b112450..43bc573e1 100644 --- a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 60b112450..43bc573e1 100644 --- a/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 945db45ba..27bd3e2ed 100644 --- a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h index 945db45ba..27bd3e2ed 100644 --- a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h +++ b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/delta/MKS/SBASE/Configuration_adv.h b/config/examples/delta/MKS/SBASE/Configuration_adv.h index 8b547f4fc..f15d5d09c 100644 --- a/config/examples/delta/MKS/SBASE/Configuration_adv.h +++ b/config/examples/delta/MKS/SBASE/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/delta/Tevo Little Monster/Configuration_adv.h b/config/examples/delta/Tevo Little Monster/Configuration_adv.h index cfc88a03c..e43cc7ef6 100644 --- a/config/examples/delta/Tevo Little Monster/Configuration_adv.h +++ b/config/examples/delta/Tevo Little Monster/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/delta/generic/Configuration_adv.h b/config/examples/delta/generic/Configuration_adv.h index 945db45ba..27bd3e2ed 100644 --- a/config/examples/delta/generic/Configuration_adv.h +++ b/config/examples/delta/generic/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/delta/kossel_mini/Configuration_adv.h b/config/examples/delta/kossel_mini/Configuration_adv.h index 945db45ba..27bd3e2ed 100644 --- a/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/config/examples/delta/kossel_mini/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/delta/kossel_xl/Configuration_adv.h b/config/examples/delta/kossel_xl/Configuration_adv.h index a6c12d57b..76613e565 100644 --- a/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/config/examples/delta/kossel_xl/Configuration_adv.h @@ -2123,36 +2123,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 638d1ae82..c6bb20c1f 100644 --- a/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/makibox/Configuration_adv.h b/config/examples/makibox/Configuration_adv.h index a191b13fe..198e79d6d 100644 --- a/config/examples/makibox/Configuration_adv.h +++ b/config/examples/makibox/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/tvrrug/Round2/Configuration_adv.h b/config/examples/tvrrug/Round2/Configuration_adv.h index d16c7fb62..962e545b2 100644 --- a/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/config/examples/tvrrug/Round2/Configuration_adv.h @@ -2121,36 +2121,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /** diff --git a/config/examples/wt150/Configuration_adv.h b/config/examples/wt150/Configuration_adv.h index 165f91f8d..07bfa0604 100644 --- a/config/examples/wt150/Configuration_adv.h +++ b/config/examples/wt150/Configuration_adv.h @@ -2122,36 +2122,38 @@ * * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. */ -//#define SPINDLE_LASER_ENABLE -#if ENABLED(SPINDLE_LASER_ENABLE) - - #define SPINDLE_LASER_ENABLE_INVERT false // Set to "true" if the on/off function is reversed - #define SPINDLE_LASER_PWM true // Set to true if your controller supports setting the speed/power +//#define SPINDLE_FEATURE +//#define LASER_FEATURE +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) + #define SPINDLE_LASER_ACTIVE_HIGH false // Set to "true" if the on/off function is active HIGH + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower #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 - #define SPINDLE_DIR_CHANGE true // Set to true if your spindle controller supports changing spindle direction - #define SPINDLE_INVERT_DIR false - #define SPINDLE_STOP_ON_DIR_CHANGE true // Set to true if Marlin should stop the spindle before changing rotation direction - /** - * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power - * - * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT - * where PWM duty cycle varies from 0 to 255 - * - * set the following for your controller (ALL MUST BE SET) - */ + #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 - #define SPEED_POWER_SLOPE 118.4 - #define SPEED_POWER_INTERCEPT 0 - #define SPEED_POWER_MIN 5000 - #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM - - //#define SPEED_POWER_SLOPE 0.3922 - //#define SPEED_POWER_INTERCEPT 0 - //#define SPEED_POWER_MIN 10 - //#define SPEED_POWER_MAX 100 // 0-100% + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + #else + #define SPEED_POWER_SLOPE 0.3922 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 10 + #define SPEED_POWER_MAX 100 // 0-100% + #endif #endif /**