From 585c00a7287d431837ca305685a874e225d7d11d Mon Sep 17 00:00:00 2001 From: LVD-AC Date: Sat, 29 Apr 2017 16:36:33 +0200 Subject: [PATCH] Proposed changes This is what I did yesterday: - basicly gave the tests more comprehensive names; put all the declarations at the top; got rid of the magic negative C-value (renamed to P + A, O, T) - "cos(RADIANS(180 + 30 * axis)) * (1 + circles * 0.1 * ((zig_zag) ? 1 : -1)) * delta_calibration_radius" compiles wrong is zig_zag statement is without brackets - DELTA_TOWER_ANGLE_TRIM reset to 3 values (the calcs use the 3th value to normalize will not compile otherwise) -Wrote 3 dummies to keep EEPROM lenght the same -Reset the configs to the 'original' with autocal + menu disabled (but can be enabled of course) --- Marlin/Conditionals_post.h | 8 +- Marlin/Marlin_main.cpp | 176 +++++++++--------- Marlin/configuration_store.cpp | 12 +- .../FLSUN/auto_calibrate/Configuration.h | 32 ++-- .../delta/FLSUN/kossel_mini/Configuration.h | 20 +- .../delta/generic/Configuration.h | 22 ++- .../delta/kossel_mini/Configuration.h | 20 +- .../delta/kossel_pro/Configuration.h | 20 +- .../delta/kossel_xl/Configuration.h | 20 +- Marlin/ultralcd.cpp | 2 +- 10 files changed, 171 insertions(+), 161 deletions(-) diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index 6252ac5d3..07a0d0079 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -695,16 +695,16 @@ #define DELTA_CALIBRATION_RADIUS DELTA_PRINTABLE_RADIUS - 10 #endif #ifndef DELTA_ENDSTOP_ADJ - #define DELTA_ENDSTOP_ADJ { 0.0, 0.0, 0.0 } + #define DELTA_ENDSTOP_ADJ { 0, 0, 0 } #endif #ifndef DELTA_TOWER_ANGLE_TRIM - #define DELTA_TOWER_ANGLE_TRIM { 0.0, 0.0 } // C always 0.0 + #define DELTA_TOWER_ANGLE_TRIM {0, 0, 0} #endif #ifndef DELTA_RADIUS_TRIM_TOWER - #define DELTA_RADIUS_TRIM_TOWER { 0.0, 0.0, 0.0 } + #define DELTA_RADIUS_TRIM_TOWER {0, 0, 0} #endif #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER - #define DELTA_DIAGONAL_ROD_TRIM_TOWER { 0.0, 0.0, 0.0 } + #define DELTA_DIAGONAL_ROD_TRIM_TOWER {0, 0, 0} #endif #endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index dfb64a94d..5d533ea73 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -61,7 +61,7 @@ * G30 - Single Z probe, probes bed at X Y location (defaults to current XY location) * G31 - Dock sled (Z_PROBE_SLED only) * G32 - Undock sled (Z_PROBE_SLED only) - * G33 - Delta '4-7-point' auto calibration : "G33 C V" (Requires DELTA) + * G33 - Delta '1-4-7-point' auto calibration : "G33 P V" (Requires DELTA) * G38 - Probe target - similar to G28 except it uses the Z_MIN_PROBE for all three axes * G90 - Use Absolute Coordinates * G91 - Use Relative Coordinates @@ -4991,65 +4991,67 @@ inline void gcode_G28() { #if ENABLED(DELTA_AUTO_CALIBRATION) /** - * G33 - Delta Auto Calibration - * Utility to calibrate height, endstop offsets, delta radius, and tower angles. - * - * Parameters: - * - * C0 Calibrate height - * C1 Probe the center to set the Z height - * C-1 same but 1 iteration only - * C2 probe center and towers, set height, endstops, and delta radius - * C-2 same but opposite towers - * - * C3 probe all points: center, towers and opposite towers / sets all - * - * C4-C7 probe all points multiple times and average - * C0-C3 same but tower angle calibration disabled - * - * V0 Dry-run mode - * V1 Output settings - * V2 Output setting and probe results + * G33 - Delta '1-4-7-point' auto calibration (Requires DELTA) + * + * Usage: + * G33 + * + * Pn = n=-7 -> +7 : n*n probe points + * calibrates height ('1 point'), endstops, and delta radius ('4 points') + * and tower angles with n > 2 ('7+ points') + * n=1 probes center / sets height only + * n=2 probes center and towers / sets height, endstops and delta radius + * n=3 probes all points: center, towers and opposite towers / sets all + * n>3 probes all points multiple times and averages + * A = abort 1 point delta height calibration after 1 probe + * O = use oposite tower points instead of tower points with 4 point calibration + * T = do not calibrate tower angles with 7+ point calibration + * Vn = verbose level (n=0-2 default 1) + * n=0 dry-run mode: no calibration + * n=1 settings + * n=2 setting + probe results */ inline void gcode_G33() { - if (axis_unhomed_error(true, true, true)) return; - - const int8_t c_value = code_seen('C') ? code_value_int() : DELTA_CALIBRATION_DEFAULT_POINTS; - if (!WITHIN(c_value, -7, 7)) { - SERIAL_PROTOCOLLNPGM("?C parameter is implausible (-7 to 7)."); - return; - } - - const int8_t verbose_level = code_seen('V') ? code_value_byte() : 1; - if (!WITHIN(verbose_level, 0, 2)) { - SERIAL_PROTOCOLLNPGM("?(V)erbose Level is implausible (0-2)."); - return; - } - stepper.synchronize(); #if PLANNER_LEVELING set_bed_leveling_enabled(false); #endif + int8_t pp = code_seen('P') ? code_value_int() : DELTA_CALIBRATION_DEFAULT_POINTS, + probe_mode = (WITHIN(pp, 1, 7)) ? pp : DELTA_CALIBRATION_DEFAULT_POINTS; + + probe_mode = (code_seen('A') && probe_mode == 1) ? -probe_mode : probe_mode; + probe_mode = (code_seen('O') && probe_mode == 2) ? -probe_mode : probe_mode; + probe_mode = (code_seen('T') && probe_mode > 2) ? -probe_mode : probe_mode; + + int8_t verbose_level = code_seen('V') ? code_value_byte() : 1; + + if (!WITHIN(verbose_level, 0, 2)) verbose_level = 1; + + gcode_G28(); + const static char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h"; - - const uint8_t probe_points = abs(c_value); - - const bool neg = c_value < 0, - equals4 = probe_points == 4, - over4 = probe_points > 4, - over5 = probe_points > 5; - - float e_old[XYZ], + float test_precision, + zero_std_dev = verbose_level ? 999.0 : 0.0, // 0.0 in dry-run mode : forced end + e_old[XYZ] = { + endstop_adj[A_AXIS], + endstop_adj[B_AXIS], + endstop_adj[C_AXIS] + }, dr_old = delta_radius, zh_old = home_offset[Z_AXIS], alpha_old = delta_tower_angle_trim[A_AXIS], - beta_old = delta_tower_angle_trim[B_AXIS]; - - COPY(e_old, endstop_adj); - + beta_old = delta_tower_angle_trim[B_AXIS]; + int8_t iterations = 0, + probe_points = abs(probe_mode); + bool _1_point = (probe_points <= 1), + _7_point = (probe_mode > 2), + o_mode = (probe_mode == -2), + towers = (probe_points > 2 || probe_mode == 2), + opposites = (probe_points > 2 || o_mode); + // print settings SERIAL_PROTOCOLLNPGM("G33 Auto Calibrate"); @@ -5059,7 +5061,7 @@ inline void gcode_G28() { LCD_MESSAGEPGM("Checking... AC"); SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]); - if (probe_points > 1) { + if (!_1_point) { SERIAL_PROTOCOLPGM(" Ex:"); if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+'); SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2); @@ -5072,7 +5074,7 @@ inline void gcode_G28() { SERIAL_PROTOCOLPAIR(" Radius:", delta_radius); } SERIAL_EOL; - if (c_value > 2) { + if (_7_point) { SERIAL_PROTOCOLPGM(".Tower angle : Tx:"); if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+'); SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2); @@ -5087,62 +5089,70 @@ inline void gcode_G28() { DEPLOY_PROBE(); #endif - float zero_std_dev = verbose_level ? 999.0 : 0.0, // 0.0 in dry-run mode : forced end - test_precision; - int8_t iterations = 0; do { - setup_for_endstop_or_probe_move(); + float z_at_pt[13] = { 0 }, + S1 = z_at_pt[0], + S2 = sq(S1); + int16_t N = 1; + bool _4_probe = (probe_points == 2), + _7_probe = (probe_points > 2), + center_probe = (probe_points != 3 && probe_points != 6), + multi_circle = (probe_points > 4), + diff_circle = (probe_points > 5), + max_circle = (probe_points > 6), + intermediates = (probe_points == 4 || diff_circle); + setup_for_endstop_or_probe_move(); test_precision = zero_std_dev; - float z_at_pt[13] = { 0 }; iterations++; // probe the points int16_t center_points = 0; - if (probe_points != 3 && probe_points != 6) { // probe center + if (center_probe) { // probe centre z_at_pt[0] += probe_pt(0.0, 0.0 , true, 1); center_points = 1; } - int16_t step_axis = over4 ? 2 : 4; - if (probe_points >= 3) { // probe extra 3 or 6 center points - for (int8_t axis = over4 ? 11 : 9; axis > 0; axis -= step_axis) { + int16_t step_axis = (multi_circle) ? 2 : 4, + start = (multi_circle) ? 11 : 9; + if (_7_probe) { // probe extra 3 or 6 centre points + for (int8_t axis = start; axis > 0; axis -= step_axis) { z_at_pt[0] += probe_pt( cos(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius), sin(RADIANS(180 + 30 * axis)) * (0.1 * delta_calibration_radius), true, 1); } - center_points += over4 ? 6 : 3; // average center points + center_points += (multi_circle) ? 6 : 3; // average centre points z_at_pt[0] /= center_points; } - float S1 = z_at_pt[0], S2 = sq(S1); + start = (o_mode) ? 3 : 1; + step_axis = (_4_probe) ? 4 : (intermediates) ? 1 : 2; - int16_t N = 1, start = (c_value == -2) ? 3 : 1; - step_axis = (probe_points == 2) ? 4 : (equals4 || over5) ? 1 : 2; - - if (probe_points > 1) { - float start_circles = (probe_points > 6) ? -1.5 : over4 ? -1 : 0, // one or multi radius points - end_circles = -start_circles; + if (!_1_point) { + float start_circles = (max_circle) ? -1.5 : (multi_circle) ? -1 : 0, // one or multi radius points + end_circles = -start_circles; bool zig_zag = true; for (uint8_t axis = start; axis < 13; axis += step_axis) { // probes 3, 6 or 12 points on the calibration radius for (float circles = start_circles ; circles <= end_circles; circles++) // one or multi radius points z_at_pt[axis] += probe_pt( - cos(RADIANS(180 + 30 * axis)) * ((1 + circles * 0.1 * (zig_zag ? 1 : -1)) * delta_calibration_radius), - sin(RADIANS(180 + 30 * axis)) * ((1 + circles * 0.1 * (zig_zag ? 1 : -1)) * delta_calibration_radius), true, 1); + cos(RADIANS(180 + 30 * axis)) * (1 + circles * 0.1 * ((zig_zag) ? 1 : -1)) * delta_calibration_radius, + sin(RADIANS(180 + 30 * axis)) * (1 + circles * 0.1 * ((zig_zag) ? 1 : -1)) * delta_calibration_radius, true, 1); - if (over5) start_circles += zig_zag ? +0.5 : -0.5; // opposites: one radius point less - if (over5) end_circles += zig_zag ? -0.5 : +0.5; + if (diff_circle) { + start_circles += (zig_zag) ? 0.5 : -0.5; // opposites: one radius point less + end_circles = -start_circles; + } zig_zag = !zig_zag; - if (over4) z_at_pt[axis] /= (zig_zag ? 3.0 : 2.0); // average between radius points + if (multi_circle) z_at_pt[axis] /= (zig_zag) ? 3.0 : 2.0; // average between radius points } } + if (intermediates) step_axis = 2; - if (equals4 || over5) step_axis = 2; for (uint8_t axis = start; axis < 13; axis += step_axis) { // average half intermediates to towers and opposites - if (equals4 || over5) + if (intermediates) z_at_pt[axis] = (z_at_pt[axis] + (z_at_pt[axis + 1] + z_at_pt[(axis + 10) % 12 + 1]) / 2.0) / 2.0; S1 += z_at_pt[axis]; @@ -5181,7 +5191,7 @@ inline void gcode_G28() { #define Z0444(I) ZP(a_factor * 4.0 / 9.0, I) #define Z0888(I) ZP(a_factor * 8.0 / 9.0, I) - switch (c_value) { + switch (probe_mode) { case -1: test_precision = 0.00; case 1: @@ -5207,8 +5217,8 @@ inline void gcode_G28() { e_delta[Y_AXIS] = Z1050(0) - Z0175(1) + Z0350(5) - Z0175(9) + Z0175(7) - Z0350(11) + Z0175(3); e_delta[Z_AXIS] = Z1050(0) - Z0175(1) - Z0175(5) + Z0350(9) + Z0175(7) + Z0175(11) - Z0350(3); r_delta = Z2250(0) - Z0375(1) - Z0375(5) - Z0375(9) - Z0375(7) - Z0375(11) - Z0375(3); - - if (c_value > 0) { //probe points negative disables tower angles + + if (probe_mode > 0) { //probe points negative disables tower angles t_alpha = + Z0444(1) - Z0888(5) + Z0444(9) + Z0444(7) - Z0888(11) + Z0444(3); t_beta = - Z0888(1) + Z0444(5) + Z0444(9) - Z0888(7) + Z0444(11) + Z0444(3); } @@ -5241,10 +5251,10 @@ inline void gcode_G28() { // print report if (verbose_level == 2) { - SERIAL_PROTOCOLPGM(". c:"); + SERIAL_PROTOCOLPGM(". c:"); if (z_at_pt[0] > 0) SERIAL_CHAR('+'); SERIAL_PROTOCOL_F(z_at_pt[0], 2); - if (probe_points > 2 || c_value == 2) { + if (towers) { SERIAL_PROTOCOLPGM(" x:"); if (z_at_pt[1] >= 0) SERIAL_CHAR('+'); SERIAL_PROTOCOL_F(z_at_pt[1], 2); @@ -5255,9 +5265,9 @@ inline void gcode_G28() { if (z_at_pt[9] >= 0) SERIAL_CHAR('+'); SERIAL_PROTOCOL_F(z_at_pt[9], 2); } - if (c_value != -2) SERIAL_EOL; - if (probe_points > 2 || c_value == -2) { - if (probe_points > 2) { + if (!o_mode) SERIAL_EOL; + if (opposites) { + if (_7_probe) { SERIAL_CHAR('.'); SERIAL_PROTOCOL_SP(12); } @@ -5293,7 +5303,7 @@ inline void gcode_G28() { lcd_setstatus(mess); } SERIAL_PROTOCOLPAIR(".Height:", DELTA_HEIGHT + home_offset[Z_AXIS]); - if (probe_points > 1) { + if (!_1_point) { SERIAL_PROTOCOLPGM(" Ex:"); if (endstop_adj[A_AXIS] >= 0) SERIAL_CHAR('+'); SERIAL_PROTOCOL_F(endstop_adj[A_AXIS], 2); @@ -5306,7 +5316,7 @@ inline void gcode_G28() { SERIAL_PROTOCOLPAIR(" Radius:", delta_radius); } SERIAL_EOL; - if (c_value > 2) { + if (_7_point) { SERIAL_PROTOCOLPGM(".Tower angle : Tx:"); if (delta_tower_angle_trim[A_AXIS] >= 0) SERIAL_CHAR('+'); SERIAL_PROTOCOL_F(delta_tower_angle_trim[A_AXIS], 2); diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index 3d2ca2bb4..41460bc2f 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -42,7 +42,7 @@ #define EEPROM_OFFSET 100 /** - * V33 EEPROM Layout: + * V35 EEPROM Layout: * * 100 Version (char x4) * 104 EEPROM Checksum (uint16_t) @@ -410,8 +410,10 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(delta_radius); // 1 float EEPROM_WRITE(delta_diagonal_rod); // 1 float EEPROM_WRITE(delta_segments_per_second); // 1 float - EEPROM_WRITE(delta_calibration_radius); // 1 floats + EEPROM_WRITE(delta_calibration_radius); // 1 float EEPROM_WRITE(delta_tower_angle_trim); // 2 floats + dummy = 0.0f; + for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy); #elif ENABLED(Z_DUAL_ENDSTOPS) EEPROM_WRITE(z_endstop_adj); // 1 float dummy = 0.0f; @@ -778,8 +780,10 @@ void MarlinSettings::postprocess() { EEPROM_READ(delta_radius); // 1 float EEPROM_READ(delta_diagonal_rod); // 1 float EEPROM_READ(delta_segments_per_second); // 1 float - EEPROM_READ(delta_calibration_radius); // 1 floats + EEPROM_READ(delta_calibration_radius); // 1 float EEPROM_READ(delta_tower_angle_trim); // 2 floats + dummy = 0.0f; + for (uint8_t q=3; q--;) EEPROM_READ(dummy); #elif ENABLED(Z_DUAL_ENDSTOPS) EEPROM_READ(z_endstop_adj); dummy = 0.0f; @@ -1066,7 +1070,7 @@ void MarlinSettings::reset() { #if ENABLED(DELTA) const float adj[ABC] = DELTA_ENDSTOP_ADJ, - dta[2] = DELTA_TOWER_ANGLE_TRIM; + dta[ABC] = DELTA_TOWER_ANGLE_TRIM; COPY(endstop_adj, adj); delta_radius = DELTA_RADIUS; delta_diagonal_rod = DELTA_DIAGONAL_ROD; diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index 186161b87..df845e487 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -450,21 +450,12 @@ // Center-to-center distance of the holes in the diagonal push rods. #define DELTA_DIAGONAL_ROD 218.0 // mm -/* - // Horizontal offset from middle of printer to smooth rod center. - #define DELTA_SMOOTH_ROD_OFFSET 150.0 // mm - // Horizontal offset of the universal joints on the end effector. - #define DELTA_EFFECTOR_OFFSET 24.0 // mm - - // Horizontal offset of the universal joints on the carriages. - #define DELTA_CARRIAGE_OFFSET 22.0 // mm -*/ // Horizontal distance bridged by diagonal push rods when effector is centered. #define DELTA_RADIUS 100.00 //mm // get this value from auto calibrate - // height from z=0.00 to home position - #define DELTA_HEIGHT 295.00 // get this value from auto calibrate - use G33 C-1 at 1st time calibration + // height from z=0 to home position + #define DELTA_HEIGHT 295.00 // get this value from auto calibrate - use G33 P1 A at 1st time calibration // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). #define DELTA_PRINTABLE_RADIUS 85.0 @@ -486,16 +477,16 @@ // After homing move down to a height where XY movement is unconstrained #define DELTA_HOME_TO_SAFE_ZONE - #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate + #define DELTA_ENDSTOP_ADJ { 0, 0, 0 } // get these from auto calibrate // Trim adjustments for individual towers // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0 // measured in degrees anticlockwise looking from above the printer - #define DELTA_TOWER_ANGLE_TRIM { 0.00, 0.00 } // get these from auto calibrate + #define DELTA_TOWER_ANGLE_TRIM { 0, 0, 0 } // get these from auto calibrate // delta radius and diaginal rod adjustments measured in mm - //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0} - //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0} + //#define DELTA_RADIUS_TRIM_TOWER {0, 0, 0} + //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0, 0, 0} #endif @@ -604,7 +595,7 @@ #define DEFAULT_XJERK 20.0 #define DEFAULT_YJERK DEFAULT_XJERK #define DEFAULT_ZJERK DEFAULT_YJERK // Must be same as XY for delta -#define DEFAULT_EJERK 5.0 +#define DEFAULT_EJERK 5.0 /** @@ -670,6 +661,9 @@ * is enabled then it also applies to Z_PROBE_SPEED_SLOW. */ +// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) +//#define SOLENOID_PROBE + // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell. //#define Z_PROBE_SLED //#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. @@ -704,7 +698,7 @@ #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z // Speed for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 6) +#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST) / 6 // Use double touch for probing //#define PROBE_DOUBLE_TOUCH @@ -728,7 +722,7 @@ #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_PROBE_SPEED/10) + #define Z_PROBE_ALLEN_KEY_DEPLOY_2_FEEDRATE (XY_PROBE_SPEED)/10 #define Z_PROBE_ALLEN_KEY_DEPLOY_3_X Z_PROBE_ALLEN_KEY_DEPLOY_2_X * 0.75 #define Z_PROBE_ALLEN_KEY_DEPLOY_3_Y Z_PROBE_ALLEN_KEY_DEPLOY_2_Y * 0.75 @@ -868,7 +862,7 @@ #define INVERT_Y_DIR true #define INVERT_Z_DIR true -// Enable this option for Toshiba steppers +// Enable this option for Toshiba steppers drivers //#define CONFIG_STEPPERS_TOSHIBA // @section extruder diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index 167deb36a..bca6a13cc 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -448,7 +448,7 @@ // Center-to-center distance of the holes in the diagonal push rods. #define DELTA_DIAGONAL_ROD 218.0 // mm -/* + // Horizontal offset from middle of printer to smooth rod center. #define DELTA_SMOOTH_ROD_OFFSET 150.0 // mm @@ -457,9 +457,9 @@ // Horizontal offset of the universal joints on the carriages. #define DELTA_CARRIAGE_OFFSET 22.0 // mm -*/ + // Horizontal distance bridged by diagonal push rods when effector is centered. - #define DELTA_RADIUS 104 //mm // get this value from auto calibrate + #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm // get this value from auto calibrate // height from z=0.00 to home position #define DELTA_HEIGHT 280 // get this value from auto calibrate - use G33 C-1 at 1st time calibration @@ -470,30 +470,30 @@ // Delta calibration menu // uncomment to add three points calibration menu option. // See http://minow.blogspot.com/index.html#4918805519571907051 - #define DELTA_CALIBRATION_MENU + //#define DELTA_CALIBRATION_MENU // set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 17) // mm // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) - #define DELTA_AUTO_CALIBRATION + //#define DELTA_AUTO_CALIBRATION #if ENABLED(DELTA_AUTO_CALIBRATION) #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (-7 -> +7) #endif // After homing move down to a height where XY movement is unconstrained - #define DELTA_HOME_TO_SAFE_ZONE + //#define DELTA_HOME_TO_SAFE_ZONE - #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate + #define DELTA_ENDSTOP_ADJ { 0, 0, 0 } // get these from auto calibrate // Trim adjustments for individual towers // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0 // measured in degrees anticlockwise looking from above the printer - #define DELTA_TOWER_ANGLE_TRIM { 0.00, 0.00 } // get these from auto calibrate + #define DELTA_TOWER_ANGLE_TRIM { 0, 0, 0 } // get these from auto calibrate // delta radius and diaginal rod adjustments measured in mm - //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0} - //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0} + //#define DELTA_RADIUS_TRIM_TOWER {0, 0, 0} + //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0, 0, 0} #endif diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 310498f21..2ec624fbb 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -438,7 +438,7 @@ // Center-to-center distance of the holes in the diagonal push rods. #define DELTA_DIAGONAL_ROD 250.0 // mm -/* + // Horizontal offset from middle of printer to smooth rod center. #define DELTA_SMOOTH_ROD_OFFSET 175.0 // mm @@ -447,9 +447,11 @@ // Horizontal offset of the universal joints on the carriages. #define DELTA_CARRIAGE_OFFSET 18.0 // mm -*/ + // Horizontal distance bridged by diagonal push rods when effector is centered. - #define DELTA_RADIUS 125 //mm // get this value from auto calibrate // height from z=0.00 to home position + #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm // get this value from auto calibrate // height from z=0.00 to home position + + // height from z=0.00 to home position #define DELTA_HEIGHT 250 // get this value from auto calibrate - use G33 C-1 at 1st time calibration // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers). @@ -457,30 +459,30 @@ // Delta calibration menu // See http://minow.blogspot.com/index.html#4918805519571907051 - #define DELTA_CALIBRATION_MENU + //#define DELTA_CALIBRATION_MENU // set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 28) // mm // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) - #define DELTA_AUTO_CALIBRATION + //#define DELTA_AUTO_CALIBRATION #if ENABLED(DELTA_AUTO_CALIBRATION) #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (-7 -> +7) #endif // After homing move down to a height where XY movement is unconstrained - #define DELTA_HOME_TO_SAFE_ZONE + //#define DELTA_HOME_TO_SAFE_ZONE - #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate + #define DELTA_ENDSTOP_ADJ { 0, 0, 0 } // get these from auto calibrate // Trim adjustments for individual towers // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0 // measured in degrees anticlockwise looking from above the printer - #define DELTA_TOWER_ANGLE_TRIM { 0.00, 0.00 } // get these from auto calibrate + #define DELTA_TOWER_ANGLE_TRIM { 0, 0, 0 } // get these from auto calibrate // delta radius and diaginal rod adjustments measured in mm - //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0} - //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0} + //#define DELTA_RADIUS_TRIM_TOWER {0, 0, 0} + //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0, 0, 0} #endif diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 77f49f314..54eb2f00a 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -438,7 +438,7 @@ // Center-to-center distance of the holes in the diagonal push rods. #define DELTA_DIAGONAL_ROD 215.0 // mm -/* + // Horizontal offset from middle of printer to smooth rod center. #define DELTA_SMOOTH_ROD_OFFSET 145.0 // mm @@ -447,9 +447,9 @@ // Horizontal offset of the universal joints on the carriages. #define DELTA_CARRIAGE_OFFSET 19.5 // mm -*/ + // Horizontal distance bridged by diagonal push rods when effector is centered. - #define DELTA_RADIUS 105 //mm // get this value from auto calibrate + #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm // get this value from auto calibrate // height from z=0.00 to home position #define DELTA_HEIGHT 250 // get this value from auto calibrate - use G33 C-1 at 1st time calibration @@ -459,30 +459,30 @@ // Delta calibration menu // See http://minow.blogspot.com/index.html#4918805519571907051 - #define DELTA_CALIBRATION_MENU + //#define DELTA_CALIBRATION_MENU // set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 18) // mm // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) - #define DELTA_AUTO_CALIBRATION + //#define DELTA_AUTO_CALIBRATION #if ENABLED(DELTA_AUTO_CALIBRATION) #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (-7 -> +7) #endif // After homing move down to a height where XY movement is unconstrained - #define DELTA_HOME_TO_SAFE_ZONE + //#define DELTA_HOME_TO_SAFE_ZONE - #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate + #define DELTA_ENDSTOP_ADJ { 0, 0, 0 } // get these from auto calibrate // Trim adjustments for individual towers // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0 // measured in degrees anticlockwise looking from above the printer - #define DELTA_TOWER_ANGLE_TRIM { 0.00, 0.00 } // get these from auto calibrate + #define DELTA_TOWER_ANGLE_TRIM { 0, 0, 0 } // get these from auto calibrate // delta radius and diaginal rod adjustments measured in mm - //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0} - //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0} + //#define DELTA_RADIUS_TRIM_TOWER {0, 0, 0} + //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0, 0, 0} #endif diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index d70817975..ca41cd4e6 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -425,7 +425,7 @@ // Center-to-center distance of the holes in the diagonal push rods. #define DELTA_DIAGONAL_ROD 301.0 // mm -/* + // Horizontal offset from middle of printer to smooth rod center. #define DELTA_SMOOTH_ROD_OFFSET 212.357 // mm @@ -434,9 +434,9 @@ // Horizontal offset of the universal joints on the carriages. #define DELTA_CARRIAGE_OFFSET 30.0 // mm -*/ + // Horizontal distance bridged by diagonal push rods when effector is centered. - #define DELTA_RADIUS 150 //mm // get this value from auto calibrate + #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm // get this value from auto calibrate // height from z=0.00 to home position #define DELTA_HEIGHT 277 // get this value from auto calibrate - use G33 C-1 at 1st time calibration @@ -446,30 +446,30 @@ // Delta calibration menu // See http://minow.blogspot.com/index.html#4918805519571907051 - #define DELTA_CALIBRATION_MENU + //#define DELTA_CALIBRATION_MENU // set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 25.4) // mm // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) - #define DELTA_AUTO_CALIBRATION + //#define DELTA_AUTO_CALIBRATION #if ENABLED(DELTA_AUTO_CALIBRATION) #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (-7 -> +7) #endif // After homing move down to a height where XY movement is unconstrained - #define DELTA_HOME_TO_SAFE_ZONE + //#define DELTA_HOME_TO_SAFE_ZONE - #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate + #define DELTA_ENDSTOP_ADJ { 0, 0, 0 } // get these from auto calibrate // Trim adjustments for individual towers // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0 // measured in degrees anticlockwise looking from above the printer - #define DELTA_TOWER_ANGLE_TRIM { 0.00, 0.00 } // get these from auto calibrate + #define DELTA_TOWER_ANGLE_TRIM { 0, 0, 0 } // get these from auto calibrate // delta radius and diaginal rod adjustments measured in mm - //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0} - //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0} + //#define DELTA_RADIUS_TRIM_TOWER {0, 0, 0} + //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0, 0, 0} #endif diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index b71e8bf73..d632c207b 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -443,7 +443,7 @@ // Center-to-center distance of the holes in the diagonal push rods. #define DELTA_DIAGONAL_ROD 317.3 + 2.5 // mm -/* + // Horizontal offset from middle of printer to smooth rod center. #define DELTA_SMOOTH_ROD_OFFSET 220.1 // mm @@ -452,9 +452,9 @@ // Horizontal offset of the universal joints on the carriages. #define DELTA_CARRIAGE_OFFSET 22.0 // mm -*/ + // Horizontal distance bridged by diagonal push rods when effector is centered. - #define DELTA_RADIUS 175 //mm // get this value from auto calibrate + #define DELTA_RADIUS (DELTA_SMOOTH_ROD_OFFSET - DELTA_EFFECTOR_OFFSET - DELTA_CARRIAGE_OFFSET) //mm // get this value from auto calibrate // height from z=0.00 to home position #define DELTA_HEIGHT 380 // get this value from auto calibrate - use G33 C-1 at 1st time calibration @@ -464,30 +464,30 @@ // Delta calibration menu // See http://minow.blogspot.com/index.html#4918805519571907051 - #define DELTA_CALIBRATION_MENU + //#define DELTA_CALIBRATION_MENU // set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 28) // mm // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results) - #define DELTA_AUTO_CALIBRATION + //#define DELTA_AUTO_CALIBRATION #if ENABLED(DELTA_AUTO_CALIBRATION) #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (-7 -> +7) #endif // After homing move down to a height where XY movement is unconstrained - #define DELTA_HOME_TO_SAFE_ZONE + //#define DELTA_HOME_TO_SAFE_ZONE - #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate + #define DELTA_ENDSTOP_ADJ { 0, 0, 0 } // get these from auto calibrate // Trim adjustments for individual towers // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0 // measured in degrees anticlockwise looking from above the printer - #define DELTA_TOWER_ANGLE_TRIM { 0.00, 0.00 } // get these from auto calibrate + #define DELTA_TOWER_ANGLE_TRIM { 0, 0, 0 } // get these from auto calibrate // delta radius and diaginal rod adjustments measured in mm - //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0} - //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0} + //#define DELTA_RADIUS_TRIM_TOWER {0, 0, 0} + //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0, 0, 0} #endif diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index d524ad9dd..9ec06275f 100755 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -1834,7 +1834,7 @@ void kill_screen(const char* lcd_msg) { MENU_BACK(MSG_MAIN); #if ENABLED(DELTA_AUTO_CALIBRATION) MENU_ITEM(gcode, MSG_DELTA_AUTO_CALIBRATE, PSTR("G33")); - MENU_ITEM(gcode, MSG_DELTA_HEIGHT_CALIBRATE, PSTR("G33 C-1")); + MENU_ITEM(gcode, MSG_DELTA_HEIGHT_CALIBRATE, PSTR("G33 P1 A")); #endif MENU_ITEM(submenu, MSG_AUTO_HOME, _lcd_delta_calibrate_home); if (axis_homed[Z_AXIS]) {