Add speed configuration for home-bumping movement
This commit is contained in:
parent
c321c97f35
commit
60ceca1bc1
|
@ -407,6 +407,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
#define RIGHT_PROBE_BED_POSITION 170
|
||||
#define FRONT_PROBE_BED_POSITION 20
|
||||
#define BACK_PROBE_BED_POSITION 170
|
||||
|
||||
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
|
||||
|
||||
// Set the number of grid points per dimension
|
||||
// You probably don't need more than 3 (squared=9)
|
||||
|
@ -429,8 +431,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
|
||||
// Offsets to the probe relative to the extruder tip (Hotend - Probe)
|
||||
// X and Y offsets must be integers
|
||||
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // -left +right
|
||||
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // -front +behind
|
||||
#define X_PROBE_OFFSET_FROM_EXTRUDER -25 // Probe on: -left +right
|
||||
#define Y_PROBE_OFFSET_FROM_EXTRUDER -29 // Probe on: -front +behind
|
||||
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35 // -below (always!)
|
||||
|
||||
#define Z_RAISE_BEFORE_HOMING 4 // (in mm) Raise Z before homing (G28) for Probe Clearance.
|
||||
|
@ -441,6 +443,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
#define Z_RAISE_BEFORE_PROBING 15 //How much the extruder will be raised before traveling to the first probing point.
|
||||
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points
|
||||
|
||||
#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" //These commands will be executed in the end of G29 routine.
|
||||
//Useful to retract a deployable probe.
|
||||
|
||||
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
|
||||
//#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
|
||||
|
||||
|
|
|
@ -214,6 +214,7 @@
|
|||
#define X_HOME_RETRACT_MM 5
|
||||
#define Y_HOME_RETRACT_MM 5
|
||||
#define Z_HOME_RETRACT_MM 2
|
||||
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
|
||||
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
|
||||
|
||||
#define AXIS_RELATIVE_MODES {false, false, false, false}
|
||||
|
|
|
@ -201,6 +201,7 @@
|
|||
#endif
|
||||
|
||||
float homing_feedrate[] = HOMING_FEEDRATE;
|
||||
int homing_bump_divisor[] = HOMING_BUMP_DIVISOR;
|
||||
bool axis_relative_modes[] = AXIS_RELATIVE_MODES;
|
||||
int feedmultiply = 100; //100->1 200->2
|
||||
int saved_feedmultiply;
|
||||
|
@ -1131,7 +1132,18 @@ static void run_z_probe() {
|
|||
st_synchronize();
|
||||
|
||||
// move back down slowly to find bed
|
||||
feedrate = homing_feedrate[Z_AXIS]/4;
|
||||
|
||||
if (homing_bump_divisor[Z_AXIS] >= 1)
|
||||
{
|
||||
feedrate = homing_feedrate[Z_AXIS]/homing_bump_divisor[Z_AXIS];
|
||||
}
|
||||
else
|
||||
{
|
||||
feedrate = homing_feedrate[Z_AXIS]/10;
|
||||
SERIAL_ECHOLN("Warning: The Homing Bump Feedrate Divisor cannot be less then 1");
|
||||
}
|
||||
|
||||
|
||||
zPosition -= home_retract_mm(Z_AXIS) * 2;
|
||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate/60, active_extruder);
|
||||
st_synchronize();
|
||||
|
@ -1293,11 +1305,17 @@ static void homeaxis(int axis) {
|
|||
st_synchronize();
|
||||
|
||||
destination[axis] = 2*home_retract_mm(axis) * axis_home_dir;
|
||||
#ifdef DELTA
|
||||
feedrate = homing_feedrate[axis]/10;
|
||||
#else
|
||||
feedrate = homing_feedrate[axis]/2 ;
|
||||
#endif
|
||||
|
||||
if (homing_bump_divisor[axis] >= 1)
|
||||
{
|
||||
feedrate = homing_feedrate[axis]/homing_bump_divisor[axis];
|
||||
}
|
||||
else
|
||||
{
|
||||
feedrate = homing_feedrate[axis]/10;
|
||||
SERIAL_ECHOLN("Warning: The Homing Bump Feedrate Divisor cannot be less then 1");
|
||||
}
|
||||
|
||||
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
|
||||
st_synchronize();
|
||||
#ifdef DELTA
|
||||
|
@ -1756,41 +1774,32 @@ inline void gcode_G28() {
|
|||
|
||||
#ifdef AUTO_BED_LEVELING_GRID
|
||||
|
||||
#define MIN_PROBE_EDGE 20 // The probe square sides can be no smaller than this
|
||||
|
||||
// Make sure probing points are reachable
|
||||
|
||||
#if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
|
||||
#error The given LEFT_PROBE_BED_POSITION can't be reached by the probe.
|
||||
#error "The given LEFT_PROBE_BED_POSITION can't be reached by the probe."
|
||||
#elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
|
||||
#error The given RIGHT_PROBE_BED_POSITION can't be reached by the probe.
|
||||
#error "The given RIGHT_PROBE_BED_POSITION can't be reached by the probe."
|
||||
#elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
|
||||
#error The given FRONT_PROBE_BED_POSITION can't be reached by the probe.
|
||||
#error "The given FRONT_PROBE_BED_POSITION can't be reached by the probe."
|
||||
#elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y
|
||||
#error The given BACK_PROBE_BED_POSITION can't be reached by the probe.
|
||||
|
||||
// Check if Probe_Offset * Grid Points is greater than Probing Range
|
||||
|
||||
#elif abs(X_PROBE_OFFSET_FROM_EXTRUDER) * (AUTO_BED_LEVELING_GRID_POINTS-1) >= RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION
|
||||
#error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
|
||||
#elif abs(Y_PROBE_OFFSET_FROM_EXTRUDER) * (AUTO_BED_LEVELING_GRID_POINTS-1) >= BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION
|
||||
#error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
|
||||
#error "The given BACK_PROBE_BED_POSITION can't be reached by the probe."
|
||||
#endif
|
||||
|
||||
#else // !AUTO_BED_LEVELING_GRID
|
||||
|
||||
#if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X
|
||||
#error The given ABL_PROBE_PT_1_X can't be reached by the probe.
|
||||
#error "The given ABL_PROBE_PT_1_X can't be reached by the probe."
|
||||
#elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X
|
||||
#error The given ABL_PROBE_PT_2_X can't be reached by the probe.
|
||||
#error "The given ABL_PROBE_PT_2_X can't be reached by the probe."
|
||||
#elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X
|
||||
#error The given ABL_PROBE_PT_3_X can't be reached by the probe.
|
||||
#error "The given ABL_PROBE_PT_3_X can't be reached by the probe."
|
||||
#elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y
|
||||
#error The given ABL_PROBE_PT_1_Y can't be reached by the probe.
|
||||
#error "The given ABL_PROBE_PT_1_Y can't be reached by the probe."
|
||||
#elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y
|
||||
#error The given ABL_PROBE_PT_2_Y can't be reached by the probe.
|
||||
#error "The given ABL_PROBE_PT_2_Y can't be reached by the probe."
|
||||
#elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y
|
||||
#error The given ABL_PROBE_PT_3_Y can't be reached by the probe.
|
||||
#error "The given ABL_PROBE_PT_3_Y can't be reached by the probe."
|
||||
#endif
|
||||
|
||||
#endif // !AUTO_BED_LEVELING_GRID
|
||||
|
@ -1862,7 +1871,7 @@ inline void gcode_G28() {
|
|||
SERIAL_PROTOCOLPGM("G29 Auto Bed Leveling\n");
|
||||
|
||||
int auto_bed_leveling_grid_points = code_seen('P') ? code_value_long() : AUTO_BED_LEVELING_GRID_POINTS;
|
||||
if (auto_bed_leveling_grid_points < 2 || auto_bed_leveling_grid_points > AUTO_BED_LEVELING_GRID_POINTS) {
|
||||
if (auto_bed_leveling_grid_points < 2) {
|
||||
SERIAL_PROTOCOLPGM("?Number of probed (P)oints is implausible (2 minimum).\n");
|
||||
return;
|
||||
}
|
||||
|
@ -2095,6 +2104,11 @@ inline void gcode_G28() {
|
|||
#ifdef Z_PROBE_SLED
|
||||
dock_sled(true, -SLED_DOCKING_OFFSET); // dock the probe, correcting for over-travel
|
||||
#endif
|
||||
|
||||
#ifdef Z_PROBE_END_SCRIPT
|
||||
enquecommands_P(PSTR(Z_PROBE_END_SCRIPT));
|
||||
st_synchronize();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef Z_PROBE_SLED
|
||||
|
|
|
@ -413,6 +413,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
#define RIGHT_PROBE_BED_POSITION 170
|
||||
#define FRONT_PROBE_BED_POSITION 20
|
||||
#define BACK_PROBE_BED_POSITION 170
|
||||
|
||||
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
|
||||
|
||||
// Set the number of grid points per dimension
|
||||
// You probably don't need more than 3 (squared=9)
|
||||
|
|
|
@ -214,6 +214,7 @@
|
|||
#define X_HOME_RETRACT_MM 5
|
||||
#define Y_HOME_RETRACT_MM 5
|
||||
#define Z_HOME_RETRACT_MM 2
|
||||
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
|
||||
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
|
||||
|
||||
#define AXIS_RELATIVE_MODES {false, false, false, false}
|
||||
|
|
|
@ -419,6 +419,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
#define FRONT_PROBE_BED_POSITION 20
|
||||
#define BACK_PROBE_BED_POSITION 170
|
||||
|
||||
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
|
||||
|
||||
// Set the number of grid points per dimension
|
||||
// You probably don't need more than 3 (squared=9)
|
||||
#define AUTO_BED_LEVELING_GRID_POINTS 2
|
||||
|
|
|
@ -214,6 +214,7 @@
|
|||
#define X_HOME_RETRACT_MM 5
|
||||
#define Y_HOME_RETRACT_MM 5
|
||||
#define Z_HOME_RETRACT_MM 3
|
||||
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
|
||||
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
|
||||
|
||||
#define AXIS_RELATIVE_MODES {false, false, false, false}
|
||||
|
|
|
@ -443,6 +443,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
#define FRONT_PROBE_BED_POSITION 20
|
||||
#define BACK_PROBE_BED_POSITION 170
|
||||
|
||||
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
|
||||
|
||||
// Set the number of grid points per dimension
|
||||
// You probably don't need more than 3 (squared=9)
|
||||
#define AUTO_BED_LEVELING_GRID_POINTS 2
|
||||
|
|
|
@ -214,6 +214,7 @@
|
|||
#define X_HOME_RETRACT_MM 3
|
||||
#define Y_HOME_RETRACT_MM 3
|
||||
#define Z_HOME_RETRACT_MM 3
|
||||
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
|
||||
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
|
||||
#ifdef SCARA
|
||||
#define QUICK_HOME //SCARA needs Quickhome
|
||||
|
|
|
@ -413,6 +413,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
#define FRONT_PROBE_BED_POSITION 20
|
||||
#define BACK_PROBE_BED_POSITION 170
|
||||
|
||||
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
|
||||
|
||||
// Set the number of grid points per dimension
|
||||
// You probably don't need more than 3 (squared=9)
|
||||
#define AUTO_BED_LEVELING_GRID_POINTS 2
|
||||
|
|
|
@ -214,6 +214,7 @@
|
|||
#define X_HOME_RETRACT_MM 5
|
||||
#define Y_HOME_RETRACT_MM 5
|
||||
#define Z_HOME_RETRACT_MM 2
|
||||
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
|
||||
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
|
||||
|
||||
#define AXIS_RELATIVE_MODES {false, false, false, false}
|
||||
|
|
|
@ -214,6 +214,7 @@
|
|||
#define X_HOME_RETRACT_MM 5
|
||||
#define Y_HOME_RETRACT_MM 5
|
||||
#define Z_HOME_RETRACT_MM 5 // deltas need the same for all three axis
|
||||
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
|
||||
|
||||
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
|
||||
|
||||
|
|
|
@ -411,6 +411,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
#define FRONT_PROBE_BED_POSITION 20
|
||||
#define BACK_PROBE_BED_POSITION 170
|
||||
|
||||
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
|
||||
|
||||
// Set the number of grid points per dimension
|
||||
// You probably don't need more than 3 (squared=9)
|
||||
#define AUTO_BED_LEVELING_GRID_POINTS 2
|
||||
|
|
|
@ -214,6 +214,7 @@
|
|||
#define X_HOME_RETRACT_MM 5
|
||||
#define Y_HOME_RETRACT_MM 5
|
||||
#define Z_HOME_RETRACT_MM 2
|
||||
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
|
||||
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
|
||||
|
||||
#define AXIS_RELATIVE_MODES {false, false, false, false}
|
||||
|
|
|
@ -412,6 +412,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
#define RIGHT_PROBE_BED_POSITION 170
|
||||
#define FRONT_PROBE_BED_POSITION 20
|
||||
#define BACK_PROBE_BED_POSITION 170
|
||||
|
||||
#define MIN_PROBE_EDGE 10 // The probe square sides can be no smaller than this
|
||||
|
||||
// Set the number of grid points per dimension
|
||||
// You probably don't need more than 3 (squared=9)
|
||||
|
|
|
@ -214,6 +214,7 @@
|
|||
#define X_HOME_RETRACT_MM 5
|
||||
#define Y_HOME_RETRACT_MM 5
|
||||
#define Z_HOME_RETRACT_MM 1
|
||||
#define HOMING_BUMP_DIVISOR {10, 10, 20} // Re-Bump Speed Divisor (Divides the Homing Feedrate)
|
||||
//#define QUICK_HOME //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
|
||||
|
||||
#define AXIS_RELATIVE_MODES {false, false, false, false}
|
||||
|
|
Loading…
Reference in a new issue