planner_queue_size 64 # Size of the planning queue, must be a power of 2. 128 seems to be the maximum.
acceleration 3000 # Acceleration in mm/second/second.
acceleration_ticks_per_second 1000 # Number of times per second the speed is updated
-junction_deviation 0.05 # Similar to the old "max_jerk", in millimeters, see : https://github.com/grbl/grbl/blob/master/planner.c#L409
+junction_deviation 0.05 # Similar to the old "max_jerk", in millimeters, see : https://github.com/grbl/grbl/blob/master/planner.c#L409
# and https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.8 . Lower values mean being more careful, higher values means being faster and have more jerk
# Stepper module configuration
gamma_homing_direction home_to_max #
gamma_max 300 #
-alpha_fast_homing_rate 3000 # rates in steps/second
-beta_fast_homing_rate 3000 #
-gamma_fast_homing_rate 3000 #
-alpha_slow_homing_rate 1000 #
-beta_slow_homing_rate 1000 #
-gamma_slow_homing_rate 1000
+alpha_fast_homing_rate 200 # homing feedrates in mm/second
+beta_fast_homing_rate 200 #
+gamma_fast_homing_rate 200 #
+alpha_slow_homing_rate 20 #
+beta_slow_homing_rate 20 #
+gamma_slow_homing_rate 20
-alpha_homing_retract 500 #
-beta_homing_retract 500 #
-gamma_homing_retract 500 #
+alpha_homing_retract 5 # retract/bounce distance after homing in mm
+beta_homing_retract 5 #
+gamma_homing_retract 5 #
-alpha_trim 0 # software trim for alpha stepper endstop (in steps)
-beta_trim 0 # software trim for beta stepper endstop (in steps)
-gamma_trim 0 # software trim for gamma stepper endstop (in steps)
+alpha_trim 0 # software trim for alpha stepper endstop (in mm)
+beta_trim 0 # software trim for beta stepper endstop (in mm)
+gamma_trim 0 # software trim for gamma stepper endstop (in mm)
# Pause button
pause_button_enable true #
planner_queue_size 64 # Size of the planning queue, must be a power of 2. 128 seems to be the maximum.
acceleration 3000 # Acceleration in mm/second/second.
acceleration_ticks_per_second 1000 # Number of times per second the speed is updated
-junction_deviation 0.05 # Similar to the old "max_jerk", in millimeters, see : https://github.com/grbl/grbl/blob/master/planner.c#L409
+junction_deviation 0.05 # Similar to the old "max_jerk", in millimeters, see : https://github.com/grbl/grbl/blob/master/planner.c#L409
# and https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.8 . Lower values mean being more careful, higher values means being faster and have more jerk
# Stepper module configuration
gamma_min 0 #
gamma_max 200 #
-alpha_fast_homing_rate 3000 # rates in steps/second
-beta_fast_homing_rate 3000 # depends on steps/mm setting above
-gamma_fast_homing_rate 30000 # "
-alpha_slow_homing_rate 1000 # "
-beta_slow_homing_rate 1000 # "
-gamma_slow_homing_rate 10000
+alpha_fast_homing_rate_mm_s 50 # feedrates in mm/second
+beta_fast_homing_rate_mm_s 50 # "
+gamma_fast_homing_rate_mm_s 4 # "
+alpha_slow_homing_rate_mm_s 25 # "
+beta_slow_homing_rate_mm_s 25 # "
+gamma_slow_homing_rate_mm_s 2 # "
-alpha_homing_retract 500 # "
-beta_homing_retract 500 # "
-gamma_homing_retract 5000 # "
+alpha_homing_retract_mm 5 # distance in mm
+beta_homing_retract_mm 5 # "
+gamma_homing_retract_mm 1 # "
# Pause button
pause_button_enable true #
# Panel
panel.enable false # set to true to enable the panel code
-panel.lcd smoothiepanel # set type of panel also viki_lcd, i2c_lcd is a generic i2c panel, panelolu2
+panel.lcd smoothiepanel # set type of panel also viki_lcd, i2c_lcd is a generic i2c panel, panelolu2
panel.encoder_a_pin 1.22!^ # encoder pin
panel.encoder_b_pin 1.23!^ # encoder pin
# Example for reprap discount GLCD
-# on glcd EXP1 is to left and EXP2 is to right, pin 1 is bottom left, pin 2 is top left etc.
+# on glcd EXP1 is to left and EXP2 is to right, pin 1 is bottom left, pin 2 is top left etc.
# +5v is EXP1 pin 10, Gnd is EXP1 pin 9
#panel.lcd reprap_discount_glcd #
#panel.spi_channel 0 # spi channel to use ; GLCD EXP1 Pins 3,5 (MOSI, SCLK)
#panel.spi_cs_pin 0.16 # spi chip select ; GLCD EXP1 Pin 4
#panel.encoder_a_pin 1.22!^ # encoder pin ; GLCD EXP2 Pin 3
#panel.encoder_b_pin 1.23!^ # encoder pin ; GLCD EXP2 Pin 5
-#panel.click_button_pin 1.30!^ # click button ; GLCD EXP1 Pin 2
+#panel.click_button_pin 1.30!^ # click button ; GLCD EXP1 Pin 2
#panel.buzz_pin 1.31 # pin for buzzer ; GLCD EXP1 Pin 1
#panel.button_pause_pin 2.11^ # kill/pause ; GLCD EXP2 Pin 8
this->pins[3].from_string( this->kernel->config->value(alpha_max_endstop_checksum )->by_default("nc" )->as_string())->as_input();
this->pins[4].from_string( this->kernel->config->value(beta_max_endstop_checksum )->by_default("nc" )->as_string())->as_input();
this->pins[5].from_string( this->kernel->config->value(gamma_max_endstop_checksum )->by_default("nc" )->as_string())->as_input();
- this->fast_rates[0] = this->kernel->config->value(alpha_fast_homing_rate_checksum )->by_default(500 )->as_number();
- this->fast_rates[1] = this->kernel->config->value(beta_fast_homing_rate_checksum )->by_default(500 )->as_number();
- this->fast_rates[2] = this->kernel->config->value(gamma_fast_homing_rate_checksum )->by_default(5 )->as_number();
- this->slow_rates[0] = this->kernel->config->value(alpha_slow_homing_rate_checksum )->by_default(100 )->as_number();
- this->slow_rates[1] = this->kernel->config->value(beta_slow_homing_rate_checksum )->by_default(100 )->as_number();
- this->slow_rates[2] = this->kernel->config->value(gamma_slow_homing_rate_checksum )->by_default(5 )->as_number();
- this->retract_steps[0] = this->kernel->config->value(alpha_homing_retract_checksum )->by_default(30 )->as_number();
- this->retract_steps[1] = this->kernel->config->value(beta_homing_retract_checksum )->by_default(30 )->as_number();
- this->retract_steps[2] = this->kernel->config->value(gamma_homing_retract_checksum )->by_default(10 )->as_number();
- this->trim[0] = this->kernel->config->value(alpha_trim_checksum )->by_default(0 )->as_number();
- this->trim[1] = this->kernel->config->value(beta_trim_checksum )->by_default(0 )->as_number();
- this->trim[2] = this->kernel->config->value(gamma_trim_checksum )->by_default(0 )->as_number();
- this->debounce_count = this->kernel->config->value(endstop_debounce_count_checksum )->by_default(100 )->as_number();
-
- // we need to know steps per mm for M206, TODO should probably use them for all settings
+
+ // we need to know steps per mm for M206, also use them for all settings
this->steps_per_mm[0] = this->kernel->config->value(alpha_steps_per_mm_checksum )->as_number();
this->steps_per_mm[1] = this->kernel->config->value(beta_steps_per_mm_checksum )->as_number();
this->steps_per_mm[2] = this->kernel->config->value(gamma_steps_per_mm_checksum )->as_number();
+ this->fast_rates[0] = this->kernel->config->value(alpha_fast_homing_rate_checksum )->by_default(4000 )->as_number();
+ this->fast_rates[1] = this->kernel->config->value(beta_fast_homing_rate_checksum )->by_default(4000 )->as_number();
+ this->fast_rates[2] = this->kernel->config->value(gamma_fast_homing_rate_checksum )->by_default(6400 )->as_number();
+ this->slow_rates[0] = this->kernel->config->value(alpha_slow_homing_rate_checksum )->by_default(2000 )->as_number();
+ this->slow_rates[1] = this->kernel->config->value(beta_slow_homing_rate_checksum )->by_default(2000 )->as_number();
+ this->slow_rates[2] = this->kernel->config->value(gamma_slow_homing_rate_checksum )->by_default(3200 )->as_number();
+ this->retract_steps[0] = this->kernel->config->value(alpha_homing_retract_checksum )->by_default(400 )->as_number();
+ this->retract_steps[1] = this->kernel->config->value(beta_homing_retract_checksum )->by_default(400 )->as_number();
+ this->retract_steps[2] = this->kernel->config->value(gamma_homing_retract_checksum )->by_default(1600 )->as_number();
+
+ // newer mm based config values override the old ones, convert to steps/mm and steps, defaults to what was set in the older config settings above
+ this->fast_rates[0]= this->kernel->config->value(alpha_fast_homing_rate_mm_checksum )->by_default(this->fast_rates[0] / steps_per_mm[0])->as_number() * steps_per_mm[0];
+ this->fast_rates[1]= this->kernel->config->value(beta_fast_homing_rate_mm_checksum )->by_default(this->fast_rates[1] / steps_per_mm[1])->as_number() * steps_per_mm[1];
+ this->fast_rates[2]= this->kernel->config->value(gamma_fast_homing_rate_mm_checksum )->by_default(this->fast_rates[2] / steps_per_mm[2])->as_number() * steps_per_mm[2];
+ this->slow_rates[0]= this->kernel->config->value(alpha_slow_homing_rate_mm_checksum )->by_default(this->slow_rates[0] / steps_per_mm[0])->as_number() * steps_per_mm[0];
+ this->slow_rates[1]= this->kernel->config->value(beta_slow_homing_rate_mm_checksum )->by_default(this->slow_rates[1] / steps_per_mm[1])->as_number() * steps_per_mm[1];
+ this->slow_rates[2]= this->kernel->config->value(gamma_slow_homing_rate_mm_checksum )->by_default(this->slow_rates[2] / steps_per_mm[2])->as_number() * steps_per_mm[2];
+ this->retract_steps[0]= this->kernel->config->value(alpha_homing_retract_mm_checksum )->by_default(this->retract_steps[0]/steps_per_mm[0])->as_number() * steps_per_mm[0];
+ this->retract_steps[1]= this->kernel->config->value(beta_homing_retract_mm_checksum )->by_default(this->retract_steps[1]/steps_per_mm[1])->as_number() * steps_per_mm[1];
+ this->retract_steps[2]= this->kernel->config->value(gamma_homing_retract_mm_checksum )->by_default(this->retract_steps[2]/steps_per_mm[2])->as_number() * steps_per_mm[2];
+
+ // endstop trim used by deltas to do soft adjusting, in mm, convert to steps
+ this->trim[0] = this->kernel->config->value(alpha_trim_checksum )->by_default(0 )->as_number() * steps_per_mm[0];
+ this->trim[1] = this->kernel->config->value(beta_trim_checksum )->by_default(0 )->as_number() * steps_per_mm[0];
+ this->trim[2] = this->kernel->config->value(gamma_trim_checksum )->by_default(0 )->as_number() * steps_per_mm[0];
+
+ this->debounce_count = this->kernel->config->value(endstop_debounce_count_checksum )->by_default(100)->as_number();
+
+
// get homing direction and convert to boolean where true is home to min, and false is home to max
int home_dir = get_checksum(this->kernel->config->value(alpha_homing_direction_checksum)->by_default("home_to_min")->as_string());
this->home_direction[0] = home_dir != home_to_max_checksum;
#define beta_trim_checksum CHECKSUM("beta_trim")
#define gamma_trim_checksum CHECKSUM("gamma_trim")
+// these values are in steps and should be deprecated
#define alpha_fast_homing_rate_checksum CHECKSUM("alpha_fast_homing_rate")
#define beta_fast_homing_rate_checksum CHECKSUM("beta_fast_homing_rate")
#define gamma_fast_homing_rate_checksum CHECKSUM("gamma_fast_homing_rate")
#define gamma_homing_retract_checksum CHECKSUM("gamma_homing_retract")
#define endstop_debounce_count_checksum CHECKSUM("endstop_debounce_count")
+// same as above but in user friendly mm/s and mm
+#define alpha_fast_homing_rate_mm_checksum CHECKSUM("alpha_fast_homing_rate_mm_s")
+#define beta_fast_homing_rate_mm_checksum CHECKSUM("beta_fast_homing_rate_mm_s")
+#define gamma_fast_homing_rate_mm_checksum CHECKSUM("gamma_fast_homing_rate_mm_s")
+
+#define alpha_slow_homing_rate_mm_checksum CHECKSUM("alpha_slow_homing_rate_mm_s")
+#define beta_slow_homing_rate_mm_checksum CHECKSUM("beta_slow_homing_rate_mm_s")
+#define gamma_slow_homing_rate_mm_checksum CHECKSUM("gamma_slow_homing_rate_mm_s")
+
+#define alpha_homing_retract_mm_checksum CHECKSUM("alpha_homing_retract_mm")
+#define beta_homing_retract_mm_checksum CHECKSUM("beta_homing_retract_mm")
+#define gamma_homing_retract_mm_checksum CHECKSUM("gamma_homing_retract_mm")
+
+#define endstop_debounce_count_checksum CHECKSUM("endstop_debounce_count")
+
#define alpha_homing_direction_checksum CHECKSUM("alpha_homing_direction")
#define beta_homing_direction_checksum CHECKSUM("beta_homing_direction")
#define gamma_homing_direction_checksum CHECKSUM("gamma_homing_direction")