X max lowered to 250, XYZ/Z calibration: Z top coordinate changed, changes in xyz cal. because of stell sheet, still not final version

This commit is contained in:
PavelSindler 2017-11-12 11:30:06 +01:00
parent a81d28664f
commit fbbcc27f1a
8 changed files with 51 additions and 30 deletions

View File

@ -46,7 +46,7 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
#define MANUAL_Z_HOME_POS 0.2
// Travel limits after homing
#define X_MAX_POS 255
#define X_MAX_POS 250
#define X_MIN_POS 0
#define Y_MAX_POS 210
#define Y_MIN_POS -12 //orig -4

View File

@ -1461,6 +1461,8 @@ inline void gcode_M900() {
bool calibrate_z_auto()
{
//lcd_display_message_fullscreen_P(MSG_CALIBRATE_Z_AUTO);
lcd_implementation_clear();
lcd_print_at_PGM(0,1, MSG_CALIBRATE_Z_AUTO);
bool endstops_enabled = enable_endstops(true);
int axis_up_dir = -home_dir(Z_AXIS);
tmc2130_home_enter(Z_AXIS_MASK);
@ -1484,7 +1486,7 @@ bool calibrate_z_auto()
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
st_synchronize();
enable_endstops(endstops_enabled);
current_position[Z_AXIS] = Z_MAX_POS-3.f;
current_position[Z_AXIS] = Z_MAX_POS+2.0;
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
return true;
}

View File

@ -530,6 +530,11 @@ const char * const MSG_CALIBRATE_PINDA_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_CALIBRATE_PINDA_DE
};
const char MSG_CALIBRATE_Z_AUTO_EN[] PROGMEM = "Calibrating Z";
const char * const MSG_CALIBRATE_Z_AUTO_LANG_TABLE[1] PROGMEM = {
MSG_CALIBRATE_Z_AUTO_EN
};
const char MSG_CALIBRATION_PINDA_MENU_EN[] PROGMEM = "Temp. calibration";
const char MSG_CALIBRATION_PINDA_MENU_CZ[] PROGMEM = "Teplot. kalibrace";
const char MSG_CALIBRATION_PINDA_MENU_IT[] PROGMEM = "Taratura temp.";
@ -2077,6 +2082,11 @@ const char * const MSG_PINDA_PREHEAT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_PINDA_PREHEAT_DE
};
const char MSG_PLACE_STEEL_SHEET_EN[] PROGMEM = "Please place steel sheet on heatbed.";
const char * const MSG_PLACE_STEEL_SHEET_LANG_TABLE[1] PROGMEM = {
MSG_PLACE_STEEL_SHEET_EN
};
const char MSG_PLANNER_BUFFER_BYTES_EN[] PROGMEM = " PlannerBufferBytes: ";
const char * const MSG_PLANNER_BUFFER_BYTES_LANG_TABLE[1] PROGMEM = {
MSG_PLANNER_BUFFER_BYTES_EN
@ -2283,6 +2293,11 @@ const char * const MSG_REFRESH_LANG_TABLE[1] PROGMEM = {
MSG_REFRESH_EN
};
const char MSG_REMOVE_STEEL_SHEET_EN[] PROGMEM = "Please remove steel sheet.";
const char * const MSG_REMOVE_STEEL_SHEET_LANG_TABLE[1] PROGMEM = {
MSG_REMOVE_STEEL_SHEET_EN
};
const char MSG_RESEND_EN[] PROGMEM = "Resend: ";
const char * const MSG_RESEND_LANG_TABLE[1] PROGMEM = {
MSG_RESEND_EN

View File

@ -112,6 +112,8 @@ extern const char* const MSG_CALIBRATE_E_LANG_TABLE[LANG_NUM];
#define MSG_CALIBRATE_E LANG_TABLE_SELECT(MSG_CALIBRATE_E_LANG_TABLE)
extern const char* const MSG_CALIBRATE_PINDA_LANG_TABLE[LANG_NUM];
#define MSG_CALIBRATE_PINDA LANG_TABLE_SELECT(MSG_CALIBRATE_PINDA_LANG_TABLE)
extern const char* const MSG_CALIBRATE_Z_AUTO_LANG_TABLE[1];
#define MSG_CALIBRATE_Z_AUTO LANG_TABLE_SELECT_EXPLICIT(MSG_CALIBRATE_Z_AUTO_LANG_TABLE, 0)
extern const char* const MSG_CALIBRATION_PINDA_MENU_LANG_TABLE[LANG_NUM];
#define MSG_CALIBRATION_PINDA_MENU LANG_TABLE_SELECT(MSG_CALIBRATION_PINDA_MENU_LANG_TABLE)
extern const char* const MSG_CARD_MENU_LANG_TABLE[LANG_NUM];
@ -404,6 +406,8 @@ extern const char* const MSG_PINDA_NOT_CALIBRATED_LANG_TABLE[LANG_NUM];
#define MSG_PINDA_NOT_CALIBRATED LANG_TABLE_SELECT(MSG_PINDA_NOT_CALIBRATED_LANG_TABLE)
extern const char* const MSG_PINDA_PREHEAT_LANG_TABLE[LANG_NUM];
#define MSG_PINDA_PREHEAT LANG_TABLE_SELECT(MSG_PINDA_PREHEAT_LANG_TABLE)
extern const char* const MSG_PLACE_STEEL_SHEET_LANG_TABLE[1];
#define MSG_PLACE_STEEL_SHEET LANG_TABLE_SELECT_EXPLICIT(MSG_PLACE_STEEL_SHEET_LANG_TABLE, 0)
extern const char* const MSG_PLANNER_BUFFER_BYTES_LANG_TABLE[1];
#define MSG_PLANNER_BUFFER_BYTES LANG_TABLE_SELECT_EXPLICIT(MSG_PLANNER_BUFFER_BYTES_LANG_TABLE, 0)
extern const char* const MSG_PLA_FILAMENT_LOADED_LANG_TABLE[1];
@ -446,6 +450,8 @@ extern const char* const MSG_RECTRACT_LANG_TABLE[1];
#define MSG_RECTRACT LANG_TABLE_SELECT_EXPLICIT(MSG_RECTRACT_LANG_TABLE, 0)
extern const char* const MSG_REFRESH_LANG_TABLE[1];
#define MSG_REFRESH LANG_TABLE_SELECT_EXPLICIT(MSG_REFRESH_LANG_TABLE, 0)
extern const char* const MSG_REMOVE_STEEL_SHEET_LANG_TABLE[1];
#define MSG_REMOVE_STEEL_SHEET LANG_TABLE_SELECT_EXPLICIT(MSG_REMOVE_STEEL_SHEET_LANG_TABLE, 0)
extern const char* const MSG_RESEND_LANG_TABLE[1];
#define MSG_RESEND LANG_TABLE_SELECT_EXPLICIT(MSG_RESEND_LANG_TABLE, 0)
extern const char* const MSG_RESET_CALIBRATE_E_LANG_TABLE[1];

View File

@ -338,7 +338,13 @@
#define(lenght=20, lines=2) MSG_PLA_FILAMENT_LOADED "Is PLA filament loaded?"
#define(lenght=20, lines=4) MSG_PLEASE_LOAD_PLA "Please load PLA filament first."
//messages bellow has no translation yet
#define MSG_CRASHDETECT_OFF "Crash det. [off]"
#define MSG_CRASHDETECT_ON "Crash det. [on]"
#define MSG_FSENSOR_OFF "Fil. sensor [off]"
#define MSG_FSENSOR_ON "Fil. sensor [on]"
#define MSG_FSENSOR_ON "Fil. sensor [on]"
#define(length=20, lines=4) MSG_PLACE_STEEL_SHEET "Please place steel sheet on heatbed."
#define MSG_REMOVE_STEEL_SHEET "Please remove steel sheet."
#define(length=20, lines=2) MSG_CALIBRATE_Z_AUTO "Calibrating Z"

View File

@ -2294,6 +2294,13 @@ BedSkewOffsetDetectionResultType improve_bed_offset_and_skew(int8_t method, int8
}
#endif // SUPPORT_VERBOSITY
//make space
current_position[Z_AXIS] += 150;
go_to_current(homing_feedrate[Z_AXIS] / 60);
//plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate, active_extruder););
lcd_show_fullscreen_message_and_wait_P(MSG_PLACE_STEEL_SHEET);
// Sample Z heights for the mesh bed leveling.
// In addition, store the results into an eeprom, to be used later for verification of the bed leveling process.
if (! sample_mesh_and_store_reference())

View File

@ -2390,6 +2390,8 @@ void lcd_wait_for_cool_down() {
// Lets the user move the Z carriage up to the end stoppers.
// When done, it sets the current Z to Z_MAX_POS and returns true.
// Otherwise the Z calibration is not changed and false is returned.
#ifndef TMC2130
bool lcd_calibrate_z_end_stop_manual(bool only_z)
{
bool clean_nozzle_asked = false;
@ -2481,6 +2483,8 @@ canceled:
return false;
}
#endif // TMC2130
static inline bool pgm_is_whitespace(const char *c_addr)
{
const char c = pgm_read_byte(c_addr);
@ -5398,8 +5402,6 @@ static bool lcd_selfcheck_axis_sg(char axis) {
case 1: axis_length = Y_MAX_POS + 8; break;
default: axis_length = 210; break;
}
SERIAL_ECHOPGM("Current position 1:");
MYSERIAL.println(current_position[axis]);
#ifdef TMC2130
tmc2130_home_exit();
@ -5407,18 +5409,12 @@ static bool lcd_selfcheck_axis_sg(char axis) {
#endif
for (char i = 0; i < 2; i++) {
SERIAL_ECHOPGM("i = ");
MYSERIAL.println(int(i));
SERIAL_ECHOPGM("Current position 2:");
MYSERIAL.println(current_position[axis]);
#ifdef TMC2130
tmc2130_home_enter(X_AXIS_MASK << axis);
#endif
current_position[axis] -= (axis_length + margin);
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
current_position[axis] -= (axis_length + margin);
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
st_synchronize();
@ -5430,10 +5426,6 @@ static bool lcd_selfcheck_axis_sg(char axis) {
current_position_init = st_get_position_mm(axis);
SERIAL_ECHOPGM("Current position init:");
MYSERIAL.print(current_position_init);
SERIAL_ECHOPGM("; ");
MYSERIAL.println(current_position[axis]);
if (i < 1) {
current_position[axis] += 2 * margin;
@ -5452,23 +5444,14 @@ static bool lcd_selfcheck_axis_sg(char axis) {
//plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
current_position_final = st_get_position_mm(axis);
SERIAL_ECHOPGM("Current position final:");
MYSERIAL.print(current_position_final);
SERIAL_ECHOPGM("; ");
MYSERIAL.println(current_position[axis]);
current_position[axis] -= margin;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
st_synchronize();
SERIAL_ECHOPGM("Current position 3:");
MYSERIAL.println(current_position[axis]);
}
measured_axis_length[i] = abs(current_position_final - current_position_init);
SERIAL_ECHOPGM("Measured axis length:");
MYSERIAL.println(measured_axis_length[i]);
//SERIAL_ECHOPGM("Measured axis length:");
//MYSERIAL.println(measured_axis_length[i]);
if (abs(measured_axis_length[i] - axis_length) > max_error_mm) {
//axis length
#ifdef TMC2130
@ -5487,8 +5470,8 @@ static bool lcd_selfcheck_axis_sg(char axis) {
}
}
SERIAL_ECHOPGM("Axis length difference:");
MYSERIAL.println(abs(measured_axis_length[0] - measured_axis_length[1]));
//SERIAL_ECHOPGM("Axis length difference:");
//MYSERIAL.println(abs(measured_axis_length[0] - measured_axis_length[1]));
if (abs(measured_axis_length[0] - measured_axis_length[1]) > 1) {
//loose pulleys

View File

@ -58,7 +58,9 @@ void lcd_mylang();
extern int8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, bool default_yes = false);
// Ask the user to move the Z axis up to the end stoppers and let
// the user confirm that it has been done.
#ifndef TMC2130
extern bool lcd_calibrate_z_end_stop_manual(bool only_z);
#endif
// Show the result of the calibration process on the LCD screen.
extern void lcd_bed_calibration_show_result(BedSkewOffsetDetectionResultType result, uint8_t point_too_far_mask);