From 78f49ccd177da03e1e447eed7754e87827654873 Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Mon, 27 Sep 2021 09:03:57 -1000 Subject: [PATCH 01/20] TMC SPI Daisy chain support For daisy-chained SPI: 1) The first, and only the first, TMC in the config file must have cs_pin 2) Each TMC must have spi_index 3) The spi_index values must be unique --- FluidNC/src/Motors/TrinamicSpiDriver.cpp | 81 ++++++++++-------------- FluidNC/src/Motors/TrinamicSpiDriver.h | 35 +++++++--- 2 files changed, 62 insertions(+), 54 deletions(-) diff --git a/FluidNC/src/Motors/TrinamicSpiDriver.cpp b/FluidNC/src/Motors/TrinamicSpiDriver.cpp index ad2cb8116..d2230db01 100644 --- a/FluidNC/src/Motors/TrinamicSpiDriver.cpp +++ b/FluidNC/src/Motors/TrinamicSpiDriver.cpp @@ -13,24 +13,30 @@ #include namespace MotorDrivers { - TrinamicSpiDriver::TrinamicSpiDriver(uint16_t driver_part_number, int8_t spi_index) : - TrinamicBase(driver_part_number), _spi_index(spi_index) {} + TrinamicSpiDriver::TrinamicSpiDriver(uint16_t driver_part_number) : TrinamicBase(driver_part_number) {} - uint8_t daisy_chain_cs = -1; + pinnum_t TrinamicSpiDriver::daisy_chain_cs_id = 255; + uint8_t TrinamicSpiDriver::spi_index_mask = 0; void TrinamicSpiDriver::init() { - _has_errors = false; - auto spiConfig = config->_spi; + _has_errors = false; - Assert(spiConfig->defined(), "SPI bus is not configured. Cannot initialize TMC driver."); + auto spiConfig = config->_spi; + Assert(spiConfig && spiConfig->defined(), "SPI bus is not configured. Cannot initialize TMC driver."); - _cs_pin.setAttr(Pin::Attr::Output | Pin::Attr::InitialOn); - _cs_mapping = PinMapper(_cs_pin); + uint8_t cs_id; + if (daisy_chain_cs_id != 255) { + cs_id = daisy_chain_cs_id; + } else { + _cs_pin.setAttr(Pin::Attr::Output | Pin::Attr::InitialOn); + _cs_mapping = PinMapper(_cs_pin); + cs_id = _cs_mapping.pinId(); + } if (_driver_part_number == 2130) { - tmcstepper = new TMC2130Stepper(_cs_mapping.pinId(), _r_sense, -1); // TODO hardwired to non daisy chain index + tmcstepper = new TMC2130Stepper(cs_id, _r_sense, -1); // TODO hardwired to non daisy chain index } else if (_driver_part_number == 5160) { - tmcstepper = new TMC5160Stepper(_cs_mapping.pinId(), _r_sense, _spi_index); + tmcstepper = new TMC5160Stepper(cs_id, _r_sense, _spi_index); } else { log_info(" Unsupported Trinamic part number TMC" << _driver_part_number); _has_errors = true; // This motor cannot be used @@ -47,11 +53,6 @@ namespace MotorDrivers { link = List; List = this; - // init() must be called later, after all TMC drivers have CS pins setup. - if (_has_errors) { - return; - } - // Display the stepper library version message once, before the first // TMC config message. Link is NULL for the first TMC instance. if (!link) { @@ -60,37 +61,25 @@ namespace MotorDrivers { config_message(); - if (spiConfig != nullptr || !spiConfig->defined()) { - auto csPin = _cs_pin.getNative(Pin::Capabilities::Output); - auto mosiPin = spiConfig->_mosi.getNative(Pin::Capabilities::Output | Pin::Capabilities::Native); - auto sckPin = spiConfig->_sck.getNative(Pin::Capabilities::Output | Pin::Capabilities::Native); - auto misoPin = spiConfig->_miso.getNative(Pin::Capabilities::Input | Pin::Capabilities::Native); - - SPI.begin(sckPin, misoPin, mosiPin, csPin); // this will get called for each motor, but does not seem to hurt anything - - tmcstepper->begin(); - - _has_errors = !test(); // Try communicating with motor. Prints an error if there is a problem. - - init_step_dir_pins(); - read_settings(); // pull info from settings - set_mode(false); - - // After initializing all of the TMC drivers, create a task to - // display StallGuard data. List == this for the final instance. - if (List == this) { - xTaskCreatePinnedToCore(readSgTask, // task - "readSgTask", // name for task - 4096, // size of task stack - this, // parameters - 1, // priority - NULL, - SUPPORT_TASK_CORE // must run the task on same core - ); - } - } else { - log_info("SPI bus is not available; cannot initialize TMC driver."); - _has_errors = true; + tmcstepper->begin(); + + _has_errors = !test(); // Try communicating with motor. Prints an error if there is a problem. + + init_step_dir_pins(); + read_settings(); // pull info from settings + set_mode(false); + + // After initializing all of the TMC drivers, create a task to + // display StallGuard data. List == this for the final instance. + if (List == this) { + xTaskCreatePinnedToCore(readSgTask, // task + "readSgTask", // name for task + 4096, // size of task stack + this, // parameters + 1, // priority + NULL, + SUPPORT_TASK_CORE // must run the task on same core + ); } } diff --git a/FluidNC/src/Motors/TrinamicSpiDriver.h b/FluidNC/src/Motors/TrinamicSpiDriver.h index ee77bfc32..26d37de4a 100644 --- a/FluidNC/src/Motors/TrinamicSpiDriver.h +++ b/FluidNC/src/Motors/TrinamicSpiDriver.h @@ -23,12 +23,13 @@ namespace MotorDrivers { private: const int _spi_freq = 100000; - static pinnum_t daisy_chain_cs; + static pinnum_t daisy_chain_cs_id; + static uint8_t spi_index_mask; TMC2130Stepper* tmcstepper; // all other driver types are subclasses of this one Pin _cs_pin; // The chip select pin (can be the same for daisy chain) PinMapper _cs_mapping; - int32_t _spi_index; + int32_t _spi_index = -1; bool test(); void set_mode(bool isHoming); @@ -39,9 +40,7 @@ namespace MotorDrivers { void config_message() override; public: - TrinamicSpiDriver(uint16_t driver_part_number) : TrinamicSpiDriver(driver_part_number, -1) {} - - TrinamicSpiDriver(uint16_t driver_part_number, int8_t spi_index); + TrinamicSpiDriver(uint16_t driver_part_number); // Overrides for inherited methods void init() override; @@ -52,11 +51,31 @@ namespace MotorDrivers { void debug_message(); // Configuration handlers: - void validate() const override { - Assert(!_cs_pin.undefined(), "TMC spi_cs pin should be configured."); - StandardStepper::validate(); + void afterParse() override { + if (daisy_chain_cs_id == 255) { + // Either it is not a daisy chain or this is the first daisy-chained TMC in the config file + Assert(_cs_pin.defined(), "TMC spi_cs pin must be configured"); + if (_spi_index != -1) { + // This is the first daisy-chained TMC in the config file + // Do the cs pin mapping now and record the ID in daisy_chain_cs_id + _cs_pin.setAttr(Pin::Attr::Output | Pin::Attr::InitialOn); + _cs_mapping = PinMapper(_cs_pin); + daisy_chain_cs_id = _cs_mapping.pinId(); + set_bitnum(spi_index_mask, _spi_index); + } else { + // The TMC SPI is not daisy-chained + } + } else { + // This is another - not the first - daisy-chained TMC + Assert(_cs_pin.undefined(), "For daisy-chained TMC, spi_cs pin must be configured only once"); + Assert(_spi_index != -1, "spi_index must be configured on all daisy-chained TMCs"); + Assert(bitnum_is_false(spi_index_mask, _spi_index), "spi_index must be unique among all daisy-chained TMCs"); + set_bitnum(spi_index_mask, _spi_index); + } } + void validate() const override { StandardStepper::validate(); } + void group(Configuration::HandlerBase& handler) override { handler.item("cs", _cs_pin); handler.item("spi_index", _spi_index); From 735dcb033bb51c3c71ed0ba7ec62a23888e5dc7b Mon Sep 17 00:00:00 2001 From: bdring Date: Fri, 1 Oct 2021 11:13:49 -0500 Subject: [PATCH 02/20] WIP Testing --- FluidNC/data/TMC2130_SPI_Daisy.yaml | 235 +++++++++++++++++++++++++ FluidNC/src/Motors/TrinamicSpiDriver.h | 8 +- example_configs/TMC2130_SPI_Daisy.yaml | 235 +++++++++++++++++++++++++ 3 files changed, 474 insertions(+), 4 deletions(-) create mode 100644 FluidNC/data/TMC2130_SPI_Daisy.yaml create mode 100644 example_configs/TMC2130_SPI_Daisy.yaml diff --git a/FluidNC/data/TMC2130_SPI_Daisy.yaml b/FluidNC/data/TMC2130_SPI_Daisy.yaml new file mode 100644 index 000000000..65fabedc7 --- /dev/null +++ b/FluidNC/data/TMC2130_SPI_Daisy.yaml @@ -0,0 +1,235 @@ +board: 4 Axis SPI Daisy +name: 4 Axis SPI Daisy Test +stepping: + engine: RMT + idle_ms: 255 + pulse_us: 2 + dir_delay_us: 1 + disable_delay_us: 0 + +axes: + shared_stepper_disable: NO_PIN + x: + steps_per_mm: 800.000 + max_rate: 5000.000 + acceleration: 100.000 + max_travel: 300.000 + soft_limits: false + homing: + cycle: 2 + positive_direction: false + mpos: 150.000 + feed_rate: 100.000 + seek_rate: 200.000 + debounce_ms: 500 + seek_scaler: 1.100 + feed_scaler: 1.100 + + motor0: + limit_neg: NO_PIN + limit_pos: NO_PIN + limit_all: NO_PIN + hard_limits: true + pulloff: 1.000 + tmc_2130: + cs: gpio.17 + spi_index: 1 + r_sense: 0.110 + run_current: 0.750 + hold_current: 0.750 + microsteps: 16 + stallguard: 0 + stallguardDebugMode: false + toff_disable: 0 + toff_stealthchop: 5 + toff_coolstep: 3 + run_mode: CoolStep + homing_mode: CoolStep + use_enable: true + step: gpio.12 + direction: gpio.14 + disable: NO_PIN + + y: + steps_per_mm: 800.000 + max_rate: 5000.000 + acceleration: 100.000 + max_travel: 300.000 + soft_limits: false + homing: + cycle: 2 + positive_direction: false + mpos: 150.000 + feed_rate: 100.000 + seek_rate: 200.000 + debounce_ms: 500 + seek_scaler: 1.100 + feed_scaler: 1.100 + + motor0: + limit_neg: NO_PIN + limit_pos: NO_PIN + limit_all: NO_PIN + hard_limits: true + pulloff: 1.000 + tmc_2130: + spi_index: 2 + r_sense: 0.110 + run_current: 0.750 + hold_current: 0.750 + microsteps: 16 + stallguard: 0 + stallguardDebugMode: false + toff_disable: 0 + toff_stealthchop: 5 + toff_coolstep: 3 + run_mode: CoolStep + homing_mode: CoolStep + use_enable: true + step: gpio.27 + direction: gpio.26 + disable: NO_PIN + + z: + steps_per_mm: 800.000 + max_rate: 5000.000 + acceleration: 100.000 + max_travel: 300.000 + soft_limits: false + homing: + cycle: 2 + positive_direction: false + mpos: 150.000 + feed_rate: 100.000 + seek_rate: 200.000 + debounce_ms: 500 + seek_scaler: 1.100 + feed_scaler: 1.100 + + motor0: + limit_neg: NO_PIN + limit_pos: NO_PIN + limit_all: NO_PIN + hard_limits: true + pulloff: 1.000 + tmc_2130: + spi_index: 3 + r_sense: 0.110 + run_current: 0.750 + hold_current: 0.750 + microsteps: 16 + stallguard: 0 + stallguardDebugMode: false + toff_disable: 0 + toff_stealthchop: 5 + toff_coolstep: 3 + run_mode: CoolStep + homing_mode: CoolStep + use_enable: true + step: gpio.15 + direction: gpio.2 + disable: NO_PIN + + a: + steps_per_mm: 800.000 + max_rate: 5000.000 + acceleration: 100.000 + max_travel: 300.000 + soft_limits: false + homing: + cycle: 2 + positive_direction: false + mpos: 150.000 + feed_rate: 100.000 + seek_rate: 200.000 + debounce_ms: 500 + seek_scaler: 1.100 + feed_scaler: 1.100 + + motor0: + limit_neg: NO_PIN + limit_pos: NO_PIN + limit_all: NO_PIN + hard_limits: true + pulloff: 1.000 + tmc_2130: + spi_index: 4 + r_sense: 0.110 + run_current: 0.750 + hold_current: 0.750 + microsteps: 16 + stallguard: 0 + stallguardDebugMode: false + toff_disable: 0 + toff_stealthchop: 5 + toff_coolstep: 3 + run_mode: CoolStep + homing_mode: CoolStep + use_enable: true + step: gpio.33 + direction: gpio.32 + disable: NO_PIN + +spi: + miso: gpio.19 + mosi: gpio.23 + sck: gpio.18 + +sdcard: + card_detect: NO_PIN + cs: gpio.5 + +control: + safety_door: NO_PIN + reset: NO_PIN + feed_hold: NO_PIN + cycle_start: NO_PIN + macro0: NO_PIN + macro1: NO_PIN + macro2: NO_PIN + macro3: NO_PIN + +coolant: + flood: NO_PIN + mist: NO_PIN + delay_ms: 0 + +probe: + pin: NO_PIN + check_mode_start: true + +macros: + n0: + n1: + macro0: + macro1: + macro2: + macro3: + +user_outputs: + analog0: NO_PIN + analog1: NO_PIN + analog2: NO_PIN + analog3: NO_PIN + analog_frequency0: 5000 + analog_frequency1: 5000 + analog_frequency2: 5000 + analog_frequency3: 5000 + digital0: NO_PIN + digital1: NO_PIN + digital2: NO_PIN + digital3: NO_PIN + +software_debounce_ms: 0 +laser_mode: false +arc_tolerance: 0.002 +junction_deviation: 0.010 +verbose_errors: false +report_inches: false +homing_init_lock: false +enable_parking_override_control: false +deactivate_parking_upon_init: false +check_limits_at_init: false +limits_two_switches_on_axis: false +disable_laser_during_hold: true +use_line_numbers: false diff --git a/FluidNC/src/Motors/TrinamicSpiDriver.h b/FluidNC/src/Motors/TrinamicSpiDriver.h index 26d37de4a..08847adee 100644 --- a/FluidNC/src/Motors/TrinamicSpiDriver.h +++ b/FluidNC/src/Motors/TrinamicSpiDriver.h @@ -54,7 +54,7 @@ namespace MotorDrivers { void afterParse() override { if (daisy_chain_cs_id == 255) { // Either it is not a daisy chain or this is the first daisy-chained TMC in the config file - Assert(_cs_pin.defined(), "TMC spi_cs pin must be configured"); + Assert(_cs_pin.defined(), "TMC cs: pin must be configured"); if (_spi_index != -1) { // This is the first daisy-chained TMC in the config file // Do the cs pin mapping now and record the ID in daisy_chain_cs_id @@ -67,9 +67,9 @@ namespace MotorDrivers { } } else { // This is another - not the first - daisy-chained TMC - Assert(_cs_pin.undefined(), "For daisy-chained TMC, spi_cs pin must be configured only once"); - Assert(_spi_index != -1, "spi_index must be configured on all daisy-chained TMCs"); - Assert(bitnum_is_false(spi_index_mask, _spi_index), "spi_index must be unique among all daisy-chained TMCs"); + Assert(_cs_pin.undefined(), "For daisy-chained TMC, cs: pin must be configured only once"); + Assert(_spi_index != -1, "spi_index: must be configured on all daisy-chained TMCs"); + Assert(bitnum_is_false(spi_index_mask, _spi_index), "spi_index: must be unique among all daisy-chained TMCs"); set_bitnum(spi_index_mask, _spi_index); } } diff --git a/example_configs/TMC2130_SPI_Daisy.yaml b/example_configs/TMC2130_SPI_Daisy.yaml new file mode 100644 index 000000000..65fabedc7 --- /dev/null +++ b/example_configs/TMC2130_SPI_Daisy.yaml @@ -0,0 +1,235 @@ +board: 4 Axis SPI Daisy +name: 4 Axis SPI Daisy Test +stepping: + engine: RMT + idle_ms: 255 + pulse_us: 2 + dir_delay_us: 1 + disable_delay_us: 0 + +axes: + shared_stepper_disable: NO_PIN + x: + steps_per_mm: 800.000 + max_rate: 5000.000 + acceleration: 100.000 + max_travel: 300.000 + soft_limits: false + homing: + cycle: 2 + positive_direction: false + mpos: 150.000 + feed_rate: 100.000 + seek_rate: 200.000 + debounce_ms: 500 + seek_scaler: 1.100 + feed_scaler: 1.100 + + motor0: + limit_neg: NO_PIN + limit_pos: NO_PIN + limit_all: NO_PIN + hard_limits: true + pulloff: 1.000 + tmc_2130: + cs: gpio.17 + spi_index: 1 + r_sense: 0.110 + run_current: 0.750 + hold_current: 0.750 + microsteps: 16 + stallguard: 0 + stallguardDebugMode: false + toff_disable: 0 + toff_stealthchop: 5 + toff_coolstep: 3 + run_mode: CoolStep + homing_mode: CoolStep + use_enable: true + step: gpio.12 + direction: gpio.14 + disable: NO_PIN + + y: + steps_per_mm: 800.000 + max_rate: 5000.000 + acceleration: 100.000 + max_travel: 300.000 + soft_limits: false + homing: + cycle: 2 + positive_direction: false + mpos: 150.000 + feed_rate: 100.000 + seek_rate: 200.000 + debounce_ms: 500 + seek_scaler: 1.100 + feed_scaler: 1.100 + + motor0: + limit_neg: NO_PIN + limit_pos: NO_PIN + limit_all: NO_PIN + hard_limits: true + pulloff: 1.000 + tmc_2130: + spi_index: 2 + r_sense: 0.110 + run_current: 0.750 + hold_current: 0.750 + microsteps: 16 + stallguard: 0 + stallguardDebugMode: false + toff_disable: 0 + toff_stealthchop: 5 + toff_coolstep: 3 + run_mode: CoolStep + homing_mode: CoolStep + use_enable: true + step: gpio.27 + direction: gpio.26 + disable: NO_PIN + + z: + steps_per_mm: 800.000 + max_rate: 5000.000 + acceleration: 100.000 + max_travel: 300.000 + soft_limits: false + homing: + cycle: 2 + positive_direction: false + mpos: 150.000 + feed_rate: 100.000 + seek_rate: 200.000 + debounce_ms: 500 + seek_scaler: 1.100 + feed_scaler: 1.100 + + motor0: + limit_neg: NO_PIN + limit_pos: NO_PIN + limit_all: NO_PIN + hard_limits: true + pulloff: 1.000 + tmc_2130: + spi_index: 3 + r_sense: 0.110 + run_current: 0.750 + hold_current: 0.750 + microsteps: 16 + stallguard: 0 + stallguardDebugMode: false + toff_disable: 0 + toff_stealthchop: 5 + toff_coolstep: 3 + run_mode: CoolStep + homing_mode: CoolStep + use_enable: true + step: gpio.15 + direction: gpio.2 + disable: NO_PIN + + a: + steps_per_mm: 800.000 + max_rate: 5000.000 + acceleration: 100.000 + max_travel: 300.000 + soft_limits: false + homing: + cycle: 2 + positive_direction: false + mpos: 150.000 + feed_rate: 100.000 + seek_rate: 200.000 + debounce_ms: 500 + seek_scaler: 1.100 + feed_scaler: 1.100 + + motor0: + limit_neg: NO_PIN + limit_pos: NO_PIN + limit_all: NO_PIN + hard_limits: true + pulloff: 1.000 + tmc_2130: + spi_index: 4 + r_sense: 0.110 + run_current: 0.750 + hold_current: 0.750 + microsteps: 16 + stallguard: 0 + stallguardDebugMode: false + toff_disable: 0 + toff_stealthchop: 5 + toff_coolstep: 3 + run_mode: CoolStep + homing_mode: CoolStep + use_enable: true + step: gpio.33 + direction: gpio.32 + disable: NO_PIN + +spi: + miso: gpio.19 + mosi: gpio.23 + sck: gpio.18 + +sdcard: + card_detect: NO_PIN + cs: gpio.5 + +control: + safety_door: NO_PIN + reset: NO_PIN + feed_hold: NO_PIN + cycle_start: NO_PIN + macro0: NO_PIN + macro1: NO_PIN + macro2: NO_PIN + macro3: NO_PIN + +coolant: + flood: NO_PIN + mist: NO_PIN + delay_ms: 0 + +probe: + pin: NO_PIN + check_mode_start: true + +macros: + n0: + n1: + macro0: + macro1: + macro2: + macro3: + +user_outputs: + analog0: NO_PIN + analog1: NO_PIN + analog2: NO_PIN + analog3: NO_PIN + analog_frequency0: 5000 + analog_frequency1: 5000 + analog_frequency2: 5000 + analog_frequency3: 5000 + digital0: NO_PIN + digital1: NO_PIN + digital2: NO_PIN + digital3: NO_PIN + +software_debounce_ms: 0 +laser_mode: false +arc_tolerance: 0.002 +junction_deviation: 0.010 +verbose_errors: false +report_inches: false +homing_init_lock: false +enable_parking_override_control: false +deactivate_parking_upon_init: false +check_limits_at_init: false +limits_two_switches_on_axis: false +disable_laser_during_hold: true +use_line_numbers: false From e42943daa904f26c8b99fd8e58827bb1af600b98 Mon Sep 17 00:00:00 2001 From: bdring Date: Fri, 1 Oct 2021 15:30:34 -0500 Subject: [PATCH 03/20] WIP Testing --- FluidNC/src/Motors/TrinamicSpiDriver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FluidNC/src/Motors/TrinamicSpiDriver.cpp b/FluidNC/src/Motors/TrinamicSpiDriver.cpp index d2230db01..dca92035d 100644 --- a/FluidNC/src/Motors/TrinamicSpiDriver.cpp +++ b/FluidNC/src/Motors/TrinamicSpiDriver.cpp @@ -34,7 +34,8 @@ namespace MotorDrivers { } if (_driver_part_number == 2130) { - tmcstepper = new TMC2130Stepper(cs_id, _r_sense, -1); // TODO hardwired to non daisy chain index + //log_info("ID: " << cs_id << " index:" << _spi_index); + tmcstepper = new TMC2130Stepper(cs_id, _r_sense, _spi_index); // TODO hardwired to non daisy chain index } else if (_driver_part_number == 5160) { tmcstepper = new TMC5160Stepper(cs_id, _r_sense, _spi_index); } else { From bc13d1b5272f0031f69d6c65c2a5d1c39daaad33 Mon Sep 17 00:00:00 2001 From: bdring Date: Fri, 1 Oct 2021 15:32:16 -0500 Subject: [PATCH 04/20] Delete TMC2130_SPI_Daisy.yaml --- FluidNC/data/TMC2130_SPI_Daisy.yaml | 235 ---------------------------- 1 file changed, 235 deletions(-) delete mode 100644 FluidNC/data/TMC2130_SPI_Daisy.yaml diff --git a/FluidNC/data/TMC2130_SPI_Daisy.yaml b/FluidNC/data/TMC2130_SPI_Daisy.yaml deleted file mode 100644 index 65fabedc7..000000000 --- a/FluidNC/data/TMC2130_SPI_Daisy.yaml +++ /dev/null @@ -1,235 +0,0 @@ -board: 4 Axis SPI Daisy -name: 4 Axis SPI Daisy Test -stepping: - engine: RMT - idle_ms: 255 - pulse_us: 2 - dir_delay_us: 1 - disable_delay_us: 0 - -axes: - shared_stepper_disable: NO_PIN - x: - steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 - soft_limits: false - homing: - cycle: 2 - positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 - debounce_ms: 500 - seek_scaler: 1.100 - feed_scaler: 1.100 - - motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN - hard_limits: true - pulloff: 1.000 - tmc_2130: - cs: gpio.17 - spi_index: 1 - r_sense: 0.110 - run_current: 0.750 - hold_current: 0.750 - microsteps: 16 - stallguard: 0 - stallguardDebugMode: false - toff_disable: 0 - toff_stealthchop: 5 - toff_coolstep: 3 - run_mode: CoolStep - homing_mode: CoolStep - use_enable: true - step: gpio.12 - direction: gpio.14 - disable: NO_PIN - - y: - steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 - soft_limits: false - homing: - cycle: 2 - positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 - debounce_ms: 500 - seek_scaler: 1.100 - feed_scaler: 1.100 - - motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN - hard_limits: true - pulloff: 1.000 - tmc_2130: - spi_index: 2 - r_sense: 0.110 - run_current: 0.750 - hold_current: 0.750 - microsteps: 16 - stallguard: 0 - stallguardDebugMode: false - toff_disable: 0 - toff_stealthchop: 5 - toff_coolstep: 3 - run_mode: CoolStep - homing_mode: CoolStep - use_enable: true - step: gpio.27 - direction: gpio.26 - disable: NO_PIN - - z: - steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 - soft_limits: false - homing: - cycle: 2 - positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 - debounce_ms: 500 - seek_scaler: 1.100 - feed_scaler: 1.100 - - motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN - hard_limits: true - pulloff: 1.000 - tmc_2130: - spi_index: 3 - r_sense: 0.110 - run_current: 0.750 - hold_current: 0.750 - microsteps: 16 - stallguard: 0 - stallguardDebugMode: false - toff_disable: 0 - toff_stealthchop: 5 - toff_coolstep: 3 - run_mode: CoolStep - homing_mode: CoolStep - use_enable: true - step: gpio.15 - direction: gpio.2 - disable: NO_PIN - - a: - steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 - soft_limits: false - homing: - cycle: 2 - positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 - debounce_ms: 500 - seek_scaler: 1.100 - feed_scaler: 1.100 - - motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN - hard_limits: true - pulloff: 1.000 - tmc_2130: - spi_index: 4 - r_sense: 0.110 - run_current: 0.750 - hold_current: 0.750 - microsteps: 16 - stallguard: 0 - stallguardDebugMode: false - toff_disable: 0 - toff_stealthchop: 5 - toff_coolstep: 3 - run_mode: CoolStep - homing_mode: CoolStep - use_enable: true - step: gpio.33 - direction: gpio.32 - disable: NO_PIN - -spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 - -sdcard: - card_detect: NO_PIN - cs: gpio.5 - -control: - safety_door: NO_PIN - reset: NO_PIN - feed_hold: NO_PIN - cycle_start: NO_PIN - macro0: NO_PIN - macro1: NO_PIN - macro2: NO_PIN - macro3: NO_PIN - -coolant: - flood: NO_PIN - mist: NO_PIN - delay_ms: 0 - -probe: - pin: NO_PIN - check_mode_start: true - -macros: - n0: - n1: - macro0: - macro1: - macro2: - macro3: - -user_outputs: - analog0: NO_PIN - analog1: NO_PIN - analog2: NO_PIN - analog3: NO_PIN - analog_frequency0: 5000 - analog_frequency1: 5000 - analog_frequency2: 5000 - analog_frequency3: 5000 - digital0: NO_PIN - digital1: NO_PIN - digital2: NO_PIN - digital3: NO_PIN - -software_debounce_ms: 0 -laser_mode: false -arc_tolerance: 0.002 -junction_deviation: 0.010 -verbose_errors: false -report_inches: false -homing_init_lock: false -enable_parking_override_control: false -deactivate_parking_upon_init: false -check_limits_at_init: false -limits_two_switches_on_axis: false -disable_laser_during_hold: true -use_line_numbers: false From 4d5dbd5fd1b762b8ccb1dbc016e89d16025eac9e Mon Sep 17 00:00:00 2001 From: bdring Date: Sat, 2 Oct 2021 14:37:59 -0500 Subject: [PATCH 05/20] Added config_motors functions Allows all motors to be set up before configuring them. This is required by daisy SPI motors. --- FluidNC/src/Machine/Axes.cpp | 6 ++++++ FluidNC/src/Machine/Axes.h | 1 + FluidNC/src/Machine/Axis.cpp | 10 +++++++++- FluidNC/src/Machine/Axis.h | 1 + FluidNC/src/Machine/Motor.cpp | 6 ++++++ FluidNC/src/Machine/Motor.h | 1 + FluidNC/src/Main.cpp | 2 ++ FluidNC/src/Motors/MotorDriver.h | 3 +++ FluidNC/src/Motors/TrinamicSpiDriver.cpp | 24 +++++++++++++----------- FluidNC/src/Motors/TrinamicSpiDriver.h | 2 ++ 10 files changed, 44 insertions(+), 12 deletions(-) diff --git a/FluidNC/src/Machine/Axes.cpp b/FluidNC/src/Machine/Axes.cpp index 2c3b46c5a..5e6e0fb45 100644 --- a/FluidNC/src/Machine/Axes.cpp +++ b/FluidNC/src/Machine/Axes.cpp @@ -146,6 +146,12 @@ namespace Machine { config->_stepping->finishPulse(); } + void Axes::config_motors() { + for (int axis = 0; axis < _numberAxis; ++axis) { + _axis[axis]->config_motors(); + } + } + // Some small helpers to find the axis index and axis motor index for a given motor. This // is helpful for some motors that need this info, as well as debug information. size_t Axes::findAxisIndex(const MotorDrivers::MotorDriver* const driver) const { diff --git a/FluidNC/src/Machine/Axes.h b/FluidNC/src/Machine/Axes.h index 05fe42682..1dd40932b 100644 --- a/FluidNC/src/Machine/Axes.h +++ b/FluidNC/src/Machine/Axes.h @@ -79,6 +79,7 @@ namespace Machine { void set_disable(bool disable); void step(uint8_t step_mask, uint8_t dir_mask); void unstep(); + void config_motors(); // Configuration helpers: void group(Configuration::HandlerBase& handler) override; diff --git a/FluidNC/src/Machine/Axis.cpp b/FluidNC/src/Machine/Axis.cpp index 8fb340de0..f4ee0d10a 100644 --- a/FluidNC/src/Machine/Axis.cpp +++ b/FluidNC/src/Machine/Axis.cpp @@ -51,6 +51,14 @@ namespace Machine { } } + void Axis::config_motors() { + for (int motor = 0; motor < Axis::MAX_MOTORS_PER_AXIS; ++motor) { + auto mot = _motors[motor]; + if (mot) + mot->config_motor(); + } + } + // Checks if a motor matches this axis: bool Axis::hasMotor(const MotorDrivers::MotorDriver* const driver) const { for (size_t i = 0; i < MAX_MOTORS_PER_AXIS; i++) { @@ -79,7 +87,7 @@ namespace Machine { // returns the offset between the pulloffs // value is positive when motor1 has a larger pulloff - float Axis::pulloffOffset() { return hasDualMotor()? _motors[1]->_pulloff - _motors[0]->_pulloff : 0.0f; } + float Axis::pulloffOffset() { return hasDualMotor() ? _motors[1]->_pulloff - _motors[0]->_pulloff : 0.0f; } Axis::~Axis() { for (size_t i = 0; i < MAX_MOTORS_PER_AXIS; i++) { diff --git a/FluidNC/src/Machine/Axis.h b/FluidNC/src/Machine/Axis.h index 5d385e4ff..ae724274f 100644 --- a/FluidNC/src/Machine/Axis.h +++ b/FluidNC/src/Machine/Axis.h @@ -46,6 +46,7 @@ namespace Machine { float pulloffOffset(); void init(); + void config_motors(); ~Axis(); }; diff --git a/FluidNC/src/Machine/Motor.cpp b/FluidNC/src/Machine/Motor.cpp index c96bee288..50e4bdc78 100644 --- a/FluidNC/src/Machine/Motor.cpp +++ b/FluidNC/src/Machine/Motor.cpp @@ -39,6 +39,12 @@ namespace Machine { _allLimitPin->init(); } + void Motor::config_motor() { + if (_driver != nullptr) { + _driver->config_motor(); + } + } + // tru if there is at least one switch for this motor bool Motor::hasSwitches() { return (_negPin.defined() || _posPin.defined() || _allPin.defined()); } diff --git a/FluidNC/src/Machine/Motor.h b/FluidNC/src/Machine/Motor.h index 3fb0a49a9..371f2b4cc 100644 --- a/FluidNC/src/Machine/Motor.h +++ b/FluidNC/src/Machine/Motor.h @@ -41,6 +41,7 @@ namespace Machine { bool hasSwitches(); void makeDualSwitches(); void init(); + void config_motor(); ~Motor(); }; } diff --git a/FluidNC/src/Main.cpp b/FluidNC/src/Main.cpp index 80b27a7a8..f8633cb7d 100644 --- a/FluidNC/src/Main.cpp +++ b/FluidNC/src/Main.cpp @@ -86,6 +86,8 @@ void setup() { memset(motor_steps, 0, sizeof(motor_steps)); // Clear machine position. machine_init(); // user supplied function for special initialization + + config->_axes->config_motors(); // for smart drivers like trinamics } // Initialize system state. diff --git a/FluidNC/src/Motors/MotorDriver.h b/FluidNC/src/Motors/MotorDriver.h index fa6f3d8de..73e3bf12f 100644 --- a/FluidNC/src/Motors/MotorDriver.h +++ b/FluidNC/src/Motors/MotorDriver.h @@ -78,6 +78,9 @@ namespace MotorDrivers { // states of the step pins are unknown. virtual void unstep() {} + // this is used to configure and test motors. This would be used for Trinamic + virtual void config_motor() {} + // test(), called from init(), checks to see if a motor is // responsive, returning true on failure. Typical // implementations also display messages to show the result. diff --git a/FluidNC/src/Motors/TrinamicSpiDriver.cpp b/FluidNC/src/Motors/TrinamicSpiDriver.cpp index dca92035d..ca740ec19 100644 --- a/FluidNC/src/Motors/TrinamicSpiDriver.cpp +++ b/FluidNC/src/Motors/TrinamicSpiDriver.cpp @@ -62,14 +62,6 @@ namespace MotorDrivers { config_message(); - tmcstepper->begin(); - - _has_errors = !test(); // Try communicating with motor. Prints an error if there is a problem. - - init_step_dir_pins(); - read_settings(); // pull info from settings - set_mode(false); - // After initializing all of the TMC drivers, create a task to // display StallGuard data. List == this for the final instance. if (List == this) { @@ -84,6 +76,16 @@ namespace MotorDrivers { } } + void TrinamicSpiDriver::config_motor() { + tmcstepper->begin(); + + _has_errors = !test(); // Try communicating with motor. Prints an error if there is a problem. + + init_step_dir_pins(); + read_settings(); // pull info from settings + set_mode(false); + } + /* This is the startup message showing the basic definition */ @@ -99,10 +101,10 @@ namespace MotorDrivers { switch (tmcstepper->test_connection()) { case 1: - log_info(" Trinamic driver test failed. Check connection"); + log_info(axisName() << " Trinamic driver test failed. Check connection"); return false; case 2: - log_info(" Trinamic driver test failed. Check motor power"); + log_info(axisName() << " Trinamic driver test failed. Check motor power"); return false; default: // driver responded, so check for other errors from the DRV_STATUS register @@ -131,7 +133,7 @@ namespace MotorDrivers { // return false; // } - log_info(" Trinamic driver test passed"); + log_info(axisName() << " Trinamic driver test passed"); return true; } } diff --git a/FluidNC/src/Motors/TrinamicSpiDriver.h b/FluidNC/src/Motors/TrinamicSpiDriver.h index 08847adee..0c51b5636 100644 --- a/FluidNC/src/Motors/TrinamicSpiDriver.h +++ b/FluidNC/src/Motors/TrinamicSpiDriver.h @@ -48,6 +48,8 @@ namespace MotorDrivers { bool set_homing_mode(bool ishoming) override; void set_disable(bool disable) override; + void config_motor() override; + void debug_message(); // Configuration handlers: From 5e51c6d941c88fd454c65f05e6c290184dc865ef Mon Sep 17 00:00:00 2001 From: bdring Date: Mon, 4 Oct 2021 09:01:41 -0500 Subject: [PATCH 06/20] Cleanup --- FluidNC/src/Machine/Axes.cpp | 2 ++ FluidNC/src/Main.cpp | 2 -- FluidNC/src/Motors/TrinamicSpiDriver.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/FluidNC/src/Machine/Axes.cpp b/FluidNC/src/Machine/Axes.cpp index 5e6e0fb45..df9ee9871 100644 --- a/FluidNC/src/Machine/Axes.cpp +++ b/FluidNC/src/Machine/Axes.cpp @@ -39,6 +39,8 @@ namespace Machine { a->init(); } } + + config_motors(); } void IRAM_ATTR Axes::set_disable(int axis, bool disable) { diff --git a/FluidNC/src/Main.cpp b/FluidNC/src/Main.cpp index 8c67ae9fd..d27b7ce26 100644 --- a/FluidNC/src/Main.cpp +++ b/FluidNC/src/Main.cpp @@ -86,8 +86,6 @@ void setup() { memset(motor_steps, 0, sizeof(motor_steps)); // Clear machine position. machine_init(); // user supplied function for special initialization - - config->_axes->config_motors(); // for smart drivers like trinamics } // Initialize system state. diff --git a/FluidNC/src/Motors/TrinamicSpiDriver.cpp b/FluidNC/src/Motors/TrinamicSpiDriver.cpp index ca740ec19..bbb99fc6d 100644 --- a/FluidNC/src/Motors/TrinamicSpiDriver.cpp +++ b/FluidNC/src/Motors/TrinamicSpiDriver.cpp @@ -101,10 +101,10 @@ namespace MotorDrivers { switch (tmcstepper->test_connection()) { case 1: - log_info(axisName() << " Trinamic driver test failed. Check connection"); + log_info(axisName() << " driver test failed. Check connection"); return false; case 2: - log_info(axisName() << " Trinamic driver test failed. Check motor power"); + log_info(axisName() << " driver test failed. Check motor power"); return false; default: // driver responded, so check for other errors from the DRV_STATUS register @@ -133,7 +133,7 @@ namespace MotorDrivers { // return false; // } - log_info(axisName() << " Trinamic driver test passed"); + log_info(axisName() << " driver test passed"); return true; } } From 4ea7e4c752258fb47d2f44354cc6b5cb28a8dc61 Mon Sep 17 00:00:00 2001 From: bdring Date: Mon, 4 Oct 2021 11:43:40 -0500 Subject: [PATCH 07/20] added _pin to keywords --- FluidNC/src/CoolantControl.cpp | 4 ++-- FluidNC/src/Machine/Axes.cpp | 2 +- FluidNC/src/Machine/I2SOBus.cpp | 6 +++--- FluidNC/src/Machine/SPIBus.cpp | 6 +++--- FluidNC/src/Machine/UserOutputs.cpp | 16 ++++++++-------- FluidNC/src/Motors/StandardStepper.h | 6 +++--- FluidNC/src/Motors/StepStick.cpp | 8 ++++---- FluidNC/src/Motors/TrinamicBase.h | 6 +++--- FluidNC/src/Motors/TrinamicSpiDriver.h | 2 +- FluidNC/src/Motors/UnipolarMotor.h | 8 ++++---- FluidNC/src/SDCard.h | 6 +++--- FluidNC/src/Spindles/10vSpindle.h | 4 ++-- 12 files changed, 37 insertions(+), 37 deletions(-) diff --git a/FluidNC/src/CoolantControl.cpp b/FluidNC/src/CoolantControl.cpp index 8698b723c..129fba77d 100644 --- a/FluidNC/src/CoolantControl.cpp +++ b/FluidNC/src/CoolantControl.cpp @@ -80,7 +80,7 @@ void CoolantControl::off() { } void CoolantControl::group(Configuration::HandlerBase& handler) { - handler.item("flood", _flood); - handler.item("mist", _mist); + handler.item("flood_pin", _flood); + handler.item("mist_pin", _mist); handler.item("delay_ms", _delay_ms); } diff --git a/FluidNC/src/Machine/Axes.cpp b/FluidNC/src/Machine/Axes.cpp index df9ee9871..03a626d83 100644 --- a/FluidNC/src/Machine/Axes.cpp +++ b/FluidNC/src/Machine/Axes.cpp @@ -188,7 +188,7 @@ namespace Machine { // Configuration helpers: void Axes::group(Configuration::HandlerBase& handler) { - handler.item("shared_stepper_disable", _sharedStepperDisable); + handler.item("shared_stepper_disable_pin", _sharedStepperDisable); // Handle axis names xyzabc. handler.section is inferred // from a template. diff --git a/FluidNC/src/Machine/I2SOBus.cpp b/FluidNC/src/Machine/I2SOBus.cpp index 4ca831716..a64172499 100644 --- a/FluidNC/src/Machine/I2SOBus.cpp +++ b/FluidNC/src/Machine/I2SOBus.cpp @@ -15,9 +15,9 @@ namespace Machine { } void I2SOBus::group(Configuration::HandlerBase& handler) { - handler.item("bck", _bck); - handler.item("data", _data); - handler.item("ws", _ws); + handler.item("bck_pin", _bck); + handler.item("data_pin", _data); + handler.item("ws_pin", _ws); } void I2SOBus::init() { diff --git a/FluidNC/src/Machine/SPIBus.cpp b/FluidNC/src/Machine/SPIBus.cpp index d6d2951f3..8e024ee8c 100644 --- a/FluidNC/src/Machine/SPIBus.cpp +++ b/FluidNC/src/Machine/SPIBus.cpp @@ -36,9 +36,9 @@ namespace Machine { } void SPIBus::group(Configuration::HandlerBase& handler) { - handler.item("miso", _miso); - handler.item("mosi", _mosi); - handler.item("sck", _sck); + handler.item("miso_pin", _miso); + handler.item("mosi_pin", _mosi); + handler.item("sck_pin", _sck); } // XXX it would be nice to have some way to turn off SPI entirely diff --git a/FluidNC/src/Machine/UserOutputs.cpp b/FluidNC/src/Machine/UserOutputs.cpp index 7af711441..38a8b0a3c 100644 --- a/FluidNC/src/Machine/UserOutputs.cpp +++ b/FluidNC/src/Machine/UserOutputs.cpp @@ -34,17 +34,17 @@ namespace Machine { } void UserOutputs::group(Configuration::HandlerBase& handler) { - handler.item("analog0", _analogOutput[0]); - handler.item("analog1", _analogOutput[1]); - handler.item("analog2", _analogOutput[2]); - handler.item("analog3", _analogOutput[3]); + handler.item("analog0_pin", _analogOutput[0]); + handler.item("analog1_pin", _analogOutput[1]); + handler.item("analog2_pin", _analogOutput[2]); + handler.item("analog3_pin", _analogOutput[3]); handler.item("analog_frequency0", _analogFrequency[0]); handler.item("analog_frequency1", _analogFrequency[1]); handler.item("analog_frequency2", _analogFrequency[2]); handler.item("analog_frequency3", _analogFrequency[3]); - handler.item("digital0", _digitalOutput[0]); - handler.item("digital1", _digitalOutput[1]); - handler.item("digital2", _digitalOutput[2]); - handler.item("digital3", _digitalOutput[3]); + handler.item("digital0_pin", _digitalOutput[0]); + handler.item("digital1_pin", _digitalOutput[1]); + handler.item("digital2_pin", _digitalOutput[2]); + handler.item("digital3_pin", _digitalOutput[3]); } } diff --git a/FluidNC/src/Motors/StandardStepper.h b/FluidNC/src/Motors/StandardStepper.h index 109910703..95864181e 100644 --- a/FluidNC/src/Motors/StandardStepper.h +++ b/FluidNC/src/Motors/StandardStepper.h @@ -35,9 +35,9 @@ namespace MotorDrivers { void validate() const override; void group(Configuration::HandlerBase& handler) override { - handler.item("step", _step_pin); - handler.item("direction", _dir_pin); - handler.item("disable", _disable_pin); + handler.item("step_pin", _step_pin); + handler.item("direction_pin", _dir_pin); + handler.item("disable_pin", _disable_pin); } // Name of the configurable. Must match the name registered in the cpp file. diff --git a/FluidNC/src/Motors/StepStick.cpp b/FluidNC/src/Motors/StepStick.cpp index 849cce913..6c68fa3cf 100644 --- a/FluidNC/src/Motors/StepStick.cpp +++ b/FluidNC/src/Motors/StepStick.cpp @@ -23,10 +23,10 @@ namespace MotorDrivers { void StepStick::group(Configuration::HandlerBase& handler) { StandardStepper::group(handler); - handler.item("ms1", _MS1); - handler.item("ms2", _MS2); - handler.item("ms3", _MS3); - handler.item("reset", _Reset); + handler.item("ms1_pin", _MS1); + handler.item("ms2_pin", _MS2); + handler.item("ms3_pin", _MS3); + handler.item("reset_pin", _Reset); } void StepStick::afterParse() { diff --git a/FluidNC/src/Motors/TrinamicBase.h b/FluidNC/src/Motors/TrinamicBase.h index 2094e8a73..bb654a01a 100644 --- a/FluidNC/src/Motors/TrinamicBase.h +++ b/FluidNC/src/Motors/TrinamicBase.h @@ -63,9 +63,9 @@ namespace MotorDrivers { TrinamicBase(uint16_t partNumber) : StandardStepper(), _driver_part_number(partNumber) {} void group(Configuration::HandlerBase& handler) override { - handler.item("r_sense", _r_sense); - handler.item("run_current", _run_current); - handler.item("hold_current", _hold_current); + handler.item("r_sense_ohm", _r_sense); + handler.item("run_amps", _run_current); + handler.item("hold_amps", _hold_current); handler.item("microsteps", _microsteps); handler.item("stallguard", _stallguard); handler.item("stallguardDebugMode", _stallguardDebugMode); diff --git a/FluidNC/src/Motors/TrinamicSpiDriver.h b/FluidNC/src/Motors/TrinamicSpiDriver.h index 0c51b5636..b185ffb06 100644 --- a/FluidNC/src/Motors/TrinamicSpiDriver.h +++ b/FluidNC/src/Motors/TrinamicSpiDriver.h @@ -79,7 +79,7 @@ namespace MotorDrivers { void validate() const override { StandardStepper::validate(); } void group(Configuration::HandlerBase& handler) override { - handler.item("cs", _cs_pin); + handler.item("cs_pin", _cs_pin); handler.item("spi_index", _spi_index); TrinamicBase::group(handler); } diff --git a/FluidNC/src/Motors/UnipolarMotor.h b/FluidNC/src/Motors/UnipolarMotor.h index 1aa50f49e..456233bc6 100644 --- a/FluidNC/src/Motors/UnipolarMotor.h +++ b/FluidNC/src/Motors/UnipolarMotor.h @@ -26,10 +26,10 @@ namespace MotorDrivers { } void group(Configuration::HandlerBase& handler) override { - handler.item("phase0", _pin_phase0); - handler.item("phase1", _pin_phase1); - handler.item("phase2", _pin_phase2); - handler.item("phase3", _pin_phase3); + handler.item("phase0_pin", _pin_phase0); + handler.item("phase1_pin", _pin_phase1); + handler.item("phase2_pin", _pin_phase2); + handler.item("phase3_pin", _pin_phase3); handler.item("half_step", _half_step); } diff --git a/FluidNC/src/SDCard.h b/FluidNC/src/SDCard.h index 2e4db76fe..0cf7afe14 100644 --- a/FluidNC/src/SDCard.h +++ b/FluidNC/src/SDCard.h @@ -79,7 +79,7 @@ class SDCard : public Configuration::Configurable { Error readFileLine(char* line, int len); float percent_complete(); uint32_t lineNumber(); - void afterParse() override; + void afterParse() override; Print& getClient() { return _client; } WebUI::AuthenticationLevel getAuthLevel() { return _auth_level; } @@ -91,8 +91,8 @@ class SDCard : public Configuration::Configurable { // Configuration handlers. void group(Configuration::HandlerBase& handler) override { - handler.item("cs", _cs); - handler.item("card_detect", _cardDetect); + handler.item("cs_pin", _cs); + handler.item("card_detect_pin", _cardDetect); } ~SDCard(); diff --git a/FluidNC/src/Spindles/10vSpindle.h b/FluidNC/src/Spindles/10vSpindle.h index 6f838623b..229d3e4af 100644 --- a/FluidNC/src/Spindles/10vSpindle.h +++ b/FluidNC/src/Spindles/10vSpindle.h @@ -36,8 +36,8 @@ namespace Spindles { void validate() const override { PWM::validate(); } void group(Configuration::HandlerBase& handler) override { - handler.item("forward", _forward_pin); - handler.item("reverse", _reverse_pin); + handler.item("forward_pin", _forward_pin); + handler.item("reverse_pin", _reverse_pin); PWM::group(handler); } From fd6b878614cc6ac06e7026f5ce5a5ca5f103a9fc Mon Sep 17 00:00:00 2001 From: bdring Date: Mon, 4 Oct 2021 11:46:34 -0500 Subject: [PATCH 08/20] Got rid of unused disable_laser_during_hold at machine level --- FluidNC/src/Machine/MachineConfig.cpp | 1 - FluidNC/src/Machine/MachineConfig.h | 6 ------ example_configs/6_pack_TMC2130.yaml | 1 - example_configs/6_pack_TMC5160.yaml | 1 - example_configs/6_pack_external_huanyang.yaml | 1 - example_configs/TMC2130_SPI_Daisy.yaml | 1 - example_configs/TMC2209.yaml | 1 - example_configs/test_drive_SD.yaml | 1 - 8 files changed, 13 deletions(-) diff --git a/FluidNC/src/Machine/MachineConfig.cpp b/FluidNC/src/Machine/MachineConfig.cpp index c3dd5aaf3..e58bd008b 100644 --- a/FluidNC/src/Machine/MachineConfig.cpp +++ b/FluidNC/src/Machine/MachineConfig.cpp @@ -53,7 +53,6 @@ namespace Machine { handler.item("enable_parking_override_control", _enableParkingOverrideControl); handler.item("deactivate_parking_upon_init", _deactivateParkingUponInit); handler.item("check_limits_at_init", _checkLimitsAtInit); - handler.item("disable_laser_during_hold", _disableLaserDuringHold); handler.item("use_line_numbers", _useLineNumbers); Spindles::SpindleFactory::factory(handler, _spindles); diff --git a/FluidNC/src/Machine/MachineConfig.h b/FluidNC/src/Machine/MachineConfig.h index 90b98cea7..384f08924 100644 --- a/FluidNC/src/Machine/MachineConfig.h +++ b/FluidNC/src/Machine/MachineConfig.h @@ -61,12 +61,6 @@ namespace Machine { // will be entered instead of Idle, messaging the user to check the limits, rather than idle. bool _checkLimitsAtInit = true; - // This option will automatically disable the laser during a feed hold by invoking a spindle stop - // override immediately after coming to a stop. However, this also means that the laser still may - // be reenabled by disabling the spindle stop override, if needed. This is purely a safety feature - // to ensure the laser doesn't inadvertently remain powered while at a stop and cause a fire. - bool _disableLaserDuringHold = true; - // Tracks and reports gcode line numbers. Disabled by default. bool _useLineNumbers = false; diff --git a/example_configs/6_pack_TMC2130.yaml b/example_configs/6_pack_TMC2130.yaml index 54106483d..bdc6b7b35 100644 --- a/example_configs/6_pack_TMC2130.yaml +++ b/example_configs/6_pack_TMC2130.yaml @@ -194,7 +194,6 @@ homing_init_lock: false enable_parking_override_control: false deactivate_parking_upon_init: false check_limits_at_init: false -disable_laser_during_hold: true use_line_numbers: false PWM: pwm_freq: 5000 diff --git a/example_configs/6_pack_TMC5160.yaml b/example_configs/6_pack_TMC5160.yaml index 4ee91985a..dac6dac37 100644 --- a/example_configs/6_pack_TMC5160.yaml +++ b/example_configs/6_pack_TMC5160.yaml @@ -194,7 +194,6 @@ homing_init_lock: false enable_parking_override_control: false deactivate_parking_upon_init: false check_limits_at_init: false -disable_laser_during_hold: true use_line_numbers: false PWM: pwm_freq: 5000 diff --git a/example_configs/6_pack_external_huanyang.yaml b/example_configs/6_pack_external_huanyang.yaml index 56f2bfba4..863ee97c8 100644 --- a/example_configs/6_pack_external_huanyang.yaml +++ b/example_configs/6_pack_external_huanyang.yaml @@ -156,7 +156,6 @@ enable_parking_override_control: false deactivate_parking_upon_init: false check_limits_at_init: false limits_two_switches_on_axis: false -disable_laser_during_hold: true use_line_numbers: false Huanyang: diff --git a/example_configs/TMC2130_SPI_Daisy.yaml b/example_configs/TMC2130_SPI_Daisy.yaml index 65fabedc7..a26626b44 100644 --- a/example_configs/TMC2130_SPI_Daisy.yaml +++ b/example_configs/TMC2130_SPI_Daisy.yaml @@ -231,5 +231,4 @@ enable_parking_override_control: false deactivate_parking_upon_init: false check_limits_at_init: false limits_two_switches_on_axis: false -disable_laser_during_hold: true use_line_numbers: false diff --git a/example_configs/TMC2209.yaml b/example_configs/TMC2209.yaml index eb2696bb4..cd347ee3f 100644 --- a/example_configs/TMC2209.yaml +++ b/example_configs/TMC2209.yaml @@ -173,7 +173,6 @@ homing_init_lock: false enable_parking_override_control: false deactivate_parking_upon_init: false check_limits_at_init: false -disable_laser_during_hold: true use_line_numbers: false PWM: pwm_freq: 5000 diff --git a/example_configs/test_drive_SD.yaml b/example_configs/test_drive_SD.yaml index 598d1e097..f584f53bf 100644 --- a/example_configs/test_drive_SD.yaml +++ b/example_configs/test_drive_SD.yaml @@ -90,6 +90,5 @@ homing_init_lock: true enable_parking_override_control: false deactivate_parking_upon_init: false check_limits_at_init: true -disable_laser_during_hold: true use_line_numbers: false NoSpindle: From d3c4284b363a6363fc3765432a646e36b03f663c Mon Sep 17 00:00:00 2001 From: bdring Date: Mon, 4 Oct 2021 12:04:15 -0500 Subject: [PATCH 09/20] pwm_freq_hz --- FluidNC/src/Control.cpp | 16 ++++++++-------- FluidNC/src/Machine/UserOutputs.cpp | 8 ++++---- FluidNC/src/Motors/RcServo.h | 4 ++-- FluidNC/src/Spindles/Laser.h | 2 +- example_configs/3axis_v4.yaml | 2 +- example_configs/6_pack_TMC2130.yaml | 10 +++++----- example_configs/6_pack_TMC5160.yaml | 10 +++++----- example_configs/6_pack_external_huanyang.yaml | 8 ++++---- example_configs/TMC2130_SPI_Daisy.yaml | 8 ++++---- example_configs/TMC2130_pen.yaml | 2 +- example_configs/TMC2209.yaml | 10 +++++----- example_configs/test_drive_SD.yaml | 8 ++++---- example_configs/tmc2209_BESC.yaml | 2 +- example_configs/tmc2209_laser.yaml | 2 +- 14 files changed, 46 insertions(+), 46 deletions(-) diff --git a/FluidNC/src/Control.cpp b/FluidNC/src/Control.cpp index 630c5a7ac..e35ae2276 100644 --- a/FluidNC/src/Control.cpp +++ b/FluidNC/src/Control.cpp @@ -22,14 +22,14 @@ void Control::init() { } void Control::group(Configuration::HandlerBase& handler) { - handler.item("safety_door", _safetyDoor._pin); - handler.item("reset", _reset._pin); - handler.item("feed_hold", _feedHold._pin); - handler.item("cycle_start", _cycleStart._pin); - handler.item("macro0", _macro0._pin); - handler.item("macro1", _macro1._pin); - handler.item("macro2", _macro2._pin); - handler.item("macro3", _macro3._pin); + handler.item("safety_door_pin", _safetyDoor._pin); + handler.item("reset_pin", _reset._pin); + handler.item("feed_hold_pin", _feedHold._pin); + handler.item("cycle_start_pin", _cycleStart._pin); + handler.item("macro0_pin", _macro0._pin); + handler.item("macro1_pin", _macro1._pin); + handler.item("macro2_pin", _macro2._pin); + handler.item("macro3_pin", _macro3._pin); } String Control::report() { diff --git a/FluidNC/src/Machine/UserOutputs.cpp b/FluidNC/src/Machine/UserOutputs.cpp index 38a8b0a3c..0c4842c33 100644 --- a/FluidNC/src/Machine/UserOutputs.cpp +++ b/FluidNC/src/Machine/UserOutputs.cpp @@ -38,10 +38,10 @@ namespace Machine { handler.item("analog1_pin", _analogOutput[1]); handler.item("analog2_pin", _analogOutput[2]); handler.item("analog3_pin", _analogOutput[3]); - handler.item("analog_frequency0", _analogFrequency[0]); - handler.item("analog_frequency1", _analogFrequency[1]); - handler.item("analog_frequency2", _analogFrequency[2]); - handler.item("analog_frequency3", _analogFrequency[3]); + handler.item("analog0_freq_hz", _analogFrequency[0]); + handler.item("analog1_freq_hz", _analogFrequency[1]); + handler.item("analog2_freq_hz", _analogFrequency[2]); + handler.item("analog3_freq_hz", _analogFrequency[3]); handler.item("digital0_pin", _digitalOutput[0]); handler.item("digital1_pin", _digitalOutput[1]); handler.item("digital2_pin", _digitalOutput[2]); diff --git a/FluidNC/src/Motors/RcServo.h b/FluidNC/src/Motors/RcServo.h index e5505e000..9a411ca61 100644 --- a/FluidNC/src/Motors/RcServo.h +++ b/FluidNC/src/Motors/RcServo.h @@ -20,7 +20,7 @@ namespace MotorDrivers { bool _disabled; - uint32_t _min_pulse_us = SERVO_PULSE_US_MIN_DEFAULT; // microseconds + uint32_t _min_pulse_us = SERVO_PULSE_US_MIN_DEFAULT; // microseconds uint32_t _max_pulse_us = SERVO_PULSE_US_MAX_DEFAULT; // microseconds uint32_t _min_pulse_cnt = 0; // microseconds @@ -45,7 +45,7 @@ namespace MotorDrivers { // Configuration handlers: void group(Configuration::HandlerBase& handler) override { handler.item("output_pin", _output_pin); - handler.item("pwm_freq", _pwm_freq); + handler.item("pwm_freq_hz", _pwm_freq); handler.item("min_pulse_us", _min_pulse_us); handler.item("max_pulse_us", _max_pulse_us); } diff --git a/FluidNC/src/Spindles/Laser.h b/FluidNC/src/Spindles/Laser.h index 65d9c8ea3..c31210237 100644 --- a/FluidNC/src/Spindles/Laser.h +++ b/FluidNC/src/Spindles/Laser.h @@ -35,7 +35,7 @@ namespace Spindles { // pwm_freq is the only item that the PWM class adds to OnOff // We cannot call PWM::group() because that would pick up // direction_pin, which we do not want in Laser - handler.item("pwm_freq", _pwm_freq); + handler.item("pwm_freq_hz", _pwm_freq); OnOff::groupCommon(handler); } diff --git a/example_configs/3axis_v4.yaml b/example_configs/3axis_v4.yaml index b6d7f80b6..3d44ad985 100644 --- a/example_configs/3axis_v4.yaml +++ b/example_configs/3axis_v4.yaml @@ -96,7 +96,7 @@ probe: pin: gpio.32:low:pu PWM: - pwm_freq: 5000 + pwm_freq_hz: 5000 output_pin: gpio.2 enable_pin: gpio.22 direction_pin: NO_PIN diff --git a/example_configs/6_pack_TMC2130.yaml b/example_configs/6_pack_TMC2130.yaml index bdc6b7b35..8a971b78f 100644 --- a/example_configs/6_pack_TMC2130.yaml +++ b/example_configs/6_pack_TMC2130.yaml @@ -175,10 +175,10 @@ user_outputs: analog1: NO_PIN analog2: NO_PIN analog3: NO_PIN - analog_frequency0: 5000 - analog_frequency1: 5000 - analog_frequency2: 5000 - analog_frequency3: 5000 + analog0_freq_hz: 5000 + analog1_freq_hz: 5000 + analog2_freq_hz: 5000 + analog3_freq_hz: 5000 digital0: NO_PIN digital1: NO_PIN digital2: NO_PIN @@ -196,7 +196,7 @@ deactivate_parking_upon_init: false check_limits_at_init: false use_line_numbers: false PWM: - pwm_freq: 5000 + pwm_freq_hz: 5000 output_pin: gpio.26 enable_pin: gpio.4 direction_pin: NO_PIN diff --git a/example_configs/6_pack_TMC5160.yaml b/example_configs/6_pack_TMC5160.yaml index dac6dac37..3d3cb3b36 100644 --- a/example_configs/6_pack_TMC5160.yaml +++ b/example_configs/6_pack_TMC5160.yaml @@ -175,10 +175,10 @@ user_outputs: analog1: NO_PIN analog2: NO_PIN analog3: NO_PIN - analog_frequency0: 5000 - analog_frequency1: 5000 - analog_frequency2: 5000 - analog_frequency3: 5000 + analog0_freq_hz: 5000 + analog1_freq_hz: 5000 + analog2_freq_hz: 5000 + analog3_freq_hz: 5000 digital0: NO_PIN digital1: NO_PIN digital2: NO_PIN @@ -196,7 +196,7 @@ deactivate_parking_upon_init: false check_limits_at_init: false use_line_numbers: false PWM: - pwm_freq: 5000 + pwm_freq_hz: 5000 output_pin: gpio.26 enable_pin: gpio.4 direction_pin: NO_PIN diff --git a/example_configs/6_pack_external_huanyang.yaml b/example_configs/6_pack_external_huanyang.yaml index 863ee97c8..3ee055dd5 100644 --- a/example_configs/6_pack_external_huanyang.yaml +++ b/example_configs/6_pack_external_huanyang.yaml @@ -136,10 +136,10 @@ user_outputs: analog1: NO_PIN analog2: NO_PIN analog3: NO_PIN - analog_frequency0: 5000 - analog_frequency1: 5000 - analog_frequency2: 5000 - analog_frequency3: 5000 + analog0_freq_hz: 5000 + analog1_freq_hz: 5000 + analog2_freq_hz: 5000 + analog3_freq_hz: 5000 digital0: NO_PIN digital1: NO_PIN digital2: NO_PIN diff --git a/example_configs/TMC2130_SPI_Daisy.yaml b/example_configs/TMC2130_SPI_Daisy.yaml index a26626b44..96c96d292 100644 --- a/example_configs/TMC2130_SPI_Daisy.yaml +++ b/example_configs/TMC2130_SPI_Daisy.yaml @@ -211,10 +211,10 @@ user_outputs: analog1: NO_PIN analog2: NO_PIN analog3: NO_PIN - analog_frequency0: 5000 - analog_frequency1: 5000 - analog_frequency2: 5000 - analog_frequency3: 5000 + analog0_freq_hz: 5000 + analog1_freq_hz: 5000 + analog2_freq_hz: 5000 + analog3_freq_hz: 5000 digital0: NO_PIN digital1: NO_PIN digital2: NO_PIN diff --git a/example_configs/TMC2130_pen.yaml b/example_configs/TMC2130_pen.yaml index 05519ea45..e1debca5d 100644 --- a/example_configs/TMC2130_pen.yaml +++ b/example_configs/TMC2130_pen.yaml @@ -103,7 +103,7 @@ axes: motor0: rc_servo: - pwm_freq: 50 + pwm_freq_hz: 50 output_pin: gpio.27 min_pulse_us: 2100 max_pulse_us: 1000 diff --git a/example_configs/TMC2209.yaml b/example_configs/TMC2209.yaml index cd347ee3f..fae3b8c0d 100644 --- a/example_configs/TMC2209.yaml +++ b/example_configs/TMC2209.yaml @@ -154,10 +154,10 @@ user_outputs: analog1: NO_PIN analog2: NO_PIN analog3: NO_PIN - analog_frequency0: 5000 - analog_frequency1: 5000 - analog_frequency2: 5000 - analog_frequency3: 5000 + analog0_freq_hz: 5000 + analog1_freq_hz: 5000 + analog2_freq_hz: 5000 + analog3_freq_hz: 5000 digital0: NO_PIN digital1: NO_PIN digital2: NO_PIN @@ -175,7 +175,7 @@ deactivate_parking_upon_init: false check_limits_at_init: false use_line_numbers: false PWM: - pwm_freq: 5000 + pwm_freq_hz: 5000 output_pin: gpio.4 enable_pin: gpio.13 direction_pin: gpio.17 diff --git a/example_configs/test_drive_SD.yaml b/example_configs/test_drive_SD.yaml index f584f53bf..dd5336434 100644 --- a/example_configs/test_drive_SD.yaml +++ b/example_configs/test_drive_SD.yaml @@ -67,10 +67,10 @@ user_outputs: analog1: NO_PIN analog2: NO_PIN analog3: NO_PIN - analog_frequency0: 5000 - analog_frequency1: 5000 - analog_frequency2: 5000 - analog_frequency3: 5000 + analog0_freq_hz: 5000 + analog1_freq_hz: 5000 + analog2_freq_hz: 5000 + analog3_freq_hz: 5000 digital0: NO_PIN digital1: NO_PIN digital2: NO_PIN diff --git a/example_configs/tmc2209_BESC.yaml b/example_configs/tmc2209_BESC.yaml index a7c12cf26..70acc9ac2 100644 --- a/example_configs/tmc2209_BESC.yaml +++ b/example_configs/tmc2209_BESC.yaml @@ -155,7 +155,7 @@ probe: pin: NO_PIN besc: - pwm_freq: 50 + pwm_freq_hz: 50 output_pin: gpio.4 enable_pin: NO_PIN direction_pin: NO_PIN diff --git a/example_configs/tmc2209_laser.yaml b/example_configs/tmc2209_laser.yaml index 85f284c3c..d3caa83af 100644 --- a/example_configs/tmc2209_laser.yaml +++ b/example_configs/tmc2209_laser.yaml @@ -229,7 +229,7 @@ probe: homing_init_lock: false Laser: - pwm_freq: 5000 + pwm_freq_hz: 5000 output_pin: gpio.4 enable_pin: gpio.12 disable_with_zero_speed: false From a6e6691068c88db8dd0d5725e17d3673e3e1926a Mon Sep 17 00:00:00 2001 From: bdring Date: Mon, 4 Oct 2021 12:34:14 -0500 Subject: [PATCH 10/20] Updating config examples --- FluidNC/src/Machine/Motor.cpp | 6 +- FluidNC/src/Motors/TrinamicSpiDriver.h | 4 +- FluidNC/src/SDCard.cpp | 8 +- FluidNC/test/Configuration/YamlComplete.cpp | 2 +- example_configs/3axis_v4.yaml | 47 ++--- example_configs/6_pack_TMC2130.yaml | 96 ++++----- example_configs/6_pack_TMC5160.yaml | 96 ++++----- example_configs/6_pack_external_huanyang.yaml | 90 ++++---- example_configs/TMC2130_SPI_Daisy.yaml | 62 +++--- example_configs/TMC2130_pen.yaml | 28 +-- example_configs/TMC2209.yaml | 52 ++--- example_configs/TMC2209_pen.yaml | 198 ++++++++++++++++++ example_configs/test_drive_SD.yaml | 12 +- example_configs/tmc2209_10V.yaml | 54 ++--- example_configs/tmc2209_BESC.yaml | 50 ++--- example_configs/tmc2209_huanyang.yml | 50 ++--- example_configs/tmc2209_laser.yaml | 84 ++++---- example_configs/tmc2209_relay.yaml | 50 ++--- 18 files changed, 587 insertions(+), 402 deletions(-) create mode 100644 example_configs/TMC2209_pen.yaml diff --git a/FluidNC/src/Machine/Motor.cpp b/FluidNC/src/Machine/Motor.cpp index 50e4bdc78..1f6fcda2b 100644 --- a/FluidNC/src/Machine/Motor.cpp +++ b/FluidNC/src/Machine/Motor.cpp @@ -14,9 +14,9 @@ namespace Machine { _negLimitPin = new LimitPin(_negPin, _axis, _motorNum, -1, _hardLimits); _posLimitPin = new LimitPin(_posPin, _axis, _motorNum, 1, _hardLimits); _allLimitPin = new LimitPin(_allPin, _axis, _motorNum, 0, _hardLimits); - handler.item("limit_neg", _negPin); - handler.item("limit_pos", _posPin); - handler.item("limit_all", _allPin); + handler.item("limit_neg_pin", _negPin); + handler.item("limit_pos_pin", _posPin); + handler.item("limit_all_pin", _allPin); handler.item("hard_limits", _hardLimits); handler.item("pulloff", _pulloff); MotorDrivers::MotorFactory::factory(handler, _driver); diff --git a/FluidNC/src/Motors/TrinamicSpiDriver.h b/FluidNC/src/Motors/TrinamicSpiDriver.h index b185ffb06..48a652d9a 100644 --- a/FluidNC/src/Motors/TrinamicSpiDriver.h +++ b/FluidNC/src/Motors/TrinamicSpiDriver.h @@ -56,7 +56,7 @@ namespace MotorDrivers { void afterParse() override { if (daisy_chain_cs_id == 255) { // Either it is not a daisy chain or this is the first daisy-chained TMC in the config file - Assert(_cs_pin.defined(), "TMC cs: pin must be configured"); + Assert(_cs_pin.defined(), "TMC cs_pin: pin must be configured"); if (_spi_index != -1) { // This is the first daisy-chained TMC in the config file // Do the cs pin mapping now and record the ID in daisy_chain_cs_id @@ -69,7 +69,7 @@ namespace MotorDrivers { } } else { // This is another - not the first - daisy-chained TMC - Assert(_cs_pin.undefined(), "For daisy-chained TMC, cs: pin must be configured only once"); + Assert(_cs_pin.undefined(), "For daisy-chained TMC, cs_pin: pin must be configured only once"); Assert(_spi_index != -1, "spi_index: must be configured on all daisy-chained TMCs"); Assert(bitnum_is_false(spi_index_mask, _spi_index), "spi_index: must be unique among all daisy-chained TMCs"); set_bitnum(spi_index_mask, _spi_index); diff --git a/FluidNC/src/SDCard.cpp b/FluidNC/src/SDCard.cpp index c3415e9e3..1cd0d52a5 100644 --- a/FluidNC/src/SDCard.cpp +++ b/FluidNC/src/SDCard.cpp @@ -153,7 +153,7 @@ SDCard::State SDCard::test_or_open(bool refresh) { _state = SDCard::State::NotPresent; - auto csPin = _cs.getNative(Pin::Capabilities::Output | Pin::Capabilities::Native); + auto csPin = _cs.getNative(Pin::Capabilities::Output | Pin::Capabilities::Native); //refresh content if card was removed if (SD.begin(csPin, SPI, SPIfreq, "/sd", 2)) { @@ -193,10 +193,10 @@ void SDCard::init() { log_error("SD needs SPI defined"); } else { if (init_message) { - _cardDetect.report("SD Card Detect"); - init_message = false; + _cardDetect.report("SD Card Detect"); + init_message = false; } - log_info("SD Card cs:" << _cs.name() << " dectect:" << _cardDetect.name()); + log_info("SD Card cs_pin:" << _cs.name() << " dectect:" << _cardDetect.name()); } } diff --git a/FluidNC/test/Configuration/YamlComplete.cpp b/FluidNC/test/Configuration/YamlComplete.cpp index d1d1c16ca..fbd668353 100644 --- a/FluidNC/test/Configuration/YamlComplete.cpp +++ b/FluidNC/test/Configuration/YamlComplete.cpp @@ -18,7 +18,7 @@ namespace Configuration { "\n" "axes:\n" " number_axis: 3\n" - " shared_stepper_disable: gpio.13:low\n" + " shared_stepper_disable_pin: gpio.13:low\n" " \n" " x:\n" "\n" diff --git a/example_configs/3axis_v4.yaml b/example_configs/3axis_v4.yaml index 3d44ad985..8dd6c11e8 100644 --- a/example_configs/3axis_v4.yaml +++ b/example_configs/3axis_v4.yaml @@ -9,7 +9,7 @@ stepping: disable_delay_us: 0 axes: - shared_stepper_disable: gpio.13:low + shared_stepper_disable_pin: gpio.13:low x: steps_per_mm: 800 @@ -22,10 +22,10 @@ axes: positive_direction: false motor0: - limit_all: gpio.17:low:pu + limit_all_pin: gpio.17:low:pu stepstick: - direction: gpio.14 - step: gpio.12 + direction_pin: gpio.14 + step_pin: gpio.12 motor1: null_motor: @@ -40,10 +40,10 @@ axes: positive_direction: false motor0: - limit_all: gpio.4:low:pu + limit_all_pin: gpio.4:low:pu stepstick: - direction: gpio.15 - step: gpio.26 + direction_pin: gpio.15 + step_pin: gpio.26 motor1: null_motor: @@ -58,39 +58,26 @@ axes: positive_direction: true motor0: - limit_all: gpio.16:low:pu + limit_all_pin: gpio.16:low:pu stepstick: - direction: gpio.33 - step: gpio.27 + direction_pin: gpio.33 + step_pin: gpio.27 motor1: null_motor: spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - cs: gpio.5 - card_detect: NO_PIN + cs_pin: gpio.5 + card_detect_pin: NO_PIN coolant: - flood: gpio.25 - mist: gpio.21 + flood_pin: gpio.25 + mist_pin: gpio.21 -comms: - telnet_enable: true - telnet_port: 23 - http_enable: true - http_port: 80 - hostname: fluidnc - wifi_ap: - ssid: FluidNC - ip_address: 10.0.0.1 - gateway: 10.0.0.1 - netmask: 255.255.0.0 - dhcp: true - channel: 1 probe: pin: gpio.32:low:pu diff --git a/example_configs/6_pack_TMC2130.yaml b/example_configs/6_pack_TMC2130.yaml index 8a971b78f..af2e3ab16 100644 --- a/example_configs/6_pack_TMC2130.yaml +++ b/example_configs/6_pack_TMC2130.yaml @@ -8,7 +8,7 @@ stepping: disable_delay_us: 0 axes: - shared_stepper_disable: NO_PIN + shared_stepper_disable_pin: NO_PIN x: steps_per_mm: 800.000 max_rate: 5000.000 @@ -26,13 +26,13 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: gpio.33:pu + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: gpio.33:pu hard_limits: true pulloff: 1.000 tmc_2130: - cs: i2so.3 + cs_pin: i2so.3 r_sense: 0.110 run_current: 0.750 hold_current: 0.750 @@ -45,9 +45,9 @@ axes: run_mode: CoolStep homing_mode: CoolStep use_enable: false - step: I2SO.2 - direction: I2SO.1 - disable: I2SO.0 + step_pin: I2SO.2 + direction_pin: I2SO.1 + disable_pin: I2SO.0 y: steps_per_mm: 800.000 @@ -66,13 +66,13 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: gpio.32:pu + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: gpio.32:pu hard_limits: true pulloff: 1.000 tmc_2130: - cs: i2so.6 + cs_pin: i2so.6 r_sense: 0.110 run_current: 0.750 hold_current: 0.750 @@ -85,9 +85,9 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: I2SO.5 - direction: I2SO.4 - disable: I2SO.7 + step_pin: I2SO.5 + direction_pin: I2SO.4 + disable_pin: I2SO.7 z: steps_per_mm: 800.000 @@ -106,13 +106,13 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: gpio.35 + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: gpio.35 hard_limits: true pulloff: 1.000 tmc_2130: - cs: i2so.11 + cs_pin: i2so.11 r_sense: 0.110 run_current: 0.750 hold_current: 0.750 @@ -125,37 +125,37 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: I2SO.10 - direction: I2SO.9 - disable: I2SO.8 + step_pin: I2SO.10 + direction_pin: I2SO.9 + disable_pin: I2SO.8 i2so: - bck: gpio.22 - data: gpio.21 - ws: gpio.17 + bck_pin: gpio.22 + data_pin: gpio.21 + ws_pin: gpio.17 spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - card_detect: NO_PIN - cs: gpio.5 + card_detect_pin: NO_PIN + cs_pin: gpio.5 control: - safety_door: NO_PIN - reset: NO_PIN - feed_hold: NO_PIN - cycle_start: NO_PIN - macro0: NO_PIN - macro1: NO_PIN - macro2: NO_PIN - macro3: NO_PIN + safety_door_pin: NO_PIN + reset_pin: NO_PIN + feed_hold_pin: NO_PIN + cycle_start_pin: NO_PIN + macro0_pin: NO_PIN + macro1_pin: NO_PIN + macro2_pin: NO_PIN + macro3_pin: NO_PIN coolant: - flood: NO_PIN - mist: NO_PIN + flood_pin: NO_PIN + mist_pin: NO_PIN delay_ms: 0 probe: @@ -171,18 +171,18 @@ macros: macro3: user_outputs: - analog0: NO_PIN - analog1: NO_PIN - analog2: NO_PIN - analog3: NO_PIN + analog0_pin: NO_PIN + analog1_pin: NO_PIN + analog2_pin: NO_PIN + analog3_pin: NO_PIN analog0_freq_hz: 5000 analog1_freq_hz: 5000 analog2_freq_hz: 5000 analog3_freq_hz: 5000 - digital0: NO_PIN - digital1: NO_PIN - digital2: NO_PIN - digital3: NO_PIN + digital0_pin: NO_PIN + digital1_pin: NO_PIN + digital2_pin: NO_PIN + digital3_pin: NO_PIN software_debounce_ms: 0 laser_mode: false diff --git a/example_configs/6_pack_TMC5160.yaml b/example_configs/6_pack_TMC5160.yaml index 3d3cb3b36..4e607a54b 100644 --- a/example_configs/6_pack_TMC5160.yaml +++ b/example_configs/6_pack_TMC5160.yaml @@ -8,7 +8,7 @@ stepping: disable_delay_us: 0 axes: - shared_stepper_disable: NO_PIN + shared_stepper_disable_pin: NO_PIN x: steps_per_mm: 800.000 max_rate: 5000.000 @@ -26,13 +26,13 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: gpio.33:pu + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: gpio.33:pu hard_limits: true pulloff: 1.000 tmc_5160: - cs: i2so.3 + cs_pin: i2so.3 r_sense: 0.075 run_current: 1.75 hold_current: 0.50 @@ -45,9 +45,9 @@ axes: run_mode: CoolStep homing_mode: CoolStep use_enable: false - step: I2SO.2 - direction: I2SO.1 - disable: I2SO.0 + step_pin: I2SO.2 + direction_pin: I2SO.1 + disable_pin: I2SO.0 y: steps_per_mm: 800.000 @@ -66,13 +66,13 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: gpio.32:pu + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: gpio.32:pu hard_limits: true pulloff: 1.000 tmc_5160: - cs: i2so.6 + cs_pin: i2so.6 r_sense: 0.075 run_current: 1.75 hold_current: 0.50 @@ -85,9 +85,9 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: I2SO.5 - direction: I2SO.4 - disable: I2SO.7 + step_pin: I2SO.5 + direction_pin: I2SO.4 + disable_pin: I2SO.7 z: steps_per_mm: 800.000 @@ -106,13 +106,13 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: gpio.35 + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: gpio.35 hard_limits: true pulloff: 1.000 tmc_5160: - cs: i2so.11 + cs_pin: i2so.11 r_sense: 0.075 run_current: 1.750 hold_current: 0.50 @@ -125,37 +125,37 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: I2SO.10 - direction: I2SO.9 - disable: I2SO.8 + step_pin: I2SO.10 + direction_pin: I2SO.9 + disable_pin: I2SO.8 i2so: - bck: gpio.22 - data: gpio.21 - ws: gpio.17 + bck_pin: gpio.22 + data_pin: gpio.21 + ws_pin: gpio.17 spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - cs: gpio.5 - card_detect: NO_PIN + card_detect_pin: NO_PIN + cs_pin: gpio.5 control: - safety_door: NO_PIN - reset: NO_PIN - feed_hold: NO_PIN - cycle_start: NO_PIN - macro0: NO_PIN - macro1: NO_PIN - macro2: NO_PIN - macro3: NO_PIN + safety_door_pin: NO_PIN + reset_pin: NO_PIN + feed_hold_pin: NO_PIN + cycle_start_pin: NO_PIN + macro0_pin: NO_PIN + macro1_pin: NO_PIN + macro2_pin: NO_PIN + macro3_pin: NO_PIN coolant: - flood: NO_PIN - mist: NO_PIN + flood_pin: NO_PIN + mist_pin: NO_PIN delay_ms: 0 probe: @@ -171,18 +171,18 @@ macros: macro3: user_outputs: - analog0: NO_PIN - analog1: NO_PIN - analog2: NO_PIN - analog3: NO_PIN + analog0_pin: NO_PIN + analog1_pin: NO_PIN + analog2_pin: NO_PIN + analog3_pin: NO_PIN analog0_freq_hz: 5000 analog1_freq_hz: 5000 analog2_freq_hz: 5000 analog3_freq_hz: 5000 - digital0: NO_PIN - digital1: NO_PIN - digital2: NO_PIN - digital3: NO_PIN + digital0_pin: NO_PIN + digital1_pin: NO_PIN + digital2_pin: NO_PIN + digital3_pin: NO_PIN software_debounce_ms: 0 laser_mode: false diff --git a/example_configs/6_pack_external_huanyang.yaml b/example_configs/6_pack_external_huanyang.yaml index 3ee055dd5..176bff1cc 100644 --- a/example_configs/6_pack_external_huanyang.yaml +++ b/example_configs/6_pack_external_huanyang.yaml @@ -8,7 +8,7 @@ stepping: disable_delay_us: 0 axes: - shared_stepper_disable: NO_PIN + shared_stepper_disable_pin: NO_PIN x: steps_per_mm: 800.000 max_rate: 5000.000 @@ -26,15 +26,15 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN hard_limits: true pulloff: 1.000 standard_stepper: - step: I2SO.2 - direction: I2SO.1 - disable: I2SO.0 + step_pin: I2SO.2 + direction_pin: I2SO.1 + disable_pin: I2SO.0 y: steps_per_mm: 800.000 @@ -53,15 +53,15 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: gpio.32:pu + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: gpio.32:pu hard_limits: true pulloff: 1.000 standard_stepper: - step: I2SO.5 - direction: I2SO.4 - disable: I2SO.7 + step_pin: I2SO.5 + direction_pin: I2SO.4 + disable_pin: I2SO.7 z: steps_per_mm: 800.000 @@ -80,43 +80,43 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: gpio.35 + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: gpio.35 hard_limits: true pulloff: 1.000 standard_stepper: - step: I2SO.10 - direction: I2SO.9 - disable: I2SO.8 + step_pin: I2SO.10 + direction_pin: I2SO.9 + disable_pin: I2SO.8 i2so: - bck: gpio.22 - data: gpio.21 - ws: gpio.17 + bck_pin: gpio.22 + data_pin: gpio.21 + ws_pin: gpio.17 spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - card_detect: NO_PIN - cs: gpio.5 + card_detect_pin: NO_PIN + cs_pin: gpio.5 control: - safety_door: NO_PIN - reset: NO_PIN - feed_hold: NO_PIN - cycle_start: NO_PIN - macro0: NO_PIN - macro1: NO_PIN - macro2: NO_PIN - macro3: NO_PIN + safety_door_pin: NO_PIN + reset_pin: NO_PIN + feed_hold_pin: NO_PIN + cycle_start_pin: NO_PIN + macro0_pin: NO_PIN + macro1_pin: NO_PIN + macro2_pin: NO_PIN + macro3_pin: NO_PIN coolant: - flood: NO_PIN - mist: NO_PIN + flood_pin: NO_PIN + mist_pin: NO_PIN delay_ms: 0 probe: @@ -132,18 +132,18 @@ macros: macro3: user_outputs: - analog0: NO_PIN - analog1: NO_PIN - analog2: NO_PIN - analog3: NO_PIN + analog0_pin: NO_PIN + analog1_pin: NO_PIN + analog2_pin: NO_PIN + analog3_pin: NO_PIN analog0_freq_hz: 5000 analog1_freq_hz: 5000 analog2_freq_hz: 5000 analog3_freq_hz: 5000 - digital0: NO_PIN - digital1: NO_PIN - digital2: NO_PIN - digital3: NO_PIN + digital0_pin: NO_PIN + digital1_pin: NO_PIN + digital2_pin: NO_PIN + digital3_pin: NO_PIN software_debounce_ms: 0 laser_mode: false diff --git a/example_configs/TMC2130_SPI_Daisy.yaml b/example_configs/TMC2130_SPI_Daisy.yaml index 96c96d292..04ed28c6b 100644 --- a/example_configs/TMC2130_SPI_Daisy.yaml +++ b/example_configs/TMC2130_SPI_Daisy.yaml @@ -8,7 +8,7 @@ stepping: disable_delay_us: 0 axes: - shared_stepper_disable: NO_PIN + shared_stepper_disable_pin: NO_PIN x: steps_per_mm: 800.000 max_rate: 5000.000 @@ -26,13 +26,13 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN hard_limits: true pulloff: 1.000 tmc_2130: - cs: gpio.17 + cs_pin: gpio.17 spi_index: 1 r_sense: 0.110 run_current: 0.750 @@ -46,9 +46,9 @@ axes: run_mode: CoolStep homing_mode: CoolStep use_enable: true - step: gpio.12 - direction: gpio.14 - disable: NO_PIN + step_pin: gpio.12 + direction_pin: gpio.14 + disable_pin: NO_PIN y: steps_per_mm: 800.000 @@ -67,9 +67,9 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN hard_limits: true pulloff: 1.000 tmc_2130: @@ -86,9 +86,9 @@ axes: run_mode: CoolStep homing_mode: CoolStep use_enable: true - step: gpio.27 - direction: gpio.26 - disable: NO_PIN + step_pin: gpio.27 + direction_pin: gpio.26 + disable_pin: NO_PIN z: steps_per_mm: 800.000 @@ -107,9 +107,9 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN hard_limits: true pulloff: 1.000 tmc_2130: @@ -126,9 +126,9 @@ axes: run_mode: CoolStep homing_mode: CoolStep use_enable: true - step: gpio.15 - direction: gpio.2 - disable: NO_PIN + step_pin: gpio.15 + direction_pin: gpio.2 + disable_pin: NO_PIN a: steps_per_mm: 800.000 @@ -147,9 +147,9 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN hard_limits: true pulloff: 1.000 tmc_2130: @@ -166,18 +166,18 @@ axes: run_mode: CoolStep homing_mode: CoolStep use_enable: true - step: gpio.33 - direction: gpio.32 - disable: NO_PIN + step_pin: gpio.33 + direction_pin: gpio.32 + disable_pin: NO_PIN spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - card_detect: NO_PIN - cs: gpio.5 + card_detect_pin: NO_PIN + cs_pin: gpio.5 control: safety_door: NO_PIN diff --git a/example_configs/TMC2130_pen.yaml b/example_configs/TMC2130_pen.yaml index e1debca5d..a046fc743 100644 --- a/example_configs/TMC2130_pen.yaml +++ b/example_configs/TMC2130_pen.yaml @@ -9,7 +9,7 @@ stepping: disable_delay_us: 0 axes: - shared_stepper_disable: gpio.13:high + shared_stepper_disable_pin: gpio.13:high x: steps_per_mm: 800 @@ -28,11 +28,11 @@ axes: feed_scaler: 1.100 motor0: - limit_all: gpio.32:low:pu + limit_all_pin: gpio.32:low:pu tmc_2130: - direction: gpio.26 - step: gpio.12 - cs: gpio.17 + direction_pin: gpio.26 + step_pin: gpio.12 + cs_pin: gpio.17 r_sense: 0.110 run_current: 0.250 hold_current: 0.250 @@ -65,11 +65,11 @@ axes: feed_scaler: 1.100 motor0: - limit_all: NO_PIN + limit_all_pin: NO_PIN tmc_2130: - direction: gpio.25 - step: gpio.14 - cs: gpio.16 + direction_pin: gpio.25 + step_pin: gpio.14 + cs_pin: gpio.16 r_sense: 0.110 run_current: 0.250 hold_current: 0.250 @@ -109,13 +109,13 @@ axes: max_pulse_us: 1000 spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - cs: gpio.5 - card_detect: NO_PIN + cs_pin: gpio.5 + card_detect_pin: NO_PIN coolant: flood: NO_PIN diff --git a/example_configs/TMC2209.yaml b/example_configs/TMC2209.yaml index fae3b8c0d..81076f4f2 100644 --- a/example_configs/TMC2209.yaml +++ b/example_configs/TMC2209.yaml @@ -8,7 +8,7 @@ stepping: disable_delay_us: 0 axes: - shared_stepper_disable: gpio.25 + shared_stepper_disable_pin: gpio.25 x: steps_per_mm: 800.000 max_rate: 5000.000 @@ -26,14 +26,14 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: gpio.35 + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: gpio.35 hard_limits: true pulloff: 1.000 tmc_2209: - step: gpio.26 - direction: gpio.27 + step_pin: gpio.26 + direction_pin: gpio.27 y: steps_per_mm: 800.000 @@ -52,14 +52,14 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: gpio.34 + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: gpio.34 hard_limits: true pulloff: 1.000 tmc_2209: - step: gpio.33 - direction: gpio.32 + step_pin: gpio.33 + direction_pin: gpio.32 z: steps_per_mm: 800.000 @@ -78,14 +78,14 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: gpio.39 + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: gpio.39 hard_limits: true pulloff: 1.000 tmc_2209: - step: gpio.2 - direction: gpio.14 + step_pin: gpio.2 + direction_pin: gpio.14 a: steps_per_mm: 800.000 @@ -104,23 +104,23 @@ a: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN hard_limits: true pulloff: 1.000 tmc_2209: - step: gpio.16 - direction: gpio.15 + step_pin: gpio.16 + direction_pin: gpio.15 spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - cs: gpio.5 - card_detect: NO_PIN + cs_pin: gpio.5 + card_detect_pin: NO_PIN control: safety_door: NO_PIN diff --git a/example_configs/TMC2209_pen.yaml b/example_configs/TMC2209_pen.yaml new file mode 100644 index 000000000..48d93b3ad --- /dev/null +++ b/example_configs/TMC2209_pen.yaml @@ -0,0 +1,198 @@ +board: TMC2209 Pen +name: TMC2209 Pen +stepping: + engine: RMT + idle_ms: 250 + pulse_us: 2 + dir_delay_us: 1 + disable_delay_us: 0 + +axes: + shared_stepper_disable_pin: gpio.13 + x: + steps_per_mm: 80.000 + max_rate: 30000.000 + acceleration: 100.000 + max_travel: 300.000 + soft_limits: false + homing: + cycle: 1 + positive_direction: false + mpos: 150.000 + feed_rate: 100.000 + seek_rate: 200.000 + debounce_ms: 500 + seek_scaler: 1.100 + feed_scaler: 1.100 + + motor0: + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.33 + limit_all_pin: NO_PIN + hard_limits: false + pulloff: 1.000 + tmc_2209: + uart: + txd_pin: gpio.22 + rxd_pin: gpio.21 + rts_pin: NO_PIN + cts_pin: NO_PIN + baud: 115200 + mode: 8N1 + + addr: 0 + r_sense_ohm: 0.110 + run_amps: 0.500 + hold_amps: 0.500 + microsteps: 4 + stallguard: 0 + stallguardDebugMode: false + toff_disable: 0 + toff_stealthchop: 5 + toff_coolstep: 3 + run_mode: CoolStep + homing_mode: CoolStep + use_enable: false + step_pin: gpio.12 + direction_pin: gpio.26 + disable_pin: NO_PIN + + motor1: + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN + hard_limits: true + pulloff: 1.000 + null_motor: + + y: + steps_per_mm: 800.000 + max_rate: 5000.000 + acceleration: 100.000 + max_travel: 300.000 + soft_limits: false + homing: + cycle: 2 + positive_direction: false + mpos: 150.000 + feed_rate: 100.000 + seek_rate: 200.000 + debounce_ms: 500 + seek_scaler: 1.100 + feed_scaler: 1.100 + + motor0: + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.32 + limit_all_pin: NO_PIN + hard_limits: false + pulloff: 1.000 + tmc_2209: + uart: + txd_pin: gpio.22 + rxd_pin: gpio.21 + rts_pin: NO_PIN + cts_pin: NO_PIN + baud: 115200 + mode: 8N1 + + addr: 1 + r_sense_ohm: 0.110 + run_amps: 0.500 + hold_amps: 0.500 + microsteps: 16 + stallguard: 0 + stallguardDebugMode: false + toff_disable: 0 + toff_stealthchop: 5 + toff_coolstep: 3 + run_mode: StealthChop + homing_mode: StealthChop + use_enable: false + step_pin: gpio.14 + direction_pin: gpio.25 + disable_pin: NO_PIN + + motor1: + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN + hard_limits: true + pulloff: 1.000 + null_motor: + + z: + steps_per_mm: 320.000 + max_rate: 1000.000 + acceleration: 25.000 + max_travel: 200.000 + soft_limits: false + +spi: + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 + +sdcard: + cs_pin: gpio.5 + card_detect_pin: NO_PIN + +control: + safety_door_pin: NO_PIN + reset_pin: NO_PIN + feed_hold_pin: NO_PIN + cycle_start_pin: NO_PIN + macro0_pin: NO_PIN + macro1_pin: NO_PIN + macro2_pin: NO_PIN + macro3_pin: NO_PIN + +coolant: + flood_pin: NO_PIN + mist_pin: NO_PIN + delay_ms: 0 + +probe: + pin: NO_PIN + check_mode_start: true + +macros: + n0: + n1: + macro0: + macro1: + macro2: + macro3: + +user_outputs: + analog0_pin: NO_PIN + analog1_pin: NO_PIN + analog2_pin: NO_PIN + analog3_pin: NO_PIN + analog0_freq_hz: 5000 + analog1_freq_hz: 5000 + analog2_freq_hz: 5000 + analog3_freq_hz: 5000 + digital0_pin: NO_PIN + digital1_pin: NO_PIN + digital2_pin: NO_PIN + digital3_pin: NO_PIN + +software_debounce_ms: 0 +arc_tolerance: 0.002 +junction_deviation: 0.010 +verbose_errors: false +report_inches: false +homing_init_lock: true +enable_parking_override_control: false +deactivate_parking_upon_init: false +check_limits_at_init: true +use_line_numbers: false +Laser: + pwm_freq_hz: 5000 + output_pin: gpio.27 + enable_pin: gpio.17 + disable_with_zero_speed: false + zero_speed_with_disable: true + tool: 100 + speeds: 0=0.000% 255=100.000% \ No newline at end of file diff --git a/example_configs/test_drive_SD.yaml b/example_configs/test_drive_SD.yaml index dd5336434..1b7baa42f 100644 --- a/example_configs/test_drive_SD.yaml +++ b/example_configs/test_drive_SD.yaml @@ -8,7 +8,7 @@ stepping: disable_delay_us: 0 axes: - shared_stepper_disable: NO_PIN + shared_stepper_disable_pin: NO_PIN x: steps_per_mm: 320.000 max_rate: 1000.000 @@ -31,9 +31,9 @@ axes: soft_limits: false spi: - miso: NO_PIN - mosi: NO_PIN - sck: NO_PIN + miso_pin: NO_PIN + mosi_pin: NO_PIN + sck_pin: NO_PIN control: safety_door: NO_PIN @@ -77,8 +77,8 @@ user_outputs: digital3: NO_PIN sdcard: - card_detect: NO_PIN - cs: gpio.5 + card_detect_pin: NO_PIN + cs_pin: gpio.5 software_debounce_ms: 0 laser_mode: false diff --git a/example_configs/tmc2209_10V.yaml b/example_configs/tmc2209_10V.yaml index 3c1e86181..1d54c8f1f 100644 --- a/example_configs/tmc2209_10V.yaml +++ b/example_configs/tmc2209_10V.yaml @@ -11,7 +11,7 @@ stepping: homing_init_lock: true axes: - shared_stepper_disable: gpio.25:high + shared_stepper_disable_pin: gpio.25:high x: steps_per_mm: 800 @@ -27,7 +27,7 @@ axes: debounce_ms: 500 motor0: - limit_pos: gpio.35 + limit_pos_pin: gpio.35 hard_limits: false pulloff: 1.000 tmc_2209: @@ -49,9 +49,9 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: gpio.26 - direction: gpio.27 - disable: NO_PIN + step_pin: gpio.26 + direction_pin: gpio.27 + disable_pin: NO_PIN motor1: null_motor: @@ -71,14 +71,14 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.34 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.34 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.33 - direction: gpio.32 + step_pin: gpio.33 + direction_pin: gpio.32 microsteps: 16 addr: 1 @@ -100,14 +100,14 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.39 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.39 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.2 - direction: gpio.14 + step_pin: gpio.2 + direction_pin: gpio.14 addr: 2 motor1: @@ -129,35 +129,35 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.36 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.36 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.16 - direction: gpio.15 + step_pin: gpio.16 + direction_pin: gpio.15 addr: 3 motor1: null_motor: spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - cs: gpio.5 - card_detect: NO_PIN + cs_pin: gpio.5 + card_detect_pin: NO_PIN probe: pin: NO_PIN 10V: output_pin: gpio.4 - forward: gpio.13 - reverse: gpio.17 + forward_pin: gpio.13 + reverse_pin: gpio.17 spinup_ms: 0 spindown_ms: 0 tool: 0 diff --git a/example_configs/tmc2209_BESC.yaml b/example_configs/tmc2209_BESC.yaml index 70acc9ac2..620897611 100644 --- a/example_configs/tmc2209_BESC.yaml +++ b/example_configs/tmc2209_BESC.yaml @@ -11,7 +11,7 @@ stepping: homing_init_lock: true axes: - shared_stepper_disable: gpio.25:high + shared_stepper_disable_pin: gpio.25:high x: steps_per_mm: 800 @@ -27,7 +27,7 @@ axes: debounce_ms: 500 motor0: - limit_pos: gpio.35 + limit_pos_pin: gpio.35 hard_limits: false pulloff: 1.000 tmc_2209: @@ -49,9 +49,9 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: gpio.26 - direction: gpio.27 - disable: NO_PIN + step_pin: gpio.26 + direction_pin: gpio.27 + disable_pin: NO_PIN motor1: null_motor: @@ -71,14 +71,14 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.34 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.34 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.33 - direction: gpio.32 + step_pin: gpio.33 + direction_pin: gpio.32 microsteps: 16 addr: 1 @@ -100,14 +100,14 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.39 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.39 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.2 - direction: gpio.14 + step_pin: gpio.2 + direction_pin: gpio.14 addr: 2 motor1: @@ -129,27 +129,27 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.36 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.36 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.16 - direction: gpio.15 + step_pin: gpio.16 + direction_pin: gpio.15 addr: 3 motor1: null_motor: spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - cs: gpio.5 - card_detect: NO_PIN + cs_pin: gpio.5 + card_detect_pin: NO_PIN probe: pin: NO_PIN diff --git a/example_configs/tmc2209_huanyang.yml b/example_configs/tmc2209_huanyang.yml index d22372ea8..d223105ca 100644 --- a/example_configs/tmc2209_huanyang.yml +++ b/example_configs/tmc2209_huanyang.yml @@ -11,7 +11,7 @@ stepping: homing_init_lock: true axes: - shared_stepper_disable: gpio.25:high + shared_stepper_disable_pin: gpio.25:high x: steps_per_mm: 800 @@ -27,7 +27,7 @@ axes: debounce_ms: 500 motor0: - limit_pos: gpio.35 + limit_pos_pin: gpio.35 hard_limits: false pulloff: 1.000 tmc_2209: @@ -49,9 +49,9 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: gpio.26 - direction: gpio.27 - disable: NO_PIN + step_pin: gpio.26 + direction_pin: gpio.27 + disable_pin: NO_PIN motor1: null_motor: @@ -71,14 +71,14 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.34 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.34 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.33 - direction: gpio.32 + step_pin: gpio.33 + direction_pin: gpio.32 addr: 1 motor1: @@ -99,14 +99,14 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.39 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.39 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.2 - direction: gpio.14 + step_pin: gpio.2 + direction_pin: gpio.14 addr: 2 motor1: @@ -128,27 +128,27 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.36 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.36 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.16 - direction: gpio.15 + step_pin: gpio.16 + direction_pin: gpio.15 addr: 3 motor1: null_motor: spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - cs: gpio.5 - card_detect: NO_PIN + cs_pin: gpio.5 + card_detect_pin: NO_PIN probe: pin: NO_PIN diff --git a/example_configs/tmc2209_laser.yaml b/example_configs/tmc2209_laser.yaml index d3caa83af..240cb264e 100644 --- a/example_configs/tmc2209_laser.yaml +++ b/example_configs/tmc2209_laser.yaml @@ -11,7 +11,7 @@ stepping: homing_init_lock: true axes: - shared_stepper_disable: gpio.25:high + shared_stepper_disable_pin: gpio.25:high x: steps_per_mm: 800.000 @@ -30,9 +30,9 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: gpio.35 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.35 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.000 tmc_2209: @@ -57,14 +57,14 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: gpio.26 - direction: gpio.27 - disable: NO_PIN + step_pin: gpio.26 + direction_pin: gpio.27 + disable_pin: NO_PIN motor1: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN hard_limits: true pulloff: 1.000 null_motor: @@ -86,9 +86,9 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: gpio.34 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.34 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.000 tmc_2209: @@ -105,14 +105,14 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: gpio.33 - direction: gpio.32 - disable: NO_PIN + step_pin: gpio.33 + direction_pin: gpio.32 + disable_pin: NO_PIN motor1: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN hard_limits: true pulloff: 1.000 null_motor: @@ -134,9 +134,9 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: gpio.39 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.39 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.000 tmc_2209: @@ -153,14 +153,14 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: gpio.2 - direction: gpio.14 - disable: NO_PIN + step_pin: gpio.2 + direction_pin: gpio.14 + disable_pin: NO_PIN motor1: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN hard_limits: true pulloff: 1.000 null_motor: @@ -182,9 +182,9 @@ axes: feed_scaler: 1.100 motor0: - limit_neg: NO_PIN - limit_pos: gpio.36 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.36 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.000 tmc_2209: @@ -201,27 +201,27 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: gpio.16 - direction: gpio.15 - disable: NO_PIN + step_pin: gpio.16 + direction_pin: gpio.15 + disable_pin: NO_PIN motor1: - limit_neg: NO_PIN - limit_pos: NO_PIN - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: NO_PIN + limit_all_pin: NO_PIN hard_limits: true pulloff: 1.000 null_motor: spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - card_detect: NO_PIN - cs: gpio.5 + card_detect_pin: NO_PIN + cs_pin: gpio.5 probe: pin: NO_PIN diff --git a/example_configs/tmc2209_relay.yaml b/example_configs/tmc2209_relay.yaml index 19551dd1f..f9a0f13b8 100644 --- a/example_configs/tmc2209_relay.yaml +++ b/example_configs/tmc2209_relay.yaml @@ -11,7 +11,7 @@ stepping: homing_init_lock: true axes: - shared_stepper_disable: gpio.25:high + shared_stepper_disable_pin: gpio.25:high x: steps_per_mm: 800 @@ -27,7 +27,7 @@ axes: debounce_ms: 500 motor0: - limit_pos: gpio.35 + limit_pos_pin: gpio.35 hard_limits: false pulloff: 1.000 tmc_2209: @@ -49,9 +49,9 @@ axes: run_mode: StealthChop homing_mode: StealthChop use_enable: false - step: gpio.26 - direction: gpio.27 - disable: NO_PIN + step_pin: gpio.26 + direction_pin: gpio.27 + disable_pin: NO_PIN motor1: null_motor: @@ -71,14 +71,14 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.34 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.34 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.33 - direction: gpio.32 + step_pin: gpio.33 + direction_pin: gpio.32 microsteps: 16 addr: 1 @@ -100,14 +100,14 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.39 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.39 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.2 - direction: gpio.14 + step_pin: gpio.2 + direction_pin: gpio.14 addr: 2 motor1: @@ -129,27 +129,27 @@ axes: debounce_ms: 500 motor0: - limit_neg: NO_PIN - limit_pos: gpio.36 - limit_all: NO_PIN + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.36 + limit_all_pin: NO_PIN hard_limits: false pulloff: 1.00 tmc_2209: - step: gpio.16 - direction: gpio.15 + step_pin: gpio.16 + direction_pin: gpio.15 addr: 3 motor1: null_motor: spi: - miso: gpio.19 - mosi: gpio.23 - sck: gpio.18 + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 sdcard: - cs: gpio.5 - card_detect: NO_PIN + cs_pin: gpio.5 + card_detect_pin: NO_PIN probe: pin: NO_PIN From 32b7f89a5b497631597286da6f01afd3bc11582f Mon Sep 17 00:00:00 2001 From: bdring Date: Mon, 4 Oct 2021 12:42:50 -0500 Subject: [PATCH 11/20] pulloff_mm --- FluidNC/src/Machine/Motor.cpp | 2 +- FluidNC/src/Motors/TrinamicBase.h | 2 +- example_configs/6_pack_TMC2130.yaml | 12 +++++----- example_configs/6_pack_TMC5160.yaml | 12 +++++----- example_configs/6_pack_external_huanyang.yaml | 6 ++--- example_configs/TMC2130_SPI_Daisy.yaml | 16 ++++++------- example_configs/TMC2130_pen.yaml | 4 ++-- example_configs/TMC2209.yaml | 8 +++---- example_configs/TMC2209_pen.yaml | 8 +++---- example_configs/tmc2209_10V.yaml | 10 ++++---- example_configs/tmc2209_BESC.yaml | 10 ++++---- example_configs/tmc2209_huanyang.yml | 10 ++++---- example_configs/tmc2209_laser.yaml | 24 +++++++++---------- example_configs/tmc2209_relay.yaml | 10 ++++---- 14 files changed, 67 insertions(+), 67 deletions(-) diff --git a/FluidNC/src/Machine/Motor.cpp b/FluidNC/src/Machine/Motor.cpp index 1f6fcda2b..988ce58a0 100644 --- a/FluidNC/src/Machine/Motor.cpp +++ b/FluidNC/src/Machine/Motor.cpp @@ -18,7 +18,7 @@ namespace Machine { handler.item("limit_pos_pin", _posPin); handler.item("limit_all_pin", _allPin); handler.item("hard_limits", _hardLimits); - handler.item("pulloff", _pulloff); + handler.item("pulloff_mm", _pulloff); MotorDrivers::MotorFactory::factory(handler, _driver); } diff --git a/FluidNC/src/Motors/TrinamicBase.h b/FluidNC/src/Motors/TrinamicBase.h index bb654a01a..75be208ce 100644 --- a/FluidNC/src/Motors/TrinamicBase.h +++ b/FluidNC/src/Motors/TrinamicBase.h @@ -63,7 +63,7 @@ namespace MotorDrivers { TrinamicBase(uint16_t partNumber) : StandardStepper(), _driver_part_number(partNumber) {} void group(Configuration::HandlerBase& handler) override { - handler.item("r_sense_ohm", _r_sense); + handler.item("r_sense_ohms", _r_sense); handler.item("run_amps", _run_current); handler.item("hold_amps", _hold_current); handler.item("microsteps", _microsteps); diff --git a/example_configs/6_pack_TMC2130.yaml b/example_configs/6_pack_TMC2130.yaml index af2e3ab16..78f22966d 100644 --- a/example_configs/6_pack_TMC2130.yaml +++ b/example_configs/6_pack_TMC2130.yaml @@ -30,10 +30,10 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.33:pu hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_2130: cs_pin: i2so.3 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.750 hold_current: 0.750 microsteps: 16 @@ -70,10 +70,10 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.32:pu hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_2130: cs_pin: i2so.6 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.750 hold_current: 0.750 microsteps: 16 @@ -110,10 +110,10 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.35 hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_2130: cs_pin: i2so.11 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.750 hold_current: 0.750 microsteps: 16 diff --git a/example_configs/6_pack_TMC5160.yaml b/example_configs/6_pack_TMC5160.yaml index 4e607a54b..58cde1d1d 100644 --- a/example_configs/6_pack_TMC5160.yaml +++ b/example_configs/6_pack_TMC5160.yaml @@ -30,10 +30,10 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.33:pu hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_5160: cs_pin: i2so.3 - r_sense: 0.075 + r_sense_ohms: 0.075 run_current: 1.75 hold_current: 0.50 microsteps: 16 @@ -70,10 +70,10 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.32:pu hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_5160: cs_pin: i2so.6 - r_sense: 0.075 + r_sense_ohms: 0.075 run_current: 1.75 hold_current: 0.50 microsteps: 16 @@ -110,10 +110,10 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.35 hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_5160: cs_pin: i2so.11 - r_sense: 0.075 + r_sense_ohms: 0.075 run_current: 1.750 hold_current: 0.50 microsteps: 16 diff --git a/example_configs/6_pack_external_huanyang.yaml b/example_configs/6_pack_external_huanyang.yaml index 176bff1cc..098eb4301 100644 --- a/example_configs/6_pack_external_huanyang.yaml +++ b/example_configs/6_pack_external_huanyang.yaml @@ -30,7 +30,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 standard_stepper: step_pin: I2SO.2 direction_pin: I2SO.1 @@ -57,7 +57,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.32:pu hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 standard_stepper: step_pin: I2SO.5 direction_pin: I2SO.4 @@ -84,7 +84,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.35 hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 standard_stepper: step_pin: I2SO.10 direction_pin: I2SO.9 diff --git a/example_configs/TMC2130_SPI_Daisy.yaml b/example_configs/TMC2130_SPI_Daisy.yaml index 04ed28c6b..a005ad162 100644 --- a/example_configs/TMC2130_SPI_Daisy.yaml +++ b/example_configs/TMC2130_SPI_Daisy.yaml @@ -30,11 +30,11 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_2130: cs_pin: gpio.17 spi_index: 1 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.750 hold_current: 0.750 microsteps: 16 @@ -71,10 +71,10 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_2130: spi_index: 2 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.750 hold_current: 0.750 microsteps: 16 @@ -111,10 +111,10 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_2130: spi_index: 3 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.750 hold_current: 0.750 microsteps: 16 @@ -151,10 +151,10 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_2130: spi_index: 4 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.750 hold_current: 0.750 microsteps: 16 diff --git a/example_configs/TMC2130_pen.yaml b/example_configs/TMC2130_pen.yaml index a046fc743..a895d4793 100644 --- a/example_configs/TMC2130_pen.yaml +++ b/example_configs/TMC2130_pen.yaml @@ -33,7 +33,7 @@ axes: direction_pin: gpio.26 step_pin: gpio.12 cs_pin: gpio.17 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.250 hold_current: 0.250 microsteps: 32 @@ -70,7 +70,7 @@ axes: direction_pin: gpio.25 step_pin: gpio.14 cs_pin: gpio.16 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.250 hold_current: 0.250 microsteps: 32 diff --git a/example_configs/TMC2209.yaml b/example_configs/TMC2209.yaml index 81076f4f2..51de5abd8 100644 --- a/example_configs/TMC2209.yaml +++ b/example_configs/TMC2209.yaml @@ -30,7 +30,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.35 hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: step_pin: gpio.26 direction_pin: gpio.27 @@ -56,7 +56,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.34 hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: step_pin: gpio.33 direction_pin: gpio.32 @@ -82,7 +82,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.39 hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: step_pin: gpio.2 direction_pin: gpio.14 @@ -108,7 +108,7 @@ a: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: step_pin: gpio.16 direction_pin: gpio.15 diff --git a/example_configs/TMC2209_pen.yaml b/example_configs/TMC2209_pen.yaml index 48d93b3ad..2530037fa 100644 --- a/example_configs/TMC2209_pen.yaml +++ b/example_configs/TMC2209_pen.yaml @@ -30,7 +30,7 @@ axes: limit_pos_pin: gpio.33 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -62,7 +62,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 null_motor: y: @@ -86,7 +86,7 @@ axes: limit_pos_pin: gpio.32 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -118,7 +118,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 null_motor: z: diff --git a/example_configs/tmc2209_10V.yaml b/example_configs/tmc2209_10V.yaml index 1d54c8f1f..22f29d199 100644 --- a/example_configs/tmc2209_10V.yaml +++ b/example_configs/tmc2209_10V.yaml @@ -29,7 +29,7 @@ axes: motor0: limit_pos_pin: gpio.35 hard_limits: false - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -37,7 +37,7 @@ axes: baud: 115200 mode: 8N1 addr: 0 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.500 hold_current: 0.500 microsteps: 32 @@ -75,7 +75,7 @@ axes: limit_pos_pin: gpio.34 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.33 direction_pin: gpio.32 @@ -104,7 +104,7 @@ axes: limit_pos_pin: gpio.39 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.2 direction_pin: gpio.14 @@ -133,7 +133,7 @@ axes: limit_pos_pin: gpio.36 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.16 direction_pin: gpio.15 diff --git a/example_configs/tmc2209_BESC.yaml b/example_configs/tmc2209_BESC.yaml index 620897611..a15a6cc80 100644 --- a/example_configs/tmc2209_BESC.yaml +++ b/example_configs/tmc2209_BESC.yaml @@ -29,7 +29,7 @@ axes: motor0: limit_pos_pin: gpio.35 hard_limits: false - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -37,7 +37,7 @@ axes: baud: 115200 mode: 8N1 addr: 0 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.500 hold_current: 0.500 microsteps: 32 @@ -75,7 +75,7 @@ axes: limit_pos_pin: gpio.34 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.33 direction_pin: gpio.32 @@ -104,7 +104,7 @@ axes: limit_pos_pin: gpio.39 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.2 direction_pin: gpio.14 @@ -133,7 +133,7 @@ axes: limit_pos_pin: gpio.36 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.16 direction_pin: gpio.15 diff --git a/example_configs/tmc2209_huanyang.yml b/example_configs/tmc2209_huanyang.yml index d223105ca..f2205de06 100644 --- a/example_configs/tmc2209_huanyang.yml +++ b/example_configs/tmc2209_huanyang.yml @@ -29,7 +29,7 @@ axes: motor0: limit_pos_pin: gpio.35 hard_limits: false - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -37,7 +37,7 @@ axes: baud: 115200 mode: 8N1 addr: 0 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.500 hold_current: 0.500 microsteps: 32 @@ -75,7 +75,7 @@ axes: limit_pos_pin: gpio.34 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.33 direction_pin: gpio.32 @@ -103,7 +103,7 @@ axes: limit_pos_pin: gpio.39 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.2 direction_pin: gpio.14 @@ -132,7 +132,7 @@ axes: limit_pos_pin: gpio.36 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.16 direction_pin: gpio.15 diff --git a/example_configs/tmc2209_laser.yaml b/example_configs/tmc2209_laser.yaml index 240cb264e..be031fec0 100644 --- a/example_configs/tmc2209_laser.yaml +++ b/example_configs/tmc2209_laser.yaml @@ -34,7 +34,7 @@ axes: limit_pos_pin: gpio.35 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -45,7 +45,7 @@ axes: mode: 8N1 addr: 0 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 1.200 hold_current: 0.500 microsteps: 8 @@ -66,7 +66,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 null_motor: y: @@ -90,10 +90,10 @@ axes: limit_pos_pin: gpio.34 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: addr: 1 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 1.200 hold_current: 0.500 microsteps: 8 @@ -114,7 +114,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 null_motor: z: @@ -138,10 +138,10 @@ axes: limit_pos_pin: gpio.39 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: addr: 2 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 1.200 hold_current: 0.500 microsteps: 8 @@ -162,7 +162,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 null_motor: a: @@ -186,10 +186,10 @@ axes: limit_pos_pin: gpio.36 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: addr: 3 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 1.200 hold_current: 0.500 microsteps: 8 @@ -210,7 +210,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff: 1.000 + pulloff_mm 1.000 null_motor: diff --git a/example_configs/tmc2209_relay.yaml b/example_configs/tmc2209_relay.yaml index f9a0f13b8..65e4685b3 100644 --- a/example_configs/tmc2209_relay.yaml +++ b/example_configs/tmc2209_relay.yaml @@ -29,7 +29,7 @@ axes: motor0: limit_pos_pin: gpio.35 hard_limits: false - pulloff: 1.000 + pulloff_mm 1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -37,7 +37,7 @@ axes: baud: 115200 mode: 8N1 addr: 0 - r_sense: 0.110 + r_sense_ohms: 0.110 run_current: 0.500 hold_current: 0.500 microsteps: 32 @@ -75,7 +75,7 @@ axes: limit_pos_pin: gpio.34 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.33 direction_pin: gpio.32 @@ -104,7 +104,7 @@ axes: limit_pos_pin: gpio.39 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.2 direction_pin: gpio.14 @@ -133,7 +133,7 @@ axes: limit_pos_pin: gpio.36 limit_all_pin: NO_PIN hard_limits: false - pulloff: 1.00 + pulloff_mm 1.00 tmc_2209: step_pin: gpio.16 direction_pin: gpio.15 From 05a62d729b5d2b3519abf46a60785740bb1386a2 Mon Sep 17 00:00:00 2001 From: bdring Date: Mon, 4 Oct 2021 15:34:14 -0500 Subject: [PATCH 12/20] WIP - just machine level stuff to go --- FluidNC/src/Machine/Axis.cpp | 6 +- FluidNC/src/Machine/Homing.h | 4 +- FluidNC/src/Machine/MachineConfig.cpp | 4 +- FluidNC/src/Machine/Macros.h | 4 +- FluidNC/src/Machine/UserOutputs.cpp | 8 +- FluidNC/src/Motors/RcServo.h | 2 +- FluidNC/src/Motors/TrinamicBase.h | 2 +- FluidNC/src/Spindles/Laser.h | 2 +- FluidNC/src/Spindles/OnOffSpindle.h | 4 +- FluidNC/src/Spindles/Spindle.h | 4 +- .../test/Configuration/YamlTreeBuilder.cpp | 6 +- example_configs/3axis_v4.yaml | 34 ++++----- example_configs/6_pack_TMC2130.yaml | 68 ++++++++--------- example_configs/6_pack_TMC5160.yaml | 68 ++++++++--------- example_configs/6_pack_external_huanyang.yaml | 56 +++++++------- example_configs/TMC2130_SPI_Daisy.yaml | 72 +++++++++--------- example_configs/TMC2130_pen.yaml | 42 +++++------ example_configs/TMC2209.yaml | 74 +++++++++---------- example_configs/TMC2209_pen.yaml | 60 +++++++-------- example_configs/test_drive_SD.yaml | 34 ++++----- example_configs/tmc2209_10V.yaml | 54 +++++++------- example_configs/tmc2209_BESC.yaml | 60 +++++++-------- example_configs/tmc2209_huanyang.yml | 54 +++++++------- example_configs/tmc2209_laser.yaml | 66 ++++++++--------- example_configs/tmc2209_relay.yaml | 50 ++++++------- 25 files changed, 419 insertions(+), 419 deletions(-) diff --git a/FluidNC/src/Machine/Axis.cpp b/FluidNC/src/Machine/Axis.cpp index f4ee0d10a..fd27c687a 100644 --- a/FluidNC/src/Machine/Axis.cpp +++ b/FluidNC/src/Machine/Axis.cpp @@ -7,9 +7,9 @@ namespace Machine { void Axis::group(Configuration::HandlerBase& handler) { handler.item("steps_per_mm", _stepsPerMm); - handler.item("max_rate", _maxRate); - handler.item("acceleration", _acceleration); - handler.item("max_travel", _maxTravel); + handler.item("max_rate_mm_per_min", _maxRate); + handler.item("acceleration_mm_per_sec2", _acceleration); + handler.item("max_travel_mm", _maxTravel); handler.item("soft_limits", _softLimits); handler.section("homing", _homing); diff --git a/FluidNC/src/Machine/Homing.h b/FluidNC/src/Machine/Homing.h index 178955759..34f2d1bea 100644 --- a/FluidNC/src/Machine/Homing.h +++ b/FluidNC/src/Machine/Homing.h @@ -43,8 +43,8 @@ namespace Machine { handler.item("cycle", _cycle); handler.item("positive_direction", _positiveDirection); handler.item("mpos", _mpos); - handler.item("feed_rate", _feedRate); - handler.item("seek_rate", _seekRate); + handler.item("feed_mm_per_min", _feedRate); + handler.item("seek_mm_per_min", _seekRate); handler.item("debounce_ms", _debounce_ms); handler.item("seek_scaler", _seek_scaler); handler.item("feed_scaler", _feed_scaler); diff --git a/FluidNC/src/Machine/MachineConfig.cpp b/FluidNC/src/Machine/MachineConfig.cpp index e58bd008b..91f63d249 100644 --- a/FluidNC/src/Machine/MachineConfig.cpp +++ b/FluidNC/src/Machine/MachineConfig.cpp @@ -45,8 +45,8 @@ namespace Machine { handler.section("user_outputs", _userOutputs); handler.item("software_debounce_ms", _softwareDebounceMs); // TODO: Consider putting these under a gcode: hierarchy level? Or motion control? - handler.item("arc_tolerance", _arcTolerance); - handler.item("junction_deviation", _junctionDeviation); + handler.item("arc_tolerance_mm", _arcTolerance); + handler.item("junction_deviation_mm", _junctionDeviation); handler.item("verbose_errors", _verboseErrors); handler.item("report_inches", _reportInches); handler.item("homing_init_lock", _homingInitLock); diff --git a/FluidNC/src/Machine/Macros.h b/FluidNC/src/Machine/Macros.h index 4ead11afe..e806b374a 100644 --- a/FluidNC/src/Machine/Macros.h +++ b/FluidNC/src/Machine/Macros.h @@ -56,8 +56,8 @@ namespace Machine { // TODO: We could validate the startup lines void group(Configuration::HandlerBase& handler) override { - handler.item("n0", _startup_line[0]); - handler.item("n1", _startup_line[1]); + handler.item("startup_line0", _startup_line[0]); + handler.item("startup_line1", _startup_line[1]); handler.item("macro0", _macro[0]); handler.item("macro1", _macro[1]); handler.item("macro2", _macro[2]); diff --git a/FluidNC/src/Machine/UserOutputs.cpp b/FluidNC/src/Machine/UserOutputs.cpp index 0c4842c33..e8b8d87a3 100644 --- a/FluidNC/src/Machine/UserOutputs.cpp +++ b/FluidNC/src/Machine/UserOutputs.cpp @@ -38,10 +38,10 @@ namespace Machine { handler.item("analog1_pin", _analogOutput[1]); handler.item("analog2_pin", _analogOutput[2]); handler.item("analog3_pin", _analogOutput[3]); - handler.item("analog0_freq_hz", _analogFrequency[0]); - handler.item("analog1_freq_hz", _analogFrequency[1]); - handler.item("analog2_freq_hz", _analogFrequency[2]); - handler.item("analog3_freq_hz", _analogFrequency[3]); + handler.item("analog0_hz", _analogFrequency[0]); + handler.item("analog1_hz", _analogFrequency[1]); + handler.item("analog2_hz", _analogFrequency[2]); + handler.item("analog3_hz", _analogFrequency[3]); handler.item("digital0_pin", _digitalOutput[0]); handler.item("digital1_pin", _digitalOutput[1]); handler.item("digital2_pin", _digitalOutput[2]); diff --git a/FluidNC/src/Motors/RcServo.h b/FluidNC/src/Motors/RcServo.h index 9a411ca61..ea03972dd 100644 --- a/FluidNC/src/Motors/RcServo.h +++ b/FluidNC/src/Motors/RcServo.h @@ -45,7 +45,7 @@ namespace MotorDrivers { // Configuration handlers: void group(Configuration::HandlerBase& handler) override { handler.item("output_pin", _output_pin); - handler.item("pwm_freq_hz", _pwm_freq); + handler.item("pwm_hz", _pwm_freq); handler.item("min_pulse_us", _min_pulse_us); handler.item("max_pulse_us", _max_pulse_us); } diff --git a/FluidNC/src/Motors/TrinamicBase.h b/FluidNC/src/Motors/TrinamicBase.h index 75be208ce..4932b3f2a 100644 --- a/FluidNC/src/Motors/TrinamicBase.h +++ b/FluidNC/src/Motors/TrinamicBase.h @@ -68,7 +68,7 @@ namespace MotorDrivers { handler.item("hold_amps", _hold_current); handler.item("microsteps", _microsteps); handler.item("stallguard", _stallguard); - handler.item("stallguardDebugMode", _stallguardDebugMode); + handler.item("stallguard_debug", _stallguardDebugMode); handler.item("toff_disable", _toff_disable); handler.item("toff_stealthchop", _toff_stealthchop); handler.item("toff_coolstep", _toff_coolstep); diff --git a/FluidNC/src/Spindles/Laser.h b/FluidNC/src/Spindles/Laser.h index c31210237..360e32e4d 100644 --- a/FluidNC/src/Spindles/Laser.h +++ b/FluidNC/src/Spindles/Laser.h @@ -35,7 +35,7 @@ namespace Spindles { // pwm_freq is the only item that the PWM class adds to OnOff // We cannot call PWM::group() because that would pick up // direction_pin, which we do not want in Laser - handler.item("pwm_freq_hz", _pwm_freq); + handler.item("pwm_hz", _pwm_freq); OnOff::groupCommon(handler); } diff --git a/FluidNC/src/Spindles/OnOffSpindle.h b/FluidNC/src/Spindles/OnOffSpindle.h index 8e3a86f33..232a52110 100644 --- a/FluidNC/src/Spindles/OnOffSpindle.h +++ b/FluidNC/src/Spindles/OnOffSpindle.h @@ -21,8 +21,8 @@ namespace Spindles { void groupCommon(Configuration::HandlerBase& handler) { handler.item("output_pin", _output_pin); handler.item("enable_pin", _enable_pin); - handler.item("disable_with_zero_speed", _disable_with_zero_speed); - handler.item("zero_speed_with_disable", _zero_speed_with_disable); + handler.item("disable_with_s0", _disable_with_zero_speed); + handler.item("s0_with_disable", _zero_speed_with_disable); Spindle::group(handler); } diff --git a/FluidNC/src/Spindles/Spindle.h b/FluidNC/src/Spindles/Spindle.h index ff05d7d67..eede1a3d0 100644 --- a/FluidNC/src/Spindles/Spindle.h +++ b/FluidNC/src/Spindles/Spindle.h @@ -80,8 +80,8 @@ namespace Spindles { handler.item("spinup_ms", _spinup_ms); handler.item("spindown_ms", _spindown_ms); } - handler.item("tool", _tool); - handler.item("speeds", _speeds); + handler.item("tool_num", _tool); + handler.item("speed_map", _speeds); } diff --git a/FluidNC/test/Configuration/YamlTreeBuilder.cpp b/FluidNC/test/Configuration/YamlTreeBuilder.cpp index 3c291af3f..189d70b85 100644 --- a/FluidNC/test/Configuration/YamlTreeBuilder.cpp +++ b/FluidNC/test/Configuration/YamlTreeBuilder.cpp @@ -137,7 +137,7 @@ namespace Configuration { } Test(YamlTreeBuilder, Hierarchical1) { - const char* config = "n1:\n" + const char* config = "startup_line1:\n" " a: aap\n" " b: banaan\n" " \n" @@ -169,7 +169,7 @@ namespace Configuration { const char* config = "n2:\n" " banaan: 2\n" " aap: aap\n" - "n1:\n" + "startup_line1:\n" " a: aap\n" " b: banaan\n" " \n" @@ -199,7 +199,7 @@ namespace Configuration { "n2:\n" " banaan: 2\n" " aap: aap\n" - "n1:\n" + "startup_line1:\n" " a: aap\n" " b: banaan\n" " \n" diff --git a/example_configs/3axis_v4.yaml b/example_configs/3axis_v4.yaml index 8dd6c11e8..d859a2f5c 100644 --- a/example_configs/3axis_v4.yaml +++ b/example_configs/3axis_v4.yaml @@ -13,12 +13,12 @@ axes: x: steps_per_mm: 800 - max_rate: 2000 - acceleration: 25 - max_travel: 1000 + max_rate_mm_per_min: 2000 + acceleration_mm_per_sec2: 25 + max_travel_mm: 1000 homing: cycle: 2 - mpos: 10 + mpos_mm: 10 positive_direction: false motor0: @@ -31,12 +31,12 @@ axes: y: steps_per_mm: 800 - max_rate: 2000 - acceleration: 25 - max_travel: 1000 + max_rate_mm_per_min: 2000 + acceleration_mm_per_sec2: 25 + max_travel_mm: 1000 homing: cycle: 2 - mpos: 10 + mpos_mm: 10 positive_direction: false motor0: @@ -49,12 +49,12 @@ axes: z: steps_per_mm: 800 - max_rate: 2000 - acceleration: 25 - max_travel: 1000 + max_rate_mm_per_min: 2000 + acceleration_mm_per_sec2: 25 + max_travel_mm: 1000 homing: cycle: 1 - mpos: 10 + mpos_mm: 10 positive_direction: true motor0: @@ -83,13 +83,13 @@ probe: pin: gpio.32:low:pu PWM: - pwm_freq_hz: 5000 + pwm_hz: 5000 output_pin: gpio.2 enable_pin: gpio.22 direction_pin: NO_PIN - disable_with_zero_speed: false - zero_speed_with_disable: true + disable_with_s0: false + s0_with_disable: true spinup_ms: 0 spindown_ms: 0 - tool: 0 - speeds: 0=0% 10000=100% + tool_num: 0 + speed_map: 0=0% 10000=100% diff --git a/example_configs/6_pack_TMC2130.yaml b/example_configs/6_pack_TMC2130.yaml index 78f22966d..406e47c78 100644 --- a/example_configs/6_pack_TMC2130.yaml +++ b/example_configs/6_pack_TMC2130.yaml @@ -11,16 +11,16 @@ axes: shared_stepper_disable_pin: NO_PIN x: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -38,7 +38,7 @@ axes: hold_current: 0.750 microsteps: 16 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -51,16 +51,16 @@ axes: y: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: true - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -78,7 +78,7 @@ axes: hold_current: 0.750 microsteps: 16 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -91,16 +91,16 @@ axes: z: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 1 positive_direction: true - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 800.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 800.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -118,7 +118,7 @@ axes: hold_current: 0.750 microsteps: 16 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -163,8 +163,8 @@ probe: check_mode_start: true macros: - n0: - n1: + startup_line0: + startup_line1: macro0: macro1: macro2: @@ -175,10 +175,10 @@ user_outputs: analog1_pin: NO_PIN analog2_pin: NO_PIN analog3_pin: NO_PIN - analog0_freq_hz: 5000 - analog1_freq_hz: 5000 - analog2_freq_hz: 5000 - analog3_freq_hz: 5000 + analog0_hz: 5000 + analog1_hz: 5000 + analog2_hz: 5000 + analog3_hz: 5000 digital0_pin: NO_PIN digital1_pin: NO_PIN digital2_pin: NO_PIN @@ -186,8 +186,8 @@ user_outputs: software_debounce_ms: 0 laser_mode: false -arc_tolerance: 0.002 -junction_deviation: 0.010 +arc_tolerance_mm: 0.002 +junction_deviation_mm: 0.010 verbose_errors: false report_inches: false homing_init_lock: false @@ -196,13 +196,13 @@ deactivate_parking_upon_init: false check_limits_at_init: false use_line_numbers: false PWM: - pwm_freq_hz: 5000 + pwm_hz: 5000 output_pin: gpio.26 enable_pin: gpio.4 direction_pin: NO_PIN - disable_with_zero_speed: false - zero_speed_with_disable: true + disable_with_s0: false + s0_with_disable: true spinup_ms: 1000 spindown_ms: 1000 - tool: 0 - speeds: 0=0.000% 1000=100.000% + tool_num: 0 + speed_map: 0=0.000% 1000=100.000% diff --git a/example_configs/6_pack_TMC5160.yaml b/example_configs/6_pack_TMC5160.yaml index 58cde1d1d..ede6687e2 100644 --- a/example_configs/6_pack_TMC5160.yaml +++ b/example_configs/6_pack_TMC5160.yaml @@ -11,16 +11,16 @@ axes: shared_stepper_disable_pin: NO_PIN x: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -38,7 +38,7 @@ axes: hold_current: 0.50 microsteps: 16 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -51,16 +51,16 @@ axes: y: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: true - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -78,7 +78,7 @@ axes: hold_current: 0.50 microsteps: 16 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -91,16 +91,16 @@ axes: z: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 1 positive_direction: true - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 800.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 800.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -118,7 +118,7 @@ axes: hold_current: 0.50 microsteps: 16 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -163,8 +163,8 @@ probe: check_mode_start: true macros: - n0: - n1: + startup_line0: + startup_line1: macro0: macro1: macro2: @@ -175,10 +175,10 @@ user_outputs: analog1_pin: NO_PIN analog2_pin: NO_PIN analog3_pin: NO_PIN - analog0_freq_hz: 5000 - analog1_freq_hz: 5000 - analog2_freq_hz: 5000 - analog3_freq_hz: 5000 + analog0_hz: 5000 + analog1_hz: 5000 + analog2_hz: 5000 + analog3_hz: 5000 digital0_pin: NO_PIN digital1_pin: NO_PIN digital2_pin: NO_PIN @@ -186,8 +186,8 @@ user_outputs: software_debounce_ms: 0 laser_mode: false -arc_tolerance: 0.002 -junction_deviation: 0.010 +arc_tolerance_mm: 0.002 +junction_deviation_mm: 0.010 verbose_errors: false report_inches: false homing_init_lock: false @@ -196,13 +196,13 @@ deactivate_parking_upon_init: false check_limits_at_init: false use_line_numbers: false PWM: - pwm_freq_hz: 5000 + pwm_hz: 5000 output_pin: gpio.26 enable_pin: gpio.4 direction_pin: NO_PIN - disable_with_zero_speed: false - zero_speed_with_disable: true + disable_with_s0: false + s0_with_disable: true spinup_ms: 1000 spindown_ms: 1000 - tool: 0 - speeds: 0=0.000% 1000=100.000% + tool_num: 0 + speed_map: 0=0.000% 1000=100.000% diff --git a/example_configs/6_pack_external_huanyang.yaml b/example_configs/6_pack_external_huanyang.yaml index 098eb4301..cce1adb43 100644 --- a/example_configs/6_pack_external_huanyang.yaml +++ b/example_configs/6_pack_external_huanyang.yaml @@ -11,16 +11,16 @@ axes: shared_stepper_disable_pin: NO_PIN x: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -38,16 +38,16 @@ axes: y: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: true - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -65,16 +65,16 @@ axes: z: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 1 positive_direction: true - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 800.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 800.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -124,8 +124,8 @@ probe: check_mode_start: true macros: - n0: - n1: + startup_line0: + startup_line1: macro0: macro1: macro2: @@ -136,10 +136,10 @@ user_outputs: analog1_pin: NO_PIN analog2_pin: NO_PIN analog3_pin: NO_PIN - analog0_freq_hz: 5000 - analog1_freq_hz: 5000 - analog2_freq_hz: 5000 - analog3_freq_hz: 5000 + analog0_hz: 5000 + analog1_hz: 5000 + analog2_hz: 5000 + analog3_hz: 5000 digital0_pin: NO_PIN digital1_pin: NO_PIN digital2_pin: NO_PIN @@ -147,8 +147,8 @@ user_outputs: software_debounce_ms: 0 laser_mode: false -arc_tolerance: 0.002 -junction_deviation: 0.010 +arc_tolerance_mm: 0.002 +junction_deviation_mm: 0.010 verbose_errors: false report_inches: false homing_init_lock: false @@ -168,5 +168,5 @@ Huanyang: modbus_id: 1 spinup_ms: 0 spindown_ms: 0 - tool: 0 - speeds: 0=0% 0=25% 6000=25% 24000=100% + tool_num: 0 + speed_map: 0=0% 0=25% 6000=25% 24000=100% diff --git a/example_configs/TMC2130_SPI_Daisy.yaml b/example_configs/TMC2130_SPI_Daisy.yaml index a005ad162..d065a30e1 100644 --- a/example_configs/TMC2130_SPI_Daisy.yaml +++ b/example_configs/TMC2130_SPI_Daisy.yaml @@ -11,16 +11,16 @@ axes: shared_stepper_disable_pin: NO_PIN x: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -39,7 +39,7 @@ axes: hold_current: 0.750 microsteps: 16 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -52,16 +52,16 @@ axes: y: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -79,7 +79,7 @@ axes: hold_current: 0.750 microsteps: 16 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -92,16 +92,16 @@ axes: z: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -119,7 +119,7 @@ axes: hold_current: 0.750 microsteps: 16 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -132,16 +132,16 @@ axes: a: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -159,7 +159,7 @@ axes: hold_current: 0.750 microsteps: 16 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -199,8 +199,8 @@ probe: check_mode_start: true macros: - n0: - n1: + startup_line0: + startup_line1: macro0: macro1: macro2: @@ -211,10 +211,10 @@ user_outputs: analog1: NO_PIN analog2: NO_PIN analog3: NO_PIN - analog0_freq_hz: 5000 - analog1_freq_hz: 5000 - analog2_freq_hz: 5000 - analog3_freq_hz: 5000 + analog0_hz: 5000 + analog1_hz: 5000 + analog2_hz: 5000 + analog3_hz: 5000 digital0: NO_PIN digital1: NO_PIN digital2: NO_PIN @@ -222,8 +222,8 @@ user_outputs: software_debounce_ms: 0 laser_mode: false -arc_tolerance: 0.002 -junction_deviation: 0.010 +arc_tolerance_mm: 0.002 +junction_deviation_mm: 0.010 verbose_errors: false report_inches: false homing_init_lock: false diff --git a/example_configs/TMC2130_pen.yaml b/example_configs/TMC2130_pen.yaml index a895d4793..9f75493b0 100644 --- a/example_configs/TMC2130_pen.yaml +++ b/example_configs/TMC2130_pen.yaml @@ -13,16 +13,16 @@ axes: x: steps_per_mm: 800 - max_rate: 2000 - acceleration: 25 - max_travel: 1000 + max_rate_mm_per_min: 2000 + acceleration_mm_per_sec2: 25 + max_travel_mm: 1000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -38,7 +38,7 @@ axes: hold_current: 0.250 microsteps: 32 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -50,16 +50,16 @@ axes: y: steps_per_mm: 800 - max_rate: 2000 - acceleration: 25 - max_travel: 1000 + max_rate_mm_per_min: 2000 + acceleration_mm_per_sec2: 25 + max_travel_mm: 1000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -75,7 +75,7 @@ axes: hold_current: 0.250 microsteps: 32 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -87,23 +87,23 @@ axes: z: steps_per_mm: 400 - max_rate: 1000 - acceleration: 50 - max_travel: 5.00 + max_rate_mm_per_min: 1000 + acceleration_mm_per_sec2: 50 + max_travel_mm: 5.00 soft_limits: false homing: cycle: 1 positive_direction: true - mpos: 5 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 5 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 motor0: rc_servo: - pwm_freq_hz: 50 + pwm_hz: 50 output_pin: gpio.27 min_pulse_us: 2100 max_pulse_us: 1000 diff --git a/example_configs/TMC2209.yaml b/example_configs/TMC2209.yaml index 51de5abd8..ab1959f0e 100644 --- a/example_configs/TMC2209.yaml +++ b/example_configs/TMC2209.yaml @@ -11,16 +11,16 @@ axes: shared_stepper_disable_pin: gpio.25 x: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -37,16 +37,16 @@ axes: y: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: true - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -63,16 +63,16 @@ axes: z: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 1 positive_direction: true - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 800.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 800.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -89,16 +89,16 @@ axes: a: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 1 positive_direction: true - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 800.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 800.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -142,8 +142,8 @@ probe: check_mode_start: true macros: - n0: - n1: + startup_line0: + startup_line1: macro0: macro1: macro2: @@ -154,10 +154,10 @@ user_outputs: analog1: NO_PIN analog2: NO_PIN analog3: NO_PIN - analog0_freq_hz: 5000 - analog1_freq_hz: 5000 - analog2_freq_hz: 5000 - analog3_freq_hz: 5000 + analog0_hz: 5000 + analog1_hz: 5000 + analog2_hz: 5000 + analog3_hz: 5000 digital0: NO_PIN digital1: NO_PIN digital2: NO_PIN @@ -165,8 +165,8 @@ user_outputs: software_debounce_ms: 0 laser_mode: false -arc_tolerance: 0.002 -junction_deviation: 0.010 +arc_tolerance_mm: 0.002 +junction_deviation_mm: 0.010 verbose_errors: false report_inches: false homing_init_lock: false @@ -175,13 +175,13 @@ deactivate_parking_upon_init: false check_limits_at_init: false use_line_numbers: false PWM: - pwm_freq_hz: 5000 + pwm_hz: 5000 output_pin: gpio.4 enable_pin: gpio.13 direction_pin: gpio.17 - disable_with_zero_speed: false - zero_speed_with_disable: true + disable_with_s0: false + s0_with_disable: true spinup_ms: 1000 spindown_ms: 1000 - tool: 0 - speeds: 0=0.000% 1000=100.000% + tool_num: 0 + speed_map: 0=0.000% 1000=100.000% diff --git a/example_configs/TMC2209_pen.yaml b/example_configs/TMC2209_pen.yaml index 2530037fa..d922ff2dc 100644 --- a/example_configs/TMC2209_pen.yaml +++ b/example_configs/TMC2209_pen.yaml @@ -11,16 +11,16 @@ axes: shared_stepper_disable_pin: gpio.13 x: steps_per_mm: 80.000 - max_rate: 30000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 30000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 1 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -46,7 +46,7 @@ axes: hold_amps: 0.500 microsteps: 4 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -67,16 +67,16 @@ axes: y: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -102,7 +102,7 @@ axes: hold_amps: 0.500 microsteps: 16 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -123,9 +123,9 @@ axes: z: steps_per_mm: 320.000 - max_rate: 1000.000 - acceleration: 25.000 - max_travel: 200.000 + max_rate_mm_per_min: 1000.000 + acceleration_mm_per_sec2: 25.000 + max_travel_mm: 200.000 soft_limits: false spi: @@ -157,8 +157,8 @@ probe: check_mode_start: true macros: - n0: - n1: + startup_line0: + startup_line1: macro0: macro1: macro2: @@ -169,18 +169,18 @@ user_outputs: analog1_pin: NO_PIN analog2_pin: NO_PIN analog3_pin: NO_PIN - analog0_freq_hz: 5000 - analog1_freq_hz: 5000 - analog2_freq_hz: 5000 - analog3_freq_hz: 5000 + analog0_hz: 5000 + analog1_hz: 5000 + analog2_hz: 5000 + analog3_hz: 5000 digital0_pin: NO_PIN digital1_pin: NO_PIN digital2_pin: NO_PIN digital3_pin: NO_PIN software_debounce_ms: 0 -arc_tolerance: 0.002 -junction_deviation: 0.010 +arc_tolerance_mm: 0.002 +junction_deviation_mm: 0.010 verbose_errors: false report_inches: false homing_init_lock: true @@ -189,10 +189,10 @@ deactivate_parking_upon_init: false check_limits_at_init: true use_line_numbers: false Laser: - pwm_freq_hz: 5000 + pwm_hz: 5000 output_pin: gpio.27 enable_pin: gpio.17 - disable_with_zero_speed: false - zero_speed_with_disable: true - tool: 100 - speeds: 0=0.000% 255=100.000% \ No newline at end of file + disable_with_s0: false + s0_with_disable: true + tool_num: 100 + speed_map: 0=0.000% 255=100.000% \ No newline at end of file diff --git a/example_configs/test_drive_SD.yaml b/example_configs/test_drive_SD.yaml index 1b7baa42f..e94e50cf6 100644 --- a/example_configs/test_drive_SD.yaml +++ b/example_configs/test_drive_SD.yaml @@ -11,23 +11,23 @@ axes: shared_stepper_disable_pin: NO_PIN x: steps_per_mm: 320.000 - max_rate: 1000.000 - acceleration: 25.000 - max_travel: 200.000 + max_rate_mm_per_min: 1000.000 + acceleration_mm_per_sec2: 25.000 + max_travel_mm: 200.000 soft_limits: false y: steps_per_mm: 320.000 - max_rate: 1000.000 - acceleration: 25.000 - max_travel: 200.000 + max_rate_mm_per_min: 1000.000 + acceleration_mm_per_sec2: 25.000 + max_travel_mm: 200.000 soft_limits: false z: steps_per_mm: 320.000 - max_rate: 1000.000 - acceleration: 25.000 - max_travel: 200.000 + max_rate_mm_per_min: 1000.000 + acceleration_mm_per_sec2: 25.000 + max_travel_mm: 200.000 soft_limits: false spi: @@ -55,8 +55,8 @@ probe: check_mode_start: true macros: - n0: - n1: + startup_line0: + startup_line1: macro0: macro1: macro2: @@ -67,10 +67,10 @@ user_outputs: analog1: NO_PIN analog2: NO_PIN analog3: NO_PIN - analog0_freq_hz: 5000 - analog1_freq_hz: 5000 - analog2_freq_hz: 5000 - analog3_freq_hz: 5000 + analog0_hz: 5000 + analog1_hz: 5000 + analog2_hz: 5000 + analog3_hz: 5000 digital0: NO_PIN digital1: NO_PIN digital2: NO_PIN @@ -82,8 +82,8 @@ sdcard: software_debounce_ms: 0 laser_mode: false -arc_tolerance: 0.002 -junction_deviation: 0.010 +arc_tolerance_mm: 0.002 +junction_deviation_mm: 0.010 verbose_errors: false report_inches: false homing_init_lock: true diff --git a/example_configs/tmc2209_10V.yaml b/example_configs/tmc2209_10V.yaml index 22f29d199..07eadd897 100644 --- a/example_configs/tmc2209_10V.yaml +++ b/example_configs/tmc2209_10V.yaml @@ -15,15 +15,15 @@ axes: x: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 1 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -42,7 +42,7 @@ axes: hold_current: 0.500 microsteps: 32 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -58,16 +58,16 @@ axes: y: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -87,16 +87,16 @@ axes: z: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -116,16 +116,16 @@ axes: a: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -160,5 +160,5 @@ probe: reverse_pin: gpio.17 spinup_ms: 0 spindown_ms: 0 - tool: 0 - speeds: 0=0% 1000=0% 24000=100% + tool_num: 0 + speed_map: 0=0% 1000=0% 24000=100% diff --git a/example_configs/tmc2209_BESC.yaml b/example_configs/tmc2209_BESC.yaml index a15a6cc80..915d432d1 100644 --- a/example_configs/tmc2209_BESC.yaml +++ b/example_configs/tmc2209_BESC.yaml @@ -15,15 +15,15 @@ axes: x: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 1 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -42,7 +42,7 @@ axes: hold_current: 0.500 microsteps: 32 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -58,16 +58,16 @@ axes: y: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -87,16 +87,16 @@ axes: z: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -116,16 +116,16 @@ axes: a: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -155,16 +155,16 @@ probe: pin: NO_PIN besc: - pwm_freq_hz: 50 + pwm_hz: 50 output_pin: gpio.4 enable_pin: NO_PIN direction_pin: NO_PIN - disable_with_zero_speed: false - zero_speed_with_disable: true + disable_with_s0: false + s0_with_disable: true spinup_ms: 0 spindown_ms: 0 - tool: 100 - speeds: 0=0.000% 0=20.000% 4000=20.000% 20000=100.000% + tool_num: 100 + speed_map: 0=0.000% 0=20.000% 4000=20.000% 20000=100.000% min_pulse_us: 900 max_pulse_us: 2200 \ No newline at end of file diff --git a/example_configs/tmc2209_huanyang.yml b/example_configs/tmc2209_huanyang.yml index f2205de06..294b4b4cd 100644 --- a/example_configs/tmc2209_huanyang.yml +++ b/example_configs/tmc2209_huanyang.yml @@ -15,15 +15,15 @@ axes: x: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 1 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -42,7 +42,7 @@ axes: hold_current: 0.500 microsteps: 32 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -58,16 +58,16 @@ axes: y: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -86,16 +86,16 @@ axes: z: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -115,16 +115,16 @@ axes: a: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -164,5 +164,5 @@ Huanyang: modbus_id: 1 spinup_ms: 0 spindown_ms: 0 - tool: 0 - speeds: 0=0% 1000=0% 24000=100% + tool_num: 0 + speed_map: 0=0% 1000=0% 24000=100% diff --git a/example_configs/tmc2209_laser.yaml b/example_configs/tmc2209_laser.yaml index be031fec0..09fd794b5 100644 --- a/example_configs/tmc2209_laser.yaml +++ b/example_configs/tmc2209_laser.yaml @@ -15,16 +15,16 @@ axes: x: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 1 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -50,7 +50,7 @@ axes: hold_current: 0.500 microsteps: 8 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -71,16 +71,16 @@ axes: y: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -98,7 +98,7 @@ axes: hold_current: 0.500 microsteps: 8 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -119,16 +119,16 @@ axes: z: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -146,7 +146,7 @@ axes: hold_current: 0.500 microsteps: 8 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -167,16 +167,16 @@ axes: a: steps_per_mm: 800.000 - max_rate: 5000.000 - acceleration: 100.000 - max_travel: 300.000 + max_rate_mm_per_min: 5000.000 + acceleration_mm_per_sec2: 100.000 + max_travel_mm: 300.000 soft_limits: false homing: cycle: 2 positive_direction: false - mpos: 150.000 - feed_rate: 100.000 - seek_rate: 200.000 + mpos_mm: 150.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 seek_scaler: 1.100 feed_scaler: 1.100 @@ -194,7 +194,7 @@ axes: hold_current: 0.500 microsteps: 8 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -229,11 +229,11 @@ probe: homing_init_lock: false Laser: - pwm_freq_hz: 5000 + pwm_hz: 5000 output_pin: gpio.4 enable_pin: gpio.12 - disable_with_zero_speed: false - zero_speed_with_disable: true - tool: 100 - speeds: 0=0.000% 255=100.000% + disable_with_s0: false + s0_with_disable: true + tool_num: 100 + speed_map: 0=0.000% 255=100.000% \ No newline at end of file diff --git a/example_configs/tmc2209_relay.yaml b/example_configs/tmc2209_relay.yaml index 65e4685b3..77f10e445 100644 --- a/example_configs/tmc2209_relay.yaml +++ b/example_configs/tmc2209_relay.yaml @@ -15,15 +15,15 @@ axes: x: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 1 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -42,7 +42,7 @@ axes: hold_current: 0.500 microsteps: 32 stallguard: 0 - stallguardDebugMode: false + stallguard_debug: false toff_disable: 0 toff_stealthchop: 5 toff_coolstep: 3 @@ -58,16 +58,16 @@ axes: y: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -87,16 +87,16 @@ axes: z: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: @@ -116,16 +116,16 @@ axes: a: steps_per_mm: 800 - max_rate: 5000 - acceleration: 100 - max_travel: 300 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 homing: cycle: 2 - mpos: 150 + mpos_mm: 150 positive_direction: false - feed_rate: 100.000 - seek_rate: 200.000 + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 debounce_ms: 500 motor0: From a630bd3fd50aac9c817ac5b8be6c092591c8b2c8 Mon Sep 17 00:00:00 2001 From: MitchBradley Date: Mon, 4 Oct 2021 14:38:53 -1000 Subject: [PATCH 13/20] Executable permissions on installer scripts --- build-release.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build-release.py b/build-release.py index ab39e86dd..67b65a452 100644 --- a/build-release.py +++ b/build-release.py @@ -10,7 +10,7 @@ # see the details of an errored build, include -v on the command line. from shutil import copy -from zipfile import ZipFile +from zipfile import ZipFile, ZipInfo import subprocess, os, sys import urllib.request @@ -98,7 +98,13 @@ def buildFs(pioEnv, verbose=True, extraArgs=None): for obj in ['firmware.bin','partitions.bin']: zipObj.write(os.path.join(objPath, obj), os.path.join(envName, obj)) for obj in ['install-win.bat','install-linux.sh','install-macos.sh']: - zipObj.write(os.path.join(sharedPath, obj), os.path.join(envName, obj)) + sourceFileName = os.path.join(sharedPath, obj) + destFileName = os.path.join(envName, obj) + with open(sourceFileName, 'r') as f: + bytes = f.read() + info = ZipInfo.from_file(sourceFileName, destFileName) + info.external_attr = 0o100755 << 16 + zipObj.writestr(info, bytes) EsptoolVersion = 'v3.1' EspRepo = 'https://github.com/espressif/esptool/releases/download/' + EsptoolVersion + '/' From 819e8eb0d8fac1a2d01f1bb31a3655136247cd16 Mon Sep 17 00:00:00 2001 From: Bart Dring Date: Tue, 5 Oct 2021 08:58:03 -0500 Subject: [PATCH 14/20] WIP Switch debounce rename --- FluidNC/src/Machine/MachineConfig.cpp | 2 +- example_configs/6_pack_TMC2130.yaml | 2 +- example_configs/6_pack_TMC5160.yaml | 2 +- example_configs/6_pack_external_huanyang.yaml | 2 +- example_configs/TMC2130_SPI_Daisy.yaml | 2 +- example_configs/TMC2209.yaml | 2 +- example_configs/TMC2209_pen.yaml | 2 +- example_configs/test_drive_SD.yaml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/FluidNC/src/Machine/MachineConfig.cpp b/FluidNC/src/Machine/MachineConfig.cpp index 91f63d249..83e4dfd84 100644 --- a/FluidNC/src/Machine/MachineConfig.cpp +++ b/FluidNC/src/Machine/MachineConfig.cpp @@ -43,7 +43,7 @@ namespace Machine { handler.section("macros", _macros); handler.section("user_outputs", _userOutputs); - handler.item("software_debounce_ms", _softwareDebounceMs); + handler.item("switch_debounce_ms", _softwareDebounceMs); // TODO: Consider putting these under a gcode: hierarchy level? Or motion control? handler.item("arc_tolerance_mm", _arcTolerance); handler.item("junction_deviation_mm", _junctionDeviation); diff --git a/example_configs/6_pack_TMC2130.yaml b/example_configs/6_pack_TMC2130.yaml index 406e47c78..f75e44fb3 100644 --- a/example_configs/6_pack_TMC2130.yaml +++ b/example_configs/6_pack_TMC2130.yaml @@ -184,7 +184,7 @@ user_outputs: digital2_pin: NO_PIN digital3_pin: NO_PIN -software_debounce_ms: 0 +switch_debounce_ms: 0 laser_mode: false arc_tolerance_mm: 0.002 junction_deviation_mm: 0.010 diff --git a/example_configs/6_pack_TMC5160.yaml b/example_configs/6_pack_TMC5160.yaml index ede6687e2..ff3b43df3 100644 --- a/example_configs/6_pack_TMC5160.yaml +++ b/example_configs/6_pack_TMC5160.yaml @@ -184,7 +184,7 @@ user_outputs: digital2_pin: NO_PIN digital3_pin: NO_PIN -software_debounce_ms: 0 +switch_debounce_ms: 0 laser_mode: false arc_tolerance_mm: 0.002 junction_deviation_mm: 0.010 diff --git a/example_configs/6_pack_external_huanyang.yaml b/example_configs/6_pack_external_huanyang.yaml index cce1adb43..62c3288f3 100644 --- a/example_configs/6_pack_external_huanyang.yaml +++ b/example_configs/6_pack_external_huanyang.yaml @@ -145,7 +145,7 @@ user_outputs: digital2_pin: NO_PIN digital3_pin: NO_PIN -software_debounce_ms: 0 +switch_debounce_ms: 0 laser_mode: false arc_tolerance_mm: 0.002 junction_deviation_mm: 0.010 diff --git a/example_configs/TMC2130_SPI_Daisy.yaml b/example_configs/TMC2130_SPI_Daisy.yaml index d065a30e1..c7724c744 100644 --- a/example_configs/TMC2130_SPI_Daisy.yaml +++ b/example_configs/TMC2130_SPI_Daisy.yaml @@ -220,7 +220,7 @@ user_outputs: digital2: NO_PIN digital3: NO_PIN -software_debounce_ms: 0 +switch_debounce_ms: 0 laser_mode: false arc_tolerance_mm: 0.002 junction_deviation_mm: 0.010 diff --git a/example_configs/TMC2209.yaml b/example_configs/TMC2209.yaml index ab1959f0e..0d4222dc9 100644 --- a/example_configs/TMC2209.yaml +++ b/example_configs/TMC2209.yaml @@ -163,7 +163,7 @@ user_outputs: digital2: NO_PIN digital3: NO_PIN -software_debounce_ms: 0 +switch_debounce_ms: 0 laser_mode: false arc_tolerance_mm: 0.002 junction_deviation_mm: 0.010 diff --git a/example_configs/TMC2209_pen.yaml b/example_configs/TMC2209_pen.yaml index d922ff2dc..478d92637 100644 --- a/example_configs/TMC2209_pen.yaml +++ b/example_configs/TMC2209_pen.yaml @@ -178,7 +178,7 @@ user_outputs: digital2_pin: NO_PIN digital3_pin: NO_PIN -software_debounce_ms: 0 +switch_debounce_ms: 0 arc_tolerance_mm: 0.002 junction_deviation_mm: 0.010 verbose_errors: false diff --git a/example_configs/test_drive_SD.yaml b/example_configs/test_drive_SD.yaml index e94e50cf6..2a5b2f1f8 100644 --- a/example_configs/test_drive_SD.yaml +++ b/example_configs/test_drive_SD.yaml @@ -80,7 +80,7 @@ sdcard: card_detect_pin: NO_PIN cs_pin: gpio.5 -software_debounce_ms: 0 +switch_debounce_ms: 0 laser_mode: false arc_tolerance_mm: 0.002 junction_deviation_mm: 0.010 From 851354b2866a6612a86b825dac5cff6567c38c8d Mon Sep 17 00:00:00 2001 From: MitchBradley Date: Tue, 5 Oct 2021 10:10:26 -1000 Subject: [PATCH 15/20] make esptool executable --- build-release.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build-release.py b/build-release.py index 67b65a452..6f95a6246 100644 --- a/build-release.py +++ b/build-release.py @@ -122,9 +122,11 @@ def buildFs(pioEnv, verbose=True, extraArgs=None): Binary = 'esptool.exe' else: Binary = 'esptool' - Path = EspDir + '/' + Binary + destFileName = EspDir + '/' + Binary with ZipFile(ZipFileName, 'r') as zipReader: - zipObj.writestr(os.path.join(platform, Binary), zipReader.read(Path)) + sourceFileName = Path + info = ZipInfo.from_file(sourceFileName, destFileName) + zipObj.writestr(sourceFileName, zipReader.read(Path)) sys.exit(numErrors) From c82c2b2ecf3e44305a7ebccaa7ec68c3d9bad97e Mon Sep 17 00:00:00 2001 From: MitchBradley Date: Tue, 5 Oct 2021 10:11:51 -1000 Subject: [PATCH 16/20] Make Esptool Executable Again --- build-release.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/build-release.py b/build-release.py index 6f95a6246..5c6778693 100644 --- a/build-release.py +++ b/build-release.py @@ -117,16 +117,14 @@ def buildFs(pioEnv, verbose=True, extraArgs=None): print('Downloading ' + EspRepo + ZipFileName) with urllib.request.urlopen(EspRepo + ZipFileName) as u: open(ZipFileName, 'wb').write(u.read()) - + Binary = 'esptool' if platform == 'win64': - Binary = 'esptool.exe' - else: - Binary = 'esptool' - destFileName = EspDir + '/' + Binary + Binary += '.exe' + sourceFileName = EspDir + '/' + Binary with ZipFile(ZipFileName, 'r') as zipReader: - sourceFileName = Path - info = ZipInfo.from_file(sourceFileName, destFileName) - zipObj.writestr(sourceFileName, zipReader.read(Path)) + destFileName = os.path.join(platform, Binary) + info = ZipInfo(destFileName) + info.external_attr = 0o100755 << 16 + zipObj.writestr(info, zipReader.read(sourceFileName)) sys.exit(numErrors) - From 0ea756d0ce88594e5ac20b010cf838bb570446cd Mon Sep 17 00:00:00 2001 From: MitchBradley Date: Tue, 5 Oct 2021 13:05:19 -1000 Subject: [PATCH 17/20] .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 51ee33eff..f2ff354f2 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ packages/ pio_machine.h project.checksum version.cpp +esptool*.zip \ No newline at end of file From 92596bd764763044ee4310d6a6c2cab0bd72c3dc Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Wed, 6 Oct 2021 08:41:39 -1000 Subject: [PATCH 18/20] Moved at_init items to start: section --- FluidNC/src/GCode.cpp | 8 +--- FluidNC/src/Limits.cpp | 8 +++- FluidNC/src/Machine/MachineConfig.cpp | 9 +++-- FluidNC/src/Machine/MachineConfig.h | 40 +++++++++++++------ FluidNC/src/Main.cpp | 2 +- FluidNC/src/Protocol.cpp | 2 +- example_configs/6_pack_TMC2130.yaml | 14 ++----- example_configs/6_pack_TMC5160.yaml | 14 ++----- example_configs/6_pack_external_huanyang.yaml | 14 +------ example_configs/TMC2130_SPI_Daisy.yaml | 14 +------ example_configs/TMC2209.yaml | 14 ++----- example_configs/TMC2209_pen.yaml | 15 ++----- example_configs/test_drive_SD.yaml | 11 ----- example_configs/tmc2209_10V.yaml | 2 - example_configs/tmc2209_BESC.yaml | 3 -- example_configs/tmc2209_laser.yaml | 6 +-- example_configs/tmc2209_relay.yaml | 2 - 17 files changed, 62 insertions(+), 116 deletions(-) diff --git a/FluidNC/src/GCode.cpp b/FluidNC/src/GCode.cpp index e1cbd76d1..457bd7b89 100644 --- a/FluidNC/src/GCode.cpp +++ b/FluidNC/src/GCode.cpp @@ -45,11 +45,7 @@ void gc_init() { // Load default G54 coordinate system. gc_state.modal.coord_select = CoordIndex::G54; - if (config->_deactivateParkingUponInit) { - gc_state.modal.override = Override::Disabled; - } else { - gc_state.modal.override = Override::ParkingMotion; - } + gc_state.modal.override = config->_start->_deactivateParking ? Override::Disabled : Override::ParkingMotion; coords[gc_state.modal.coord_select]->get(gc_state.coord_system); } @@ -1624,7 +1620,7 @@ Error gc_execute_line(char* line, Print& client) { gc_state.modal.spindle = SpindleState::Disable; gc_state.modal.coolant = {}; if (config->_enableParkingOverrideControl) { - if (config->_deactivateParkingUponInit) { + if (config->_start->_deactivateParking) { gc_state.modal.override = Override::Disabled; } else { gc_state.modal.override = Override::ParkingMotion; diff --git a/FluidNC/src/Limits.cpp b/FluidNC/src/Limits.cpp index b4845d21f..8d7f17747 100644 --- a/FluidNC/src/Limits.cpp +++ b/FluidNC/src/Limits.cpp @@ -17,6 +17,7 @@ xQueueHandle limit_sw_queue; // used by limit switch debouncing void limits_init() { +#ifdef LATER // We need to rethink debouncing if (Machine::Axes::limitMask) { if (limit_sw_queue == NULL && config->_softwareDebounceMs != 0) { // setup task used for debouncing @@ -31,6 +32,7 @@ void limits_init() { } } } +#endif } // Returns limit state as a bit-wise uint32 variable. Each bit indicates an axis limit, where @@ -73,6 +75,7 @@ void limits_soft_check(float* target) { } } +#ifdef LATER // We need to rethink debouncing void limitCheckTask(void* pvParameters) { while (true) { std::atomic_thread_fence(std::memory_order::memory_order_seq_cst); // read fence for settings @@ -87,11 +90,12 @@ void limitCheckTask(void* pvParameters) { rtAlarm = ExecAlarm::HardLimit; // Indicate hard limit critical event } static UBaseType_t uxHighWaterMark = 0; -#ifdef DEBUG_TASK_STACK +# ifdef DEBUG_TASK_STACK reportTaskStackSize(uxHighWaterMark); -#endif +# endif } } +#endif float limitsMaxPosition(size_t axis) { auto axisConfig = config->_axes->_axis[axis]; diff --git a/FluidNC/src/Machine/MachineConfig.cpp b/FluidNC/src/Machine/MachineConfig.cpp index 83e4dfd84..bd9a7c410 100644 --- a/FluidNC/src/Machine/MachineConfig.cpp +++ b/FluidNC/src/Machine/MachineConfig.cpp @@ -41,18 +41,15 @@ namespace Machine { handler.section("coolant", _coolant); handler.section("probe", _probe); handler.section("macros", _macros); + handler.section("start", _start); handler.section("user_outputs", _userOutputs); - handler.item("switch_debounce_ms", _softwareDebounceMs); // TODO: Consider putting these under a gcode: hierarchy level? Or motion control? handler.item("arc_tolerance_mm", _arcTolerance); handler.item("junction_deviation_mm", _junctionDeviation); handler.item("verbose_errors", _verboseErrors); handler.item("report_inches", _reportInches); - handler.item("homing_init_lock", _homingInitLock); handler.item("enable_parking_override_control", _enableParkingOverrideControl); - handler.item("deactivate_parking_upon_init", _deactivateParkingUponInit); - handler.item("check_limits_at_init", _checkLimitsAtInit); handler.item("use_line_numbers", _useLineNumbers); Spindles::SpindleFactory::factory(handler, _spindles); @@ -98,6 +95,10 @@ namespace Machine { _control = new Control(); } + if (_start == nullptr) { + _start = new Start(); + } + if (_spindles.size() == 0) { log_info("Spindle: using defaults (no spindle)"); _spindles.push_back(new Spindles::Null()); diff --git a/FluidNC/src/Machine/MachineConfig.h b/FluidNC/src/Machine/MachineConfig.h index 384f08924..b8260ac57 100644 --- a/FluidNC/src/Machine/MachineConfig.h +++ b/FluidNC/src/Machine/MachineConfig.h @@ -25,6 +25,29 @@ #include "Macros.h" namespace Machine { + class Start : public Configuration::Configurable { + public: + bool _mustHome = true; + bool _deactivateParking = false; + + // At power-up or a reset, the limit switches will be checked + // to ensure they are not already active. If so, and hard + // limits are enabled, Alarm state will be entered instead of + // Idle and the user will be told to check the limits. + bool _checkLimits = false; + + public: + Start() {} + + void group(Configuration::HandlerBase& handler) { + handler.item("must_home", _mustHome); + handler.item("deactivate_parking", _deactivateParking); + handler.item("check_limits", _checkLimits); + } + + ~Start() = default; + }; + class MachineConfig : public Configuration::Configurable { public: MachineConfig() = default; @@ -39,27 +62,20 @@ namespace Machine { UserOutputs* _userOutputs = nullptr; SDCard* _sdCard = nullptr; Macros* _macros = nullptr; + Start* _start = nullptr; Spindles::SpindleList _spindles; - float _arcTolerance = 0.002f; - float _junctionDeviation = 0.01f; - bool _verboseErrors = false; - bool _reportInches = false; - bool _homingInitLock = true; - int _softwareDebounceMs = 0; + float _arcTolerance = 0.002f; + float _junctionDeviation = 0.01f; + bool _verboseErrors = false; + bool _reportInches = false; // Enables a special set of M-code commands that enables and disables the parking motion. // These are controlled by `M56`, `M56 P1`, or `M56 Px` to enable and `M56 P0` to disable. // The command is modal and will be set after a planner sync. Since it is GCode, it is // executed in sync with GCode commands. It is not a real-time command. bool _enableParkingOverrideControl = false; - bool _deactivateParkingUponInit = false; - - // At power-up or a reset, the limit switches will be checked to ensure they are not active - // before initialization. If a problem is detected and hard limits are enabled, Alarm state - // will be entered instead of Idle, messaging the user to check the limits, rather than idle. - bool _checkLimitsAtInit = true; // Tracks and reports gcode line numbers. Disabled by default. bool _useLineNumbers = false; diff --git a/FluidNC/src/Main.cpp b/FluidNC/src/Main.cpp index d27b7ce26..e06981ee4 100644 --- a/FluidNC/src/Main.cpp +++ b/FluidNC/src/Main.cpp @@ -106,7 +106,7 @@ void setup() { // NOTE: The startup script will run after successful completion of the homing cycle, but // not after disabling the alarm locks. Prevents motion startup blocks from crashing into // things uncontrollably. Very bad. - if (config->_homingInitLock && Machine::Axes::homingMask) { + if (config->_start->_mustHome && Machine::Axes::homingMask) { // If there is an axis with homing configured, enter Alarm state on startup sys.state = State::Alarm; } diff --git a/FluidNC/src/Protocol.cpp b/FluidNC/src/Protocol.cpp index fa61e4a5f..44d54c6fc 100644 --- a/FluidNC/src/Protocol.cpp +++ b/FluidNC/src/Protocol.cpp @@ -121,7 +121,7 @@ void protocol_main_loop() { report_feedback_message(Message::ConfigAlarmLock); } else { // Perform some machine checks to make sure everything is good to go. - if (config->_checkLimitsAtInit && config->_axes->hasHardLimits()) { + if (config->_start->_checkLimits && config->_axes->hasHardLimits()) { if (limits_get_state()) { sys.state = State::Alarm; // Ensure alarm state is active. report_feedback_message(Message::CheckLimits); diff --git a/example_configs/6_pack_TMC2130.yaml b/example_configs/6_pack_TMC2130.yaml index f75e44fb3..c4aac2c6f 100644 --- a/example_configs/6_pack_TMC2130.yaml +++ b/example_configs/6_pack_TMC2130.yaml @@ -184,17 +184,9 @@ user_outputs: digital2_pin: NO_PIN digital3_pin: NO_PIN -switch_debounce_ms: 0 -laser_mode: false -arc_tolerance_mm: 0.002 -junction_deviation_mm: 0.010 -verbose_errors: false -report_inches: false -homing_init_lock: false -enable_parking_override_control: false -deactivate_parking_upon_init: false -check_limits_at_init: false -use_line_numbers: false +start: + must_home: false + PWM: pwm_hz: 5000 output_pin: gpio.26 diff --git a/example_configs/6_pack_TMC5160.yaml b/example_configs/6_pack_TMC5160.yaml index ff3b43df3..b82de6776 100644 --- a/example_configs/6_pack_TMC5160.yaml +++ b/example_configs/6_pack_TMC5160.yaml @@ -184,17 +184,9 @@ user_outputs: digital2_pin: NO_PIN digital3_pin: NO_PIN -switch_debounce_ms: 0 -laser_mode: false -arc_tolerance_mm: 0.002 -junction_deviation_mm: 0.010 -verbose_errors: false -report_inches: false -homing_init_lock: false -enable_parking_override_control: false -deactivate_parking_upon_init: false -check_limits_at_init: false -use_line_numbers: false +start: + must_home: false + PWM: pwm_hz: 5000 output_pin: gpio.26 diff --git a/example_configs/6_pack_external_huanyang.yaml b/example_configs/6_pack_external_huanyang.yaml index 62c3288f3..28a15ea5e 100644 --- a/example_configs/6_pack_external_huanyang.yaml +++ b/example_configs/6_pack_external_huanyang.yaml @@ -145,18 +145,8 @@ user_outputs: digital2_pin: NO_PIN digital3_pin: NO_PIN -switch_debounce_ms: 0 -laser_mode: false -arc_tolerance_mm: 0.002 -junction_deviation_mm: 0.010 -verbose_errors: false -report_inches: false -homing_init_lock: false -enable_parking_override_control: false -deactivate_parking_upon_init: false -check_limits_at_init: false -limits_two_switches_on_axis: false -use_line_numbers: false +start: + must_home: false Huanyang: uart: diff --git a/example_configs/TMC2130_SPI_Daisy.yaml b/example_configs/TMC2130_SPI_Daisy.yaml index c7724c744..5a97145ba 100644 --- a/example_configs/TMC2130_SPI_Daisy.yaml +++ b/example_configs/TMC2130_SPI_Daisy.yaml @@ -220,15 +220,5 @@ user_outputs: digital2: NO_PIN digital3: NO_PIN -switch_debounce_ms: 0 -laser_mode: false -arc_tolerance_mm: 0.002 -junction_deviation_mm: 0.010 -verbose_errors: false -report_inches: false -homing_init_lock: false -enable_parking_override_control: false -deactivate_parking_upon_init: false -check_limits_at_init: false -limits_two_switches_on_axis: false -use_line_numbers: false +start: + must_home: false diff --git a/example_configs/TMC2209.yaml b/example_configs/TMC2209.yaml index 0d4222dc9..18abb130e 100644 --- a/example_configs/TMC2209.yaml +++ b/example_configs/TMC2209.yaml @@ -163,17 +163,9 @@ user_outputs: digital2: NO_PIN digital3: NO_PIN -switch_debounce_ms: 0 -laser_mode: false -arc_tolerance_mm: 0.002 -junction_deviation_mm: 0.010 -verbose_errors: false -report_inches: false -homing_init_lock: false -enable_parking_override_control: false -deactivate_parking_upon_init: false -check_limits_at_init: false -use_line_numbers: false +start: + must_home: false + PWM: pwm_hz: 5000 output_pin: gpio.4 diff --git a/example_configs/TMC2209_pen.yaml b/example_configs/TMC2209_pen.yaml index 478d92637..ef49117a0 100644 --- a/example_configs/TMC2209_pen.yaml +++ b/example_configs/TMC2209_pen.yaml @@ -178,16 +178,9 @@ user_outputs: digital2_pin: NO_PIN digital3_pin: NO_PIN -switch_debounce_ms: 0 -arc_tolerance_mm: 0.002 -junction_deviation_mm: 0.010 -verbose_errors: false -report_inches: false -homing_init_lock: true -enable_parking_override_control: false -deactivate_parking_upon_init: false -check_limits_at_init: true -use_line_numbers: false +start: + check_limits: true + Laser: pwm_hz: 5000 output_pin: gpio.27 @@ -195,4 +188,4 @@ Laser: disable_with_s0: false s0_with_disable: true tool_num: 100 - speed_map: 0=0.000% 255=100.000% \ No newline at end of file + speed_map: 0=0.000% 255=100.000% diff --git a/example_configs/test_drive_SD.yaml b/example_configs/test_drive_SD.yaml index 2a5b2f1f8..469fb4ea5 100644 --- a/example_configs/test_drive_SD.yaml +++ b/example_configs/test_drive_SD.yaml @@ -80,15 +80,4 @@ sdcard: card_detect_pin: NO_PIN cs_pin: gpio.5 -switch_debounce_ms: 0 -laser_mode: false -arc_tolerance_mm: 0.002 -junction_deviation_mm: 0.010 -verbose_errors: false -report_inches: false -homing_init_lock: true -enable_parking_override_control: false -deactivate_parking_upon_init: false -check_limits_at_init: true -use_line_numbers: false NoSpindle: diff --git a/example_configs/tmc2209_10V.yaml b/example_configs/tmc2209_10V.yaml index 07eadd897..005f40649 100644 --- a/example_configs/tmc2209_10V.yaml +++ b/example_configs/tmc2209_10V.yaml @@ -8,8 +8,6 @@ stepping: pulse_us: 2 disable_delay_us: 0 -homing_init_lock: true - axes: shared_stepper_disable_pin: gpio.25:high diff --git a/example_configs/tmc2209_BESC.yaml b/example_configs/tmc2209_BESC.yaml index 915d432d1..1307c603b 100644 --- a/example_configs/tmc2209_BESC.yaml +++ b/example_configs/tmc2209_BESC.yaml @@ -8,8 +8,6 @@ stepping: pulse_us: 2 disable_delay_us: 0 -homing_init_lock: true - axes: shared_stepper_disable_pin: gpio.25:high @@ -167,4 +165,3 @@ besc: speed_map: 0=0.000% 0=20.000% 4000=20.000% 20000=100.000% min_pulse_us: 900 max_pulse_us: 2200 - \ No newline at end of file diff --git a/example_configs/tmc2209_laser.yaml b/example_configs/tmc2209_laser.yaml index 09fd794b5..1a430f63d 100644 --- a/example_configs/tmc2209_laser.yaml +++ b/example_configs/tmc2209_laser.yaml @@ -8,8 +8,6 @@ stepping: pulse_us: 2 disable_delay_us: 0 -homing_init_lock: true - axes: shared_stepper_disable_pin: gpio.25:high @@ -226,7 +224,8 @@ sdcard: probe: pin: NO_PIN -homing_init_lock: false +start: + must_home: false Laser: pwm_hz: 5000 @@ -236,4 +235,3 @@ Laser: s0_with_disable: true tool_num: 100 speed_map: 0=0.000% 255=100.000% - \ No newline at end of file diff --git a/example_configs/tmc2209_relay.yaml b/example_configs/tmc2209_relay.yaml index 77f10e445..dfddd4ec6 100644 --- a/example_configs/tmc2209_relay.yaml +++ b/example_configs/tmc2209_relay.yaml @@ -8,8 +8,6 @@ stepping: pulse_us: 2 disable_delay_us: 0 -homing_init_lock: true - axes: shared_stepper_disable_pin: gpio.25:high From 1a5604f18b7cd2265dac3f2c3338721a306421a8 Mon Sep 17 00:00:00 2001 From: bdring Date: Wed, 6 Oct 2021 14:12:20 -0500 Subject: [PATCH 19/20] Cleanup --- FluidNC/data/tmc2209_huanyang.yml | 168 ++++++++++++++++++ FluidNC/src/Machine/Homing.h | 2 +- FluidNC/src/Spindles/PWMSpindle.h | 2 +- example_configs/6_pack_TMC2130.yaml | 18 +- example_configs/6_pack_TMC5160.yaml | 18 +- example_configs/6_pack_external_huanyang.yaml | 8 +- example_configs/TMC2130_SPI_Daisy.yaml | 24 +-- example_configs/TMC2130_pen.yaml | 8 +- example_configs/TMC2209.yaml | 8 +- example_configs/TMC2209_pen.yaml | 8 +- example_configs/tmc2209_10V.yaml | 12 +- example_configs/tmc2209_BESC.yaml | 12 +- example_configs/tmc2209_huanyang.yml | 14 +- example_configs/tmc2209_laser.yaml | 32 ++-- example_configs/tmc2209_relay.yaml | 12 +- 15 files changed, 255 insertions(+), 91 deletions(-) create mode 100644 FluidNC/data/tmc2209_huanyang.yml diff --git a/FluidNC/data/tmc2209_huanyang.yml b/FluidNC/data/tmc2209_huanyang.yml new file mode 100644 index 000000000..ea77ab921 --- /dev/null +++ b/FluidNC/data/tmc2209_huanyang.yml @@ -0,0 +1,168 @@ +name: "TMC2209 XYZA PWM Spindle" +board: "TMC2209 4x" + +stepping: + engine: RMT + idle_ms: 250 + dir_delay_us: 1 + pulse_us: 2 + disable_delay_us: 0 + +homing_init_lock: true + +axes: + shared_stepper_disable_pin: gpio.25:high + + x: + steps_per_mm: 800 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 + homing: + cycle: 1 + mpos_mm: 150 + positive_direction: false + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 + debounce_ms: 500 + + motor0: + limit_pos_pin: gpio.35 + hard_limits: false + pulloff_mm:1.000 + tmc_2209: + uart: + txd_pin: gpio.22 + rxd_pin: gpio.21 + baud: 115200 + mode: 8N1 + addr: 0 + r_sense_ohms: 0.110 + run_amps: 0.500 + hold_amps: 0.500 + microsteps: 32 + stallguard: 0 + stallguard_debug: false + toff_disable: 0 + toff_stealthchop: 5 + toff_coolstep: 3 + run_mode: StealthChop + homing_mode: StealthChop + use_enable: false + step_pin: gpio.26 + direction_pin: gpio.27 + disable_pin: NO_PIN + + motor1: + null_motor: + + y: + steps_per_mm: 800 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 + + homing: + cycle: 2 + mpos_mm: 150 + positive_direction: false + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 + debounce_ms: 500 + + motor0: + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.34 + limit_all_pin: NO_PIN + hard_limits: false + pulloff_mm:1.00 + tmc_2209: + step_pin: gpio.33 + direction_pin: gpio.32 + addr: 1 + + motor1: + null_motor: + + z: + steps_per_mm: 800 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 + + homing: + cycle: 2 + mpos_mm: 150 + positive_direction: false + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 + debounce_ms: 500 + + motor0: + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.39 + limit_all_pin: NO_PIN + hard_limits: false + pulloff_mm:1.00 + tmc_2209: + step_pin: gpio.2 + direction_pin: gpio.14 + addr: 2 + + motor1: + null_motor: + + + a: + steps_per_mm: 800 + max_rate_mm_per_min: 5000 + acceleration_mm_per_sec2: 100 + max_travel_mm: 300 + + homing: + cycle: 2 + mpos_mm: 150 + positive_direction: false + feed_mm_per_min: 100.000 + seek_mm_per_min: 200.000 + debounce_ms: 500 + + motor0: + limit_neg_pin: NO_PIN + limit_pos_pin: gpio.36 + limit_all_pin: NO_PIN + hard_limits: false + pulloff_mm:1.00 + tmc_2209: + step_pin: gpio.16 + direction_pin: gpio.15 + addr: 3 + + motor1: + null_motor: + +spi: + miso_pin: gpio.19 + mosi_pin: gpio.23 + sck_pin: gpio.18 + +sdcard: + cs_pin: gpio.5 + card_detect_pin: NO_PIN + +probe: + pin: NO_PIN + + +Huanyang: + uart: + txd_pin: gpio.4 + rxd_pin: gpio.13 + rts_pin: gpio.17 + baud: 9600 + mode: 8N1 + modbus_id: 1 + spinup_ms: 0 + spindown_ms: 0 + tool_num: 0 + speed_map: 0=0% 1000=0% 24000=100% diff --git a/FluidNC/src/Machine/Homing.h b/FluidNC/src/Machine/Homing.h index 34f2d1bea..b8ed05f06 100644 --- a/FluidNC/src/Machine/Homing.h +++ b/FluidNC/src/Machine/Homing.h @@ -42,7 +42,7 @@ namespace Machine { void group(Configuration::HandlerBase& handler) override { handler.item("cycle", _cycle); handler.item("positive_direction", _positiveDirection); - handler.item("mpos", _mpos); + handler.item("mpos_mm", _mpos); handler.item("feed_mm_per_min", _feedRate); handler.item("seek_mm_per_min", _seekRate); handler.item("debounce_ms", _debounce_ms); diff --git a/FluidNC/src/Spindles/PWMSpindle.h b/FluidNC/src/Spindles/PWMSpindle.h index 6af30018c..a6464aab6 100644 --- a/FluidNC/src/Spindles/PWMSpindle.h +++ b/FluidNC/src/Spindles/PWMSpindle.h @@ -35,7 +35,7 @@ namespace Spindles { void validate() const override { Spindle::validate(); } void group(Configuration::HandlerBase& handler) override { - handler.item("pwm_freq", _pwm_freq); + handler.item("pwm_hz", _pwm_freq); OnOff::group(handler); } diff --git a/example_configs/6_pack_TMC2130.yaml b/example_configs/6_pack_TMC2130.yaml index c4aac2c6f..0fec67c7c 100644 --- a/example_configs/6_pack_TMC2130.yaml +++ b/example_configs/6_pack_TMC2130.yaml @@ -30,12 +30,12 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.33:pu hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2130: cs_pin: i2so.3 r_sense_ohms: 0.110 - run_current: 0.750 - hold_current: 0.750 + run_amps: 0.750 + hold_amps: 0.750 microsteps: 16 stallguard: 0 stallguard_debug: false @@ -70,12 +70,12 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.32:pu hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2130: cs_pin: i2so.6 r_sense_ohms: 0.110 - run_current: 0.750 - hold_current: 0.750 + run_amps: 0.750 + hold_amps: 0.750 microsteps: 16 stallguard: 0 stallguard_debug: false @@ -110,12 +110,12 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.35 hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2130: cs_pin: i2so.11 r_sense_ohms: 0.110 - run_current: 0.750 - hold_current: 0.750 + run_amps: 0.750 + hold_amps: 0.750 microsteps: 16 stallguard: 0 stallguard_debug: false diff --git a/example_configs/6_pack_TMC5160.yaml b/example_configs/6_pack_TMC5160.yaml index b82de6776..ba948acc1 100644 --- a/example_configs/6_pack_TMC5160.yaml +++ b/example_configs/6_pack_TMC5160.yaml @@ -30,12 +30,12 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.33:pu hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_5160: cs_pin: i2so.3 r_sense_ohms: 0.075 - run_current: 1.75 - hold_current: 0.50 + run_amps: 1.75 + hold_amps: 0.50 microsteps: 16 stallguard: 0 stallguard_debug: false @@ -70,12 +70,12 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.32:pu hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_5160: cs_pin: i2so.6 r_sense_ohms: 0.075 - run_current: 1.75 - hold_current: 0.50 + run_amps: 1.75 + hold_amps: 0.50 microsteps: 16 stallguard: 0 stallguard_debug: false @@ -110,12 +110,12 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.35 hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_5160: cs_pin: i2so.11 r_sense_ohms: 0.075 - run_current: 1.750 - hold_current: 0.50 + run_amps: 1.750 + hold_amps: 0.50 microsteps: 16 stallguard: 0 stallguard_debug: false diff --git a/example_configs/6_pack_external_huanyang.yaml b/example_configs/6_pack_external_huanyang.yaml index 28a15ea5e..329ee00f3 100644 --- a/example_configs/6_pack_external_huanyang.yaml +++ b/example_configs/6_pack_external_huanyang.yaml @@ -30,7 +30,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm: 1.000 standard_stepper: step_pin: I2SO.2 direction_pin: I2SO.1 @@ -57,7 +57,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.32:pu hard_limits: true - pulloff_mm 1.000 + pulloff_mm: 1.000 standard_stepper: step_pin: I2SO.5 direction_pin: I2SO.4 @@ -84,7 +84,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.35 hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 standard_stepper: step_pin: I2SO.10 direction_pin: I2SO.9 @@ -156,7 +156,5 @@ Huanyang: baud: 9600 mode: 8N1 modbus_id: 1 - spinup_ms: 0 - spindown_ms: 0 tool_num: 0 speed_map: 0=0% 0=25% 6000=25% 24000=100% diff --git a/example_configs/TMC2130_SPI_Daisy.yaml b/example_configs/TMC2130_SPI_Daisy.yaml index 5a97145ba..dd72a4328 100644 --- a/example_configs/TMC2130_SPI_Daisy.yaml +++ b/example_configs/TMC2130_SPI_Daisy.yaml @@ -30,13 +30,13 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2130: cs_pin: gpio.17 spi_index: 1 r_sense_ohms: 0.110 - run_current: 0.750 - hold_current: 0.750 + run_amps: 0.750 + hold_amps: 0.750 microsteps: 16 stallguard: 0 stallguard_debug: false @@ -71,12 +71,12 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2130: spi_index: 2 r_sense_ohms: 0.110 - run_current: 0.750 - hold_current: 0.750 + run_amps: 0.750 + hold_amps: 0.750 microsteps: 16 stallguard: 0 stallguard_debug: false @@ -111,12 +111,12 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2130: spi_index: 3 r_sense_ohms: 0.110 - run_current: 0.750 - hold_current: 0.750 + run_amps: 0.750 + hold_amps: 0.750 microsteps: 16 stallguard: 0 stallguard_debug: false @@ -151,12 +151,12 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2130: spi_index: 4 r_sense_ohms: 0.110 - run_current: 0.750 - hold_current: 0.750 + run_amps: 0.750 + hold_amps: 0.750 microsteps: 16 stallguard: 0 stallguard_debug: false diff --git a/example_configs/TMC2130_pen.yaml b/example_configs/TMC2130_pen.yaml index 9f75493b0..0b7077add 100644 --- a/example_configs/TMC2130_pen.yaml +++ b/example_configs/TMC2130_pen.yaml @@ -34,8 +34,8 @@ axes: step_pin: gpio.12 cs_pin: gpio.17 r_sense_ohms: 0.110 - run_current: 0.250 - hold_current: 0.250 + run_amps: 0.250 + hold_amps: 0.250 microsteps: 32 stallguard: 0 stallguard_debug: false @@ -71,8 +71,8 @@ axes: step_pin: gpio.14 cs_pin: gpio.16 r_sense_ohms: 0.110 - run_current: 0.250 - hold_current: 0.250 + run_amps: 0.250 + hold_amps: 0.250 microsteps: 32 stallguard: 0 stallguard_debug: false diff --git a/example_configs/TMC2209.yaml b/example_configs/TMC2209.yaml index 18abb130e..fedaae8de 100644 --- a/example_configs/TMC2209.yaml +++ b/example_configs/TMC2209.yaml @@ -30,7 +30,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.35 hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: step_pin: gpio.26 direction_pin: gpio.27 @@ -56,7 +56,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.34 hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: step_pin: gpio.33 direction_pin: gpio.32 @@ -82,7 +82,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: gpio.39 hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: step_pin: gpio.2 direction_pin: gpio.14 @@ -108,7 +108,7 @@ a: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm: 1.000 tmc_2209: step_pin: gpio.16 direction_pin: gpio.15 diff --git a/example_configs/TMC2209_pen.yaml b/example_configs/TMC2209_pen.yaml index ef49117a0..51186c33f 100644 --- a/example_configs/TMC2209_pen.yaml +++ b/example_configs/TMC2209_pen.yaml @@ -30,7 +30,7 @@ axes: limit_pos_pin: gpio.33 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -62,7 +62,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 null_motor: y: @@ -86,7 +86,7 @@ axes: limit_pos_pin: gpio.32 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -118,7 +118,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 null_motor: z: diff --git a/example_configs/tmc2209_10V.yaml b/example_configs/tmc2209_10V.yaml index 005f40649..6722600d5 100644 --- a/example_configs/tmc2209_10V.yaml +++ b/example_configs/tmc2209_10V.yaml @@ -27,7 +27,7 @@ axes: motor0: limit_pos_pin: gpio.35 hard_limits: false - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -36,8 +36,8 @@ axes: mode: 8N1 addr: 0 r_sense_ohms: 0.110 - run_current: 0.500 - hold_current: 0.500 + run_amps: 0.500 + hold_amps: 0.500 microsteps: 32 stallguard: 0 stallguard_debug: false @@ -73,7 +73,7 @@ axes: limit_pos_pin: gpio.34 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.33 direction_pin: gpio.32 @@ -102,7 +102,7 @@ axes: limit_pos_pin: gpio.39 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.2 direction_pin: gpio.14 @@ -131,7 +131,7 @@ axes: limit_pos_pin: gpio.36 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.16 direction_pin: gpio.15 diff --git a/example_configs/tmc2209_BESC.yaml b/example_configs/tmc2209_BESC.yaml index 1307c603b..225dbb2a7 100644 --- a/example_configs/tmc2209_BESC.yaml +++ b/example_configs/tmc2209_BESC.yaml @@ -27,7 +27,7 @@ axes: motor0: limit_pos_pin: gpio.35 hard_limits: false - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -36,8 +36,8 @@ axes: mode: 8N1 addr: 0 r_sense_ohms: 0.110 - run_current: 0.500 - hold_current: 0.500 + run_amps: 0.500 + hold_amps: 0.500 microsteps: 32 stallguard: 0 stallguard_debug: false @@ -73,7 +73,7 @@ axes: limit_pos_pin: gpio.34 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.33 direction_pin: gpio.32 @@ -102,7 +102,7 @@ axes: limit_pos_pin: gpio.39 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.2 direction_pin: gpio.14 @@ -131,7 +131,7 @@ axes: limit_pos_pin: gpio.36 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.16 direction_pin: gpio.15 diff --git a/example_configs/tmc2209_huanyang.yml b/example_configs/tmc2209_huanyang.yml index 294b4b4cd..33fd53951 100644 --- a/example_configs/tmc2209_huanyang.yml +++ b/example_configs/tmc2209_huanyang.yml @@ -29,7 +29,7 @@ axes: motor0: limit_pos_pin: gpio.35 hard_limits: false - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -38,8 +38,8 @@ axes: mode: 8N1 addr: 0 r_sense_ohms: 0.110 - run_current: 0.500 - hold_current: 0.500 + run_amps: 0.500 + hold_amps: 0.500 microsteps: 32 stallguard: 0 stallguard_debug: false @@ -75,7 +75,7 @@ axes: limit_pos_pin: gpio.34 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.33 direction_pin: gpio.32 @@ -103,7 +103,7 @@ axes: limit_pos_pin: gpio.39 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.2 direction_pin: gpio.14 @@ -132,7 +132,7 @@ axes: limit_pos_pin: gpio.36 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.16 direction_pin: gpio.15 @@ -162,7 +162,5 @@ Huanyang: baud: 9600 mode: 8N1 modbus_id: 1 - spinup_ms: 0 - spindown_ms: 0 tool_num: 0 speed_map: 0=0% 1000=0% 24000=100% diff --git a/example_configs/tmc2209_laser.yaml b/example_configs/tmc2209_laser.yaml index 1a430f63d..1c1a1c601 100644 --- a/example_configs/tmc2209_laser.yaml +++ b/example_configs/tmc2209_laser.yaml @@ -32,7 +32,7 @@ axes: limit_pos_pin: gpio.35 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -44,8 +44,8 @@ axes: addr: 0 r_sense_ohms: 0.110 - run_current: 1.200 - hold_current: 0.500 + run_amps: 1.200 + hold_amps: 0.500 microsteps: 8 stallguard: 0 stallguard_debug: false @@ -64,7 +64,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 null_motor: y: @@ -88,12 +88,12 @@ axes: limit_pos_pin: gpio.34 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: addr: 1 r_sense_ohms: 0.110 - run_current: 1.200 - hold_current: 0.500 + run_amps: 1.200 + hold_amps: 0.500 microsteps: 8 stallguard: 0 stallguard_debug: false @@ -112,7 +112,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 null_motor: z: @@ -136,12 +136,12 @@ axes: limit_pos_pin: gpio.39 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: addr: 2 r_sense_ohms: 0.110 - run_current: 1.200 - hold_current: 0.500 + run_amps: 1.200 + hold_amps: 0.500 microsteps: 8 stallguard: 0 stallguard_debug: false @@ -160,7 +160,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 null_motor: a: @@ -184,12 +184,12 @@ axes: limit_pos_pin: gpio.36 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: addr: 3 r_sense_ohms: 0.110 - run_current: 1.200 - hold_current: 0.500 + run_amps: 1.200 + hold_amps: 0.500 microsteps: 8 stallguard: 0 stallguard_debug: false @@ -208,7 +208,7 @@ axes: limit_pos_pin: NO_PIN limit_all_pin: NO_PIN hard_limits: true - pulloff_mm 1.000 + pulloff_mm:1.000 null_motor: diff --git a/example_configs/tmc2209_relay.yaml b/example_configs/tmc2209_relay.yaml index dfddd4ec6..1f729805f 100644 --- a/example_configs/tmc2209_relay.yaml +++ b/example_configs/tmc2209_relay.yaml @@ -27,7 +27,7 @@ axes: motor0: limit_pos_pin: gpio.35 hard_limits: false - pulloff_mm 1.000 + pulloff_mm:1.000 tmc_2209: uart: txd_pin: gpio.22 @@ -36,8 +36,8 @@ axes: mode: 8N1 addr: 0 r_sense_ohms: 0.110 - run_current: 0.500 - hold_current: 0.500 + run_amps: 0.500 + hold_amps: 0.500 microsteps: 32 stallguard: 0 stallguard_debug: false @@ -73,7 +73,7 @@ axes: limit_pos_pin: gpio.34 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.33 direction_pin: gpio.32 @@ -102,7 +102,7 @@ axes: limit_pos_pin: gpio.39 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.2 direction_pin: gpio.14 @@ -131,7 +131,7 @@ axes: limit_pos_pin: gpio.36 limit_all_pin: NO_PIN hard_limits: false - pulloff_mm 1.00 + pulloff_mm:1.00 tmc_2209: step_pin: gpio.16 direction_pin: gpio.15 From c7dbe298789957870d85183ae365177f284ac73a Mon Sep 17 00:00:00 2001 From: bdring Date: Wed, 6 Oct 2021 16:27:55 -0500 Subject: [PATCH 20/20] More cleanup --- FluidNC/data/tmc2209_huanyang.yml | 168 ------------------------- example_configs/6_pack_TMC5160.yaml | 5 - example_configs/TMC2130_SPI_Daisy.yaml | 29 ----- example_configs/TMC2209.yaml | 5 - example_configs/TMC2209_pen.yaml | 5 - example_configs/test_drive_SD.yaml | 5 - 6 files changed, 217 deletions(-) delete mode 100644 FluidNC/data/tmc2209_huanyang.yml diff --git a/FluidNC/data/tmc2209_huanyang.yml b/FluidNC/data/tmc2209_huanyang.yml deleted file mode 100644 index ea77ab921..000000000 --- a/FluidNC/data/tmc2209_huanyang.yml +++ /dev/null @@ -1,168 +0,0 @@ -name: "TMC2209 XYZA PWM Spindle" -board: "TMC2209 4x" - -stepping: - engine: RMT - idle_ms: 250 - dir_delay_us: 1 - pulse_us: 2 - disable_delay_us: 0 - -homing_init_lock: true - -axes: - shared_stepper_disable_pin: gpio.25:high - - x: - steps_per_mm: 800 - max_rate_mm_per_min: 5000 - acceleration_mm_per_sec2: 100 - max_travel_mm: 300 - homing: - cycle: 1 - mpos_mm: 150 - positive_direction: false - feed_mm_per_min: 100.000 - seek_mm_per_min: 200.000 - debounce_ms: 500 - - motor0: - limit_pos_pin: gpio.35 - hard_limits: false - pulloff_mm:1.000 - tmc_2209: - uart: - txd_pin: gpio.22 - rxd_pin: gpio.21 - baud: 115200 - mode: 8N1 - addr: 0 - r_sense_ohms: 0.110 - run_amps: 0.500 - hold_amps: 0.500 - microsteps: 32 - stallguard: 0 - stallguard_debug: false - toff_disable: 0 - toff_stealthchop: 5 - toff_coolstep: 3 - run_mode: StealthChop - homing_mode: StealthChop - use_enable: false - step_pin: gpio.26 - direction_pin: gpio.27 - disable_pin: NO_PIN - - motor1: - null_motor: - - y: - steps_per_mm: 800 - max_rate_mm_per_min: 5000 - acceleration_mm_per_sec2: 100 - max_travel_mm: 300 - - homing: - cycle: 2 - mpos_mm: 150 - positive_direction: false - feed_mm_per_min: 100.000 - seek_mm_per_min: 200.000 - debounce_ms: 500 - - motor0: - limit_neg_pin: NO_PIN - limit_pos_pin: gpio.34 - limit_all_pin: NO_PIN - hard_limits: false - pulloff_mm:1.00 - tmc_2209: - step_pin: gpio.33 - direction_pin: gpio.32 - addr: 1 - - motor1: - null_motor: - - z: - steps_per_mm: 800 - max_rate_mm_per_min: 5000 - acceleration_mm_per_sec2: 100 - max_travel_mm: 300 - - homing: - cycle: 2 - mpos_mm: 150 - positive_direction: false - feed_mm_per_min: 100.000 - seek_mm_per_min: 200.000 - debounce_ms: 500 - - motor0: - limit_neg_pin: NO_PIN - limit_pos_pin: gpio.39 - limit_all_pin: NO_PIN - hard_limits: false - pulloff_mm:1.00 - tmc_2209: - step_pin: gpio.2 - direction_pin: gpio.14 - addr: 2 - - motor1: - null_motor: - - - a: - steps_per_mm: 800 - max_rate_mm_per_min: 5000 - acceleration_mm_per_sec2: 100 - max_travel_mm: 300 - - homing: - cycle: 2 - mpos_mm: 150 - positive_direction: false - feed_mm_per_min: 100.000 - seek_mm_per_min: 200.000 - debounce_ms: 500 - - motor0: - limit_neg_pin: NO_PIN - limit_pos_pin: gpio.36 - limit_all_pin: NO_PIN - hard_limits: false - pulloff_mm:1.00 - tmc_2209: - step_pin: gpio.16 - direction_pin: gpio.15 - addr: 3 - - motor1: - null_motor: - -spi: - miso_pin: gpio.19 - mosi_pin: gpio.23 - sck_pin: gpio.18 - -sdcard: - cs_pin: gpio.5 - card_detect_pin: NO_PIN - -probe: - pin: NO_PIN - - -Huanyang: - uart: - txd_pin: gpio.4 - rxd_pin: gpio.13 - rts_pin: gpio.17 - baud: 9600 - mode: 8N1 - modbus_id: 1 - spinup_ms: 0 - spindown_ms: 0 - tool_num: 0 - speed_map: 0=0% 1000=0% 24000=100% diff --git a/example_configs/6_pack_TMC5160.yaml b/example_configs/6_pack_TMC5160.yaml index ba948acc1..2cc7c0ff3 100644 --- a/example_configs/6_pack_TMC5160.yaml +++ b/example_configs/6_pack_TMC5160.yaml @@ -153,11 +153,6 @@ control: macro2_pin: NO_PIN macro3_pin: NO_PIN -coolant: - flood_pin: NO_PIN - mist_pin: NO_PIN - delay_ms: 0 - probe: pin: NO_PIN check_mode_start: true diff --git a/example_configs/TMC2130_SPI_Daisy.yaml b/example_configs/TMC2130_SPI_Daisy.yaml index dd72a4328..45f4048d6 100644 --- a/example_configs/TMC2130_SPI_Daisy.yaml +++ b/example_configs/TMC2130_SPI_Daisy.yaml @@ -179,21 +179,6 @@ sdcard: card_detect_pin: NO_PIN cs_pin: gpio.5 -control: - safety_door: NO_PIN - reset: NO_PIN - feed_hold: NO_PIN - cycle_start: NO_PIN - macro0: NO_PIN - macro1: NO_PIN - macro2: NO_PIN - macro3: NO_PIN - -coolant: - flood: NO_PIN - mist: NO_PIN - delay_ms: 0 - probe: pin: NO_PIN check_mode_start: true @@ -206,19 +191,5 @@ macros: macro2: macro3: -user_outputs: - analog0: NO_PIN - analog1: NO_PIN - analog2: NO_PIN - analog3: NO_PIN - analog0_hz: 5000 - analog1_hz: 5000 - analog2_hz: 5000 - analog3_hz: 5000 - digital0: NO_PIN - digital1: NO_PIN - digital2: NO_PIN - digital3: NO_PIN - start: must_home: false diff --git a/example_configs/TMC2209.yaml b/example_configs/TMC2209.yaml index fedaae8de..566a8e5f3 100644 --- a/example_configs/TMC2209.yaml +++ b/example_configs/TMC2209.yaml @@ -132,11 +132,6 @@ control: macro2: NO_PIN macro3: NO_PIN -coolant: - flood: NO_PIN - mist: NO_PIN - delay_ms: 0 - probe: pin: NO_PIN check_mode_start: true diff --git a/example_configs/TMC2209_pen.yaml b/example_configs/TMC2209_pen.yaml index 51186c33f..922727517 100644 --- a/example_configs/TMC2209_pen.yaml +++ b/example_configs/TMC2209_pen.yaml @@ -147,11 +147,6 @@ control: macro2_pin: NO_PIN macro3_pin: NO_PIN -coolant: - flood_pin: NO_PIN - mist_pin: NO_PIN - delay_ms: 0 - probe: pin: NO_PIN check_mode_start: true diff --git a/example_configs/test_drive_SD.yaml b/example_configs/test_drive_SD.yaml index 469fb4ea5..8423c5f57 100644 --- a/example_configs/test_drive_SD.yaml +++ b/example_configs/test_drive_SD.yaml @@ -45,11 +45,6 @@ control: macro2: NO_PIN macro3: NO_PIN -coolant: - flood: NO_PIN - mist: NO_PIN - delay_ms: 0 - probe: pin: NO_PIN check_mode_start: true