Merge branch 'ProbeDeployment' into Development

2.0.x
Richard Wackerbarth 10 years ago
commit 0c7bdf569c

@ -1296,32 +1296,73 @@ static void setup_for_endstop_move() {
} }
#elif defined(Z_PROBE_ALLEN_KEY) #elif defined(Z_PROBE_ALLEN_KEY)
feedrate = Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE;
feedrate = homing_feedrate[X_AXIS]; // If endstop is already false, the probe is deployed
#ifdef Z_PROBE_ENDSTOP
bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
if (z_probe_endstop)
#else
bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
if (z_min_endstop)
#endif
{
// Move to the start position to initiate deployment // Move to the start position to initiate deployment
destination[X_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_X; destination[X_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_1_X;
destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_Y; destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_1_Y;
destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_Z; destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_1_Z;
prepare_move_raw(); // this will also set_current_to_destination prepare_move_raw(); // this will also set_current_to_destination
// Home X to touch the belt // Move to engage deployment
feedrate = homing_feedrate[X_AXIS]/10; if (Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE != Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE) {
destination[X_AXIS] = 0; feedrate = Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE;
prepare_move_raw(); // this will also set_current_to_destination }
if (Z_PROBE_ALLEN_KEY_DEPLOY_2_X != Z_PROBE_ALLEN_KEY_DEPLOY_1_X) {
destination[X_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_2_X;
}
if (Z_PROBE_ALLEN_KEY_DEPLOY_2_Y != Z_PROBE_ALLEN_KEY_DEPLOY_1_Y) {
destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_2_Y;
}
if (Z_PROBE_ALLEN_KEY_DEPLOY_2_Z != Z_PROBE_ALLEN_KEY_DEPLOY_1_Z) {
destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_2_Z;
}
prepare_move_raw();
// Home Y for safety #ifdef Z_PROBE_ALLEN_KEY_DEPLOY_3_X
feedrate = homing_feedrate[X_AXIS]/2; if (Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE != Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE) {
destination[Y_AXIS] = 0; feedrate = Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE;
}
// Move to trigger deployment
if (Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE != Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE) {
feedrate = Z_PROBE_ALLEN_KEY_DEPLOY_3_FEEDRATE;
}
if (Z_PROBE_ALLEN_KEY_DEPLOY_3_X != Z_PROBE_ALLEN_KEY_DEPLOY_2_X) {
destination[X_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_3_X;
}
if (Z_PROBE_ALLEN_KEY_DEPLOY_3_Y != Z_PROBE_ALLEN_KEY_DEPLOY_2_Y) {
destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_3_Y;
}
if (Z_PROBE_ALLEN_KEY_DEPLOY_3_Z != Z_PROBE_ALLEN_KEY_DEPLOY_2_Z) {
destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_DEPLOY_3_Z;
}
prepare_move_raw();
#endif
}
// Partially Home X,Y for safety
destination[X_AXIS] = destination[X_AXIS]*0.75;
destination[Y_AXIS] = destination[Y_AXIS]*0.75;
prepare_move_raw(); // this will also set_current_to_destination prepare_move_raw(); // this will also set_current_to_destination
st_synchronize(); st_synchronize();
#ifdef Z_PROBE_ENDSTOP #ifdef Z_PROBE_ENDSTOP
bool z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING); z_probe_endstop = (READ(Z_PROBE_PIN) != Z_PROBE_ENDSTOP_INVERTING);
if (z_probe_endstop) if (z_probe_endstop)
#else #else
bool z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING); z_min_endstop = (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
if (z_min_endstop) if (z_min_endstop)
#endif #endif
{ {
@ -1366,25 +1407,41 @@ static void setup_for_endstop_move() {
#elif defined(Z_PROBE_ALLEN_KEY) #elif defined(Z_PROBE_ALLEN_KEY)
// Move up for safety // Move up for safety
feedrate = homing_feedrate[X_AXIS]; feedrate = Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE;
destination[Z_AXIS] = current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING; destination[Z_AXIS] = current_position[Z_AXIS] + Z_RAISE_AFTER_PROBING;
prepare_move_raw(); // this will also set_current_to_destination prepare_move_raw(); // this will also set_current_to_destination
// Move to the start position to initiate retraction // Move to the start position to initiate retraction
destination[X_AXIS] = Z_PROBE_ALLEN_KEY_STOW_X; destination[X_AXIS] = Z_PROBE_ALLEN_KEY_STOW_1_X;
destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_STOW_Y; destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_STOW_1_Y;
destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_STOW_Z; destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_STOW_1_Z;
prepare_move_raw(); // this will also set_current_to_destination prepare_move_raw();
// Move the nozzle down to push the probe into retracted position // Move the nozzle down to push the probe into retracted position
feedrate = homing_feedrate[Z_AXIS]/10; if (Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE != Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE) {
destination[Z_AXIS] = current_position[Z_AXIS] - Z_PROBE_ALLEN_KEY_STOW_DEPTH; feedrate = Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE;
prepare_move_raw(); // this will also set_current_to_destination }
if (Z_PROBE_ALLEN_KEY_STOW_2_X != Z_PROBE_ALLEN_KEY_STOW_1_X) {
destination[X_AXIS] = Z_PROBE_ALLEN_KEY_STOW_2_X;
}
if (Z_PROBE_ALLEN_KEY_STOW_2_Y != Z_PROBE_ALLEN_KEY_STOW_1_Y) {
destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_STOW_2_Y;
}
destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_STOW_2_Z;
prepare_move_raw();
// Move up for safety // Move up for safety
feedrate = homing_feedrate[Z_AXIS]/2; if (Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE != Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE) {
destination[Z_AXIS] = current_position[Z_AXIS] + Z_PROBE_ALLEN_KEY_STOW_DEPTH * 2; feedrate = Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE;
prepare_move_raw(); // this will also set_current_to_destination }
if (Z_PROBE_ALLEN_KEY_STOW_3_X != Z_PROBE_ALLEN_KEY_STOW_2_X) {
destination[X_AXIS] = Z_PROBE_ALLEN_KEY_STOW_3_X;
}
if (Z_PROBE_ALLEN_KEY_STOW_3_Y != Z_PROBE_ALLEN_KEY_STOW_2_Y) {
destination[Y_AXIS] = Z_PROBE_ALLEN_KEY_STOW_3_Y;
}
destination[Z_AXIS] = Z_PROBE_ALLEN_KEY_STOW_3_Z;
prepare_move_raw();
// Home XY for safety // Home XY for safety
feedrate = homing_feedrate[X_AXIS]/2; feedrate = homing_feedrate[X_AXIS]/2;

@ -507,14 +507,34 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
// Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN. // Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN.
#define Z_PROBE_ALLEN_KEY #define Z_PROBE_ALLEN_KEY
#ifdef Z_PROBE_ALLEN_KEY #ifdef Z_PROBE_ALLEN_KEY
#define Z_PROBE_ALLEN_KEY_DEPLOY_X 30
#define Z_PROBE_ALLEN_KEY_DEPLOY_Y DELTA_PRINTABLE_RADIUS
#define Z_PROBE_ALLEN_KEY_DEPLOY_Z 100
#define Z_PROBE_ALLEN_KEY_STOW_X -64 // Kossel Mini
#define Z_PROBE_ALLEN_KEY_STOW_Y 56 #define Z_PROBE_ALLEN_KEY_DEPLOY_1_X 30.0
#define Z_PROBE_ALLEN_KEY_STOW_Z 23 #define Z_PROBE_ALLEN_KEY_DEPLOY_1_Y DELTA_PRINTABLE_RADIUS
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_Z 100.0
#define Z_PROBE_ALLEN_KEY_DEPLOY_1_FEEDRATE XY_TRAVEL_SPEED
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_X 0.0
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_Y DELTA_PRINTABLE_RADIUS
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_Z 100.0
#define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_TRAVEL_SPEED/10)
#define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20 #define Z_PROBE_ALLEN_KEY_STOW_DEPTH 20
// Move the probe into position
#define Z_PROBE_ALLEN_KEY_STOW_1_X -64.0
#define Z_PROBE_ALLEN_KEY_STOW_1_Y 56.0
#define Z_PROBE_ALLEN_KEY_STOW_1_Z 23.0
#define Z_PROBE_ALLEN_KEY_STOW_1_FEEDRATE XY_TRAVEL_SPEED
// Move the nozzle down further to push the probe into retracted position.
#define Z_PROBE_ALLEN_KEY_STOW_2_X Z_PROBE_ALLEN_KEY_STOW_1_X
#define Z_PROBE_ALLEN_KEY_STOW_2_Y Z_PROBE_ALLEN_KEY_STOW_1_Y
#define Z_PROBE_ALLEN_KEY_STOW_2_Z (Z_PROBE_ALLEN_KEY_STOW_1_Z-Z_PROBE_ALLEN_KEY_STOW_DEPTH)
#define Z_PROBE_ALLEN_KEY_STOW_2_FEEDRATE (XY_TRAVEL_SPEED/10)
// Raise things back up slightly so we don't bump into anything
#define Z_PROBE_ALLEN_KEY_STOW_3_X Z_PROBE_ALLEN_KEY_STOW_2_X
#define Z_PROBE_ALLEN_KEY_STOW_3_Y Z_PROBE_ALLEN_KEY_STOW_2_Y
#define Z_PROBE_ALLEN_KEY_STOW_3_Z (Z_PROBE_ALLEN_KEY_STOW_1_Z+Z_PROBE_ALLEN_KEY_STOW_DEPTH)
#define Z_PROBE_ALLEN_KEY_STOW_3_FEEDRATE (XY_TRAVEL_SPEED/2)
#endif #endif
//If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk

Loading…
Cancel
Save