Преглед изворни кода

M665 rework and related issues (all delta's)

- Making M665 compatible with repetier (see
http://reprap.org/wiki/G_code#M665:_Set_delta_configuration)

- M665 B also sets the radius for manual calibration menu

- Converting tower ajustment definitions to arrays - tower angle
corrections compatible with Esher 3D wizzard

- Only tower angles need to be adjustable with M665 and stored to EEPROM
- tower radius and diag rod can be adjusted in the FW only with #define
LVD-AC пре 8 година
родитељ
комит
13c8493878

+ 10
- 33
Marlin/Conditionals_post.h Прегледај датотеку

@@ -691,43 +691,20 @@
691 691
    * Delta radius/rod trimmers/angle trimmers
692 692
    */
693 693
   #if ENABLED(DELTA)
694
-    #ifndef DELTA_ENDSTOP_ADJ
695
-      #define DELTA_ENDSTOP_ADJ { 0 }
696
-    #endif
697
-    #ifndef DELTA_RADIUS_TRIM_TOWER_1
698
-      #define DELTA_RADIUS_TRIM_TOWER_1 0.0
699
-    #endif
700
-    #ifndef DELTA_RADIUS_TRIM_TOWER_2
701
-      #define DELTA_RADIUS_TRIM_TOWER_2 0.0
702
-    #endif
703
-    #ifndef DELTA_RADIUS_TRIM_TOWER_3
704
-      #define DELTA_RADIUS_TRIM_TOWER_3 0.0
705
-    #endif
706
-    #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_1
707
-      #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0
694
+    #ifndef DELTA_CALIBRATION_RADIUS
695
+      #define DELTA_CALIBRATION_RADIUS DELTA_PRINTABLE_RADIUS - 10
708 696
     #endif
709
-    #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_2
710
-      #define DELTA_DIAGONAL_ROD_TRIM_TOWER_2 0.0
711
-    #endif
712
-    #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_3
713
-      #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
714
-    #endif
715
-    #ifndef DELTA_TOWER_ANGLE_TRIM_1
716
-      #define DELTA_TOWER_ANGLE_TRIM_1 0.0
697
+    #ifndef DELTA_ENDSTOP_ADJ
698
+      #define DELTA_ENDSTOP_ADJ { 0.0, 0.0, 0.0 }
717 699
     #endif
718
-    #ifndef DELTA_TOWER_ANGLE_TRIM_2
719
-      #define DELTA_TOWER_ANGLE_TRIM_2 0.0
700
+    #ifndef DELTA_TOWER_ANGLE_TRIM
701
+      #define DELTA_TOWER_ANGLE_TRIM {0.0, 0.0}
720 702
     #endif
721
-    #ifndef DELTA_TOWER_ANGLE_TRIM_3
722
-      #define DELTA_TOWER_ANGLE_TRIM_3 0.0
703
+    #ifndef DELTA_RADIUS_TRIM_TOWER
704
+      #define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0}
723 705
     #endif
724
-    #if ENABLED(DELTA_AUTO_CALIBRATION)
725
-      #ifndef H_FACTOR
726
-        #define H_FACTOR 1.00
727
-      #endif
728
-      #ifndef R_FACTOR
729
-        #define R_FACTOR -2.25
730
-      #endif
706
+    #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER
707
+      #define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0}
731 708
     #endif
732 709
   #endif
733 710
 

+ 2
- 2
Marlin/Marlin.h Прегледај датотеку

@@ -302,9 +302,9 @@ float code_value_temp_diff();
302 302
   extern float endstop_adj[ABC],
303 303
                delta_radius,
304 304
                delta_diagonal_rod,
305
+               delta_calibration_radius,
305 306
                delta_segments_per_second,
306
-               delta_diagonal_rod_trim[ABC],
307
-               delta_tower_angle_trim[ABC],
307
+               delta_tower_angle_trim[2],
308 308
                delta_clip_start_height;
309 309
   void recalc_delta_settings(float radius, float diagonal_rod);
310 310
 #elif IS_SCARA

+ 25
- 22
Marlin/Marlin_main.cpp Прегледај датотеку

@@ -585,10 +585,10 @@ static uint8_t target_extruder;
585 585
   // These values are loaded or reset at boot time when setup() calls
586 586
   // settings.load(), which calls recalc_delta_settings().
587 587
   float delta_radius,
588
-        delta_tower_angle_trim[ABC],
588
+        delta_tower_angle_trim[2],
589 589
         delta_tower[ABC][2],
590 590
         delta_diagonal_rod,
591
-        delta_diagonal_rod_trim[ABC],
591
+        delta_calibration_radius,
592 592
         delta_diagonal_rod_2_tower[ABC],
593 593
         delta_segments_per_second,
594 594
         delta_clip_start_height = Z_MAX_POS;
@@ -5109,8 +5109,8 @@ inline void gcode_G28() {
5109 5109
         if (probe_points >= 3) {
5110 5110
           for (int8_t axis = 9; axis > 0; axis -= step_axis) { // uint8_t starts endless loop
5111 5111
             z_at_pt[0] += probe_pt(
5112
-              0.1 * cos(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS),
5113
-              0.1 * sin(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS), true, 1);
5112
+              0.1 * cos(RADIANS(180 + 30 * axis)) * (delta_calibration_radius),
5113
+              0.1 * sin(RADIANS(180 + 30 * axis)) * (delta_calibration_radius), true, 1);
5114 5114
           }
5115 5115
           center_points += 3;
5116 5116
           z_at_pt[0] /= center_points;
@@ -5124,8 +5124,8 @@ inline void gcode_G28() {
5124 5124
         if (probe_points != 1) {
5125 5125
           for (uint8_t axis = start; axis < 13; axis += step_axis)
5126 5126
             z_at_pt[axis] += probe_pt(
5127
-              cos(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS),
5128
-              sin(RADIANS(180 + 30 * axis)) * (DELTA_CALIBRATION_RADIUS), true, 1
5127
+              cos(RADIANS(180 + 30 * axis)) * (delta_calibration_radius),
5128
+              sin(RADIANS(180 + 30 * axis)) * (delta_calibration_radius), true, 1
5129 5129
             );
5130 5130
 
5131 5131
           if (probe_points == 4) step_axis = 2;
@@ -5308,7 +5308,7 @@ inline void gcode_G28() {
5308 5308
           }
5309 5309
           SERIAL_EOL;
5310 5310
           if (zero_std_dev >= test_precision)
5311
-            SERIAL_PROTOCOLLNPGM("Save with M500");
5311
+            SERIAL_PROTOCOLLNPGM("save with M500 and/or copy to configuration.h");
5312 5312
         }
5313 5313
         else {                                  // forced end
5314 5314
           #if ENABLED(DELTA_CALIBRATE_EXPERT_MODE)
@@ -7546,12 +7546,13 @@ inline void gcode_M205() {
7546 7546
     if (code_seen('L')) delta_diagonal_rod = code_value_linear_units();
7547 7547
     if (code_seen('R')) delta_radius = code_value_linear_units();
7548 7548
     if (code_seen('S')) delta_segments_per_second = code_value_float();
7549
-    if (code_seen('A')) delta_diagonal_rod_trim[A_AXIS] = code_value_linear_units();
7550
-    if (code_seen('B')) delta_diagonal_rod_trim[B_AXIS] = code_value_linear_units();
7551
-    if (code_seen('C')) delta_diagonal_rod_trim[C_AXIS] = code_value_linear_units();
7552
-    if (code_seen('I')) delta_tower_angle_trim[A_AXIS] = code_value_linear_units();
7553
-    if (code_seen('J')) delta_tower_angle_trim[B_AXIS] = code_value_linear_units();
7554
-    if (code_seen('K')) delta_tower_angle_trim[C_AXIS] = code_value_linear_units();
7549
+    if (code_seen('B')) delta_calibration_radius = code_value_float();
7550
+    if (code_seen('X')) delta_tower_angle_trim[A_AXIS] = code_value_linear_units();
7551
+    if (code_seen('Y')) delta_tower_angle_trim[B_AXIS] = code_value_linear_units();
7552
+    if (code_seen('Z')) { // rotate all 3 axis for Z = 0
7553
+      delta_tower_angle_trim[A_AXIS] += code_value_linear_units();
7554
+      delta_tower_angle_trim[B_AXIS] = code_value_linear_units();
7555
+    }
7555 7556
     recalc_delta_settings(delta_radius, delta_diagonal_rod);
7556 7557
   }
7557 7558
   /**
@@ -10555,15 +10556,17 @@ void ok_to_send() {
10555 10556
    * settings have been changed (e.g., by M665).
10556 10557
    */
10557 10558
   void recalc_delta_settings(float radius, float diagonal_rod) {
10558
-    delta_tower[A_AXIS][X_AXIS] = -sin(RADIANS(60 - delta_tower_angle_trim[A_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_1); // front left tower
10559
-    delta_tower[A_AXIS][Y_AXIS] = -cos(RADIANS(60 - delta_tower_angle_trim[A_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_1);
10560
-    delta_tower[B_AXIS][X_AXIS] =  sin(RADIANS(60 + delta_tower_angle_trim[B_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_2); // front right tower
10561
-    delta_tower[B_AXIS][Y_AXIS] = -cos(RADIANS(60 + delta_tower_angle_trim[B_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_2);
10562
-    delta_tower[C_AXIS][X_AXIS] = -sin(RADIANS(     delta_tower_angle_trim[C_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_3); // back middle tower
10563
-    delta_tower[C_AXIS][Y_AXIS] =  cos(RADIANS(     delta_tower_angle_trim[C_AXIS])) * (radius + DELTA_RADIUS_TRIM_TOWER_3);
10564
-    delta_diagonal_rod_2_tower[A_AXIS] = sq(diagonal_rod + delta_diagonal_rod_trim[A_AXIS]);
10565
-    delta_diagonal_rod_2_tower[B_AXIS] = sq(diagonal_rod + delta_diagonal_rod_trim[B_AXIS]);
10566
-    delta_diagonal_rod_2_tower[C_AXIS] = sq(diagonal_rod + delta_diagonal_rod_trim[C_AXIS]);
10559
+    const float trt[ABC] = DELTA_RADIUS_TRIM_TOWER,
10560
+                drt[ABC] = DELTA_DIAGONAL_ROD_TRIM_TOWER;
10561
+    delta_tower[A_AXIS][X_AXIS] = -cos(RADIANS(30 + delta_tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]); // front left tower
10562
+    delta_tower[A_AXIS][Y_AXIS] = -sin(RADIANS(30 + delta_tower_angle_trim[A_AXIS])) * (radius + trt[A_AXIS]);
10563
+    delta_tower[B_AXIS][X_AXIS] =  cos(RADIANS(30 - delta_tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]); // front right tower
10564
+    delta_tower[B_AXIS][Y_AXIS] = -sin(RADIANS(30 - delta_tower_angle_trim[B_AXIS])) * (radius + trt[B_AXIS]);
10565
+    delta_tower[C_AXIS][X_AXIS] = 0.0; // back middle tower
10566
+    delta_tower[C_AXIS][Y_AXIS] = (radius + trt[C_AXIS]);
10567
+    delta_diagonal_rod_2_tower[A_AXIS] = sq(diagonal_rod + drt[A_AXIS]);
10568
+    delta_diagonal_rod_2_tower[B_AXIS] = sq(diagonal_rod + drt[B_AXIS]);
10569
+    delta_diagonal_rod_2_tower[C_AXIS] = sq(diagonal_rod + drt[C_AXIS]);
10567 10570
   }
10568 10571
 
10569 10572
   #if ENABLED(DELTA_FAST_SQRT)

+ 16
- 20
Marlin/configuration_store.cpp Прегледај датотеку

@@ -92,12 +92,10 @@
92 92
  *  360  M665 R    delta_radius                     (float)
93 93
  *  364  M665 L    delta_diagonal_rod               (float)
94 94
  *  368  M665 S    delta_segments_per_second        (float)
95
- *  372  M665 A    delta_diagonal_rod_trim[A]       (float)
96
- *  376  M665 B    delta_diagonal_rod_trim[B]       (float)
97
- *  380  M665 C    delta_diagonal_rod_trim[C]       (float)
98
- *  384  M665 I    delta_tower_angle_trim[A]        (float)
99
- *  388  M665 J    delta_tower_angle_trim[B]        (float)
100
- *  392  M665 K    delta_tower_angle_trim[C]        (float)
95
+ *  372  M665 B    delta_calibration_radius         (float)
96
+ *  376  M665 X    delta_tower_angle_trim[A]        (float)
97
+ *  380  M665 Y    delta_tower_angle_trim[B]        (float)
98
+ *  ---  M665 Z    delta_tower_angle_trim[C]        (float) is always 0.0
101 99
  *
102 100
  * Z_DUAL_ENDSTOPS:                                 48 bytes
103 101
  *  348  M666 Z    z_endstop_adj                    (float)
@@ -412,8 +410,8 @@ void MarlinSettings::postprocess() {
412 410
       EEPROM_WRITE(delta_radius);              // 1 float
413 411
       EEPROM_WRITE(delta_diagonal_rod);        // 1 float
414 412
       EEPROM_WRITE(delta_segments_per_second); // 1 float
415
-      EEPROM_WRITE(delta_diagonal_rod_trim);   // 3 floats
416
-      EEPROM_WRITE(delta_tower_angle_trim);    // 3 floats
413
+      EEPROM_WRITE(delta_calibration_radius);  // 1 floats
414
+      EEPROM_WRITE(delta_tower_angle_trim);    // 2 floats
417 415
     #elif ENABLED(Z_DUAL_ENDSTOPS)
418 416
       EEPROM_WRITE(z_endstop_adj);             // 1 float
419 417
       dummy = 0.0f;
@@ -780,8 +778,8 @@ void MarlinSettings::postprocess() {
780 778
         EEPROM_READ(delta_radius);              // 1 float
781 779
         EEPROM_READ(delta_diagonal_rod);        // 1 float
782 780
         EEPROM_READ(delta_segments_per_second); // 1 float
783
-        EEPROM_READ(delta_diagonal_rod_trim);   // 3 floats
784
-        EEPROM_READ(delta_tower_angle_trim);    // 3 floats
781
+        EEPROM_READ(delta_calibration_radius);  // 1 floats
782
+        EEPROM_READ(delta_tower_angle_trim);    // 2 floats
785 783
       #elif ENABLED(Z_DUAL_ENDSTOPS)
786 784
         EEPROM_READ(z_endstop_adj);
787 785
         dummy = 0.0f;
@@ -1068,13 +1066,12 @@ void MarlinSettings::reset() {
1068 1066
 
1069 1067
   #if ENABLED(DELTA)
1070 1068
     const float adj[ABC] = DELTA_ENDSTOP_ADJ,
1071
-                drt[ABC] = { DELTA_DIAGONAL_ROD_TRIM_TOWER_1, DELTA_DIAGONAL_ROD_TRIM_TOWER_2, DELTA_DIAGONAL_ROD_TRIM_TOWER_3 },
1072
-                dta[ABC] = { DELTA_TOWER_ANGLE_TRIM_1, DELTA_TOWER_ANGLE_TRIM_2, DELTA_TOWER_ANGLE_TRIM_3 };
1069
+                dta[2] = DELTA_TOWER_ANGLE_TRIM;
1073 1070
     COPY(endstop_adj, adj);
1074 1071
     delta_radius = DELTA_RADIUS;
1075 1072
     delta_diagonal_rod = DELTA_DIAGONAL_ROD;
1076 1073
     delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND;
1077
-    COPY(delta_diagonal_rod_trim, drt);
1074
+    delta_calibration_radius = DELTA_CALIBRATION_RADIUS;
1078 1075
     COPY(delta_tower_angle_trim, dta);
1079 1076
     home_offset[Z_AXIS] = 0;
1080 1077
 
@@ -1473,19 +1470,18 @@ void MarlinSettings::reset() {
1473 1470
       SERIAL_ECHOLNPAIR(" Z", LINEAR_UNIT(endstop_adj[Z_AXIS]));
1474 1471
       if (!forReplay) {
1475 1472
         CONFIG_ECHO_START;
1476
-        SERIAL_ECHOLNPGM("Delta settings: L<diagonal_rod> R<radius> H<height> S<segments_per_s> ABC<diagonal_rod_[123]_trim>");
1473
+        SERIAL_ECHOLNPGM("Delta settings: L<diagonal_rod> R<radius> H<height> S<segments_per_s> B<calibration radius> XYZ<tower angle corrections>");
1477 1474
       }
1478 1475
       CONFIG_ECHO_START;
1479 1476
       SERIAL_ECHOPAIR("  M665 L", LINEAR_UNIT(delta_diagonal_rod));
1480 1477
       SERIAL_ECHOPAIR(" R", LINEAR_UNIT(delta_radius));
1481 1478
       SERIAL_ECHOPAIR(" H", LINEAR_UNIT(DELTA_HEIGHT + home_offset[Z_AXIS]));
1482 1479
       SERIAL_ECHOPAIR(" S", delta_segments_per_second);
1483
-      SERIAL_ECHOPAIR(" A", LINEAR_UNIT(delta_diagonal_rod_trim[A_AXIS]));
1484
-      SERIAL_ECHOPAIR(" B", LINEAR_UNIT(delta_diagonal_rod_trim[B_AXIS]));
1485
-      SERIAL_ECHOPAIR(" C", LINEAR_UNIT(delta_diagonal_rod_trim[C_AXIS]));
1486
-      SERIAL_ECHOPAIR(" I", LINEAR_UNIT(delta_tower_angle_trim[A_AXIS]));
1487
-      SERIAL_ECHOPAIR(" J", LINEAR_UNIT(delta_tower_angle_trim[B_AXIS]));
1488
-      SERIAL_ECHOLNPAIR(" K", LINEAR_UNIT(delta_tower_angle_trim[C_AXIS]));
1480
+      SERIAL_ECHOPAIR(" B", LINEAR_UNIT(delta_calibration_radius);
1481
+      SERIAL_ECHOPAIR(" X", LINEAR_UNIT(delta_tower_angle_trim[A_AXIS]));
1482
+      SERIAL_ECHOPAIR(" Y", LINEAR_UNIT(delta_tower_angle_trim[B_AXIS]));
1483
+      SERIAL_ECHOPAIR(" Z", 0.00);
1484
+      SERIAL_EOL;
1489 1485
     #elif ENABLED(Z_DUAL_ENDSTOPS)
1490 1486
       if (!forReplay) {
1491 1487
         CONFIG_ECHO_START;

+ 16
- 16
Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h Прегледај датотеку

@@ -1,4 +1,4 @@
1
-/**
1
+/**
2 2
  * Marlin 3D Printer Firmware
3 3
  * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
@@ -459,40 +459,40 @@
459 459
   //#define DELTA_CARRIAGE_OFFSET 22.0 // mm
460 460
 
461 461
   // Horizontal distance bridged by diagonal push rods when effector is centered.
462
-  #define DELTA_RADIUS 100.59 //mm // get this value from auto calibrate
462
+  #define DELTA_RADIUS 100.90 //mm // get this value from auto calibrate
463 463
 
464 464
   // height from z=0.00 to home position
465
-  #define DELTA_HEIGHT 298.95 // get this value from auto calibrate
465
+  #define DELTA_HEIGHT 296.38 // get this value from auto calibrate
466 466
 
467 467
   // Print surface diameter/2 minus unreachable space (avoid collisions with vertical towers).
468
-  #define DELTA_PRINTABLE_RADIUS 90.0
468
+  #define DELTA_PRINTABLE_RADIUS 85.0
469 469
 
470 470
   // Delta calibration menu
471 471
   // See http://minow.blogspot.com/index.html#4918805519571907051
472 472
   #define DELTA_CALIBRATION_MENU
473 473
 
474
+  // set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled
475
+  #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 17) // mm
476
+  
474 477
   // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
475 478
   #define DELTA_AUTO_CALIBRATION
476 479
   #if ENABLED(DELTA_AUTO_CALIBRATION)
477
-    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (1-4)
478
-    #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 15) // set the radius for the calibration probe points
480
+    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (-2,1-7)
479 481
   #endif
480 482
 
481 483
   // After homing move down to a height where XY movement is unconstrained
482 484
   #define DELTA_HOME_TO_SAFE_ZONE
483 485
 
484
-  #define DELTA_ENDSTOP_ADJ { -0.05, -0.00, -0.02 } // get these from auto calibrate
486
+  #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate
485 487
 
486 488
   // Trim adjustments for individual towers
487
-  #define DELTA_RADIUS_TRIM_TOWER_1 0.0
488
-  #define DELTA_RADIUS_TRIM_TOWER_2 0.0
489
-  #define DELTA_RADIUS_TRIM_TOWER_3 0.0
490
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0
491
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_2 0.0
492
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
493
-  #define DELTA_TOWER_ANGLE_TRIM_1 0.0
494
-  #define DELTA_TOWER_ANGLE_TRIM_2 0.0
495
-  #define DELTA_TOWER_ANGLE_TRIM_3 0.0
489
+  // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0
490
+  // measured in degrees anticlockwise looking from above the printer
491
+  #define DELTA_TOWER_ANGLE_TRIM { -0.00, -0.00 } // get these from auto calibrate
492
+
493
+  // delta radius and diaginal rod adjustments measured in mm
494
+  //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0}
495
+  //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0}
496 496
 
497 497
 #endif
498 498
 

+ 14
- 14
Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h Прегледај датотеку

@@ -472,28 +472,28 @@
472 472
   // See http://minow.blogspot.com/index.html#4918805519571907051
473 473
   //#define DELTA_CALIBRATION_MENU
474 474
 
475
+  // set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled
476
+  #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 17) // mm
477
+  
475 478
   // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
476
-  //#define DELTA_AUTO_CALIBRATION
479
+  #define DELTA_AUTO_CALIBRATION
477 480
   #if ENABLED(DELTA_AUTO_CALIBRATION)
478
-    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (1-4)
479
-    #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 15) // set the radius for the calibration probe points
481
+    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (-2,1-7)
480 482
   #endif
481 483
 
482 484
   // After homing move down to a height where XY movement is unconstrained
483
-  //#define DELTA_HOME_TO_SAFE_ZONE
485
+  #define DELTA_HOME_TO_SAFE_ZONE
484 486
 
485
-  //#define DELTA_ENDSTOP_ADJ { 0, 0, 0 }
487
+  #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate
486 488
 
487 489
   // Trim adjustments for individual towers
488
-  #define DELTA_RADIUS_TRIM_TOWER_1 0.0
489
-  #define DELTA_RADIUS_TRIM_TOWER_2 0.0
490
-  #define DELTA_RADIUS_TRIM_TOWER_3 0.0
491
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0
492
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_2 0.0
493
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
494
-  #define DELTA_TOWER_ANGLE_TRIM_1 0.0
495
-  #define DELTA_TOWER_ANGLE_TRIM_2 0.0
496
-  #define DELTA_TOWER_ANGLE_TRIM_3 0.0
490
+  // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0
491
+  // measured in degrees anticlockwise looking from above the printer
492
+  #define DELTA_TOWER_ANGLE_TRIM { -0.00, -0.00 } // get these from auto calibrate
493
+
494
+  // delta radius and diaginal rod adjustments measured in mm
495
+  //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0}
496
+  //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0}
497 497
 
498 498
 #endif
499 499
 

+ 15
- 13
Marlin/example_configurations/delta/generic/Configuration.h Прегледај датотеку

@@ -461,28 +461,30 @@
461 461
   // See http://minow.blogspot.com/index.html#4918805519571907051
462 462
   //#define DELTA_CALIBRATION_MENU
463 463
 
464
+
465
+
466
+  // set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled
467
+  #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 17) // mm
468
+  
464 469
   // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
465
-  //#define DELTA_AUTO_CALIBRATION
470
+  #define DELTA_AUTO_CALIBRATION
466 471
   #if ENABLED(DELTA_AUTO_CALIBRATION)
467
-    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (1-4)
468
-    #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 15) // set the radius for the calibration probe points
472
+    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (-2,1-7)
469 473
   #endif
470 474
 
471 475
   // After homing move down to a height where XY movement is unconstrained
472 476
   #define DELTA_HOME_TO_SAFE_ZONE
473 477
 
474
-  //#define DELTA_ENDSTOP_ADJ { 0, 0, 0 }
478
+  #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate
475 479
 
476 480
   // Trim adjustments for individual towers
477
-  #define DELTA_RADIUS_TRIM_TOWER_1 0.0
478
-  #define DELTA_RADIUS_TRIM_TOWER_2 0.0
479
-  #define DELTA_RADIUS_TRIM_TOWER_3 0.0
480
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0
481
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_2 0.0
482
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
483
-  #define DELTA_TOWER_ANGLE_TRIM_1 0.0
484
-  #define DELTA_TOWER_ANGLE_TRIM_2 0.0
485
-  #define DELTA_TOWER_ANGLE_TRIM_3 0.0
481
+  // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0
482
+  // measured in degrees anticlockwise looking from above the printer
483
+  #define DELTA_TOWER_ANGLE_TRIM { -0.00, -0.00 } // get these from auto calibrate
484
+
485
+  // delta radius and diaginal rod adjustments measured in mm
486
+  //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0}
487
+  //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0}
486 488
 
487 489
 #endif
488 490
 

+ 13
- 13
Marlin/example_configurations/delta/kossel_mini/Configuration.h Прегледај датотеку

@@ -461,28 +461,28 @@
461 461
   // See http://minow.blogspot.com/index.html#4918805519571907051
462 462
   //#define DELTA_CALIBRATION_MENU
463 463
 
464
+  // set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled
465
+  #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 17) // mm
466
+  
464 467
   // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
465
-  //#define DELTA_AUTO_CALIBRATION
468
+  #define DELTA_AUTO_CALIBRATION
466 469
   #if ENABLED(DELTA_AUTO_CALIBRATION)
467
-    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (1-4)
468
-    #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 15) // set the radius for the calibration probe points
470
+    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (-2,1-7)
469 471
   #endif
470 472
 
471 473
   // After homing move down to a height where XY movement is unconstrained
472 474
   #define DELTA_HOME_TO_SAFE_ZONE
473 475
 
474
-  //#define DELTA_ENDSTOP_ADJ { 0, 0, 0 }
476
+  #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate
475 477
 
476 478
   // Trim adjustments for individual towers
477
-  #define DELTA_RADIUS_TRIM_TOWER_1 0.0
478
-  #define DELTA_RADIUS_TRIM_TOWER_2 0.0
479
-  #define DELTA_RADIUS_TRIM_TOWER_3 0.0
480
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0
481
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_2 0.0
482
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
483
-  #define DELTA_TOWER_ANGLE_TRIM_1 0.0
484
-  #define DELTA_TOWER_ANGLE_TRIM_2 0.0
485
-  #define DELTA_TOWER_ANGLE_TRIM_3 0.0
479
+  // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0
480
+  // measured in degrees anticlockwise looking from above the printer
481
+  #define DELTA_TOWER_ANGLE_TRIM { -0.00, -0.00 } // get these from auto calibrate
482
+
483
+  // delta radius and diaginal rod adjustments measured in mm
484
+  //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0}
485
+  //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0}
486 486
 
487 487
 #endif
488 488
 

+ 15
- 13
Marlin/example_configurations/delta/kossel_pro/Configuration.h Прегледај датотеку

@@ -448,28 +448,30 @@
448 448
   // See http://minow.blogspot.com/index.html#4918805519571907051
449 449
   //#define DELTA_CALIBRATION_MENU
450 450
 
451
+
452
+
453
+  // set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled
454
+  #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 17) // mm
455
+  
451 456
   // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
452
-  //#define DELTA_AUTO_CALIBRATION
457
+  #define DELTA_AUTO_CALIBRATION
453 458
   #if ENABLED(DELTA_AUTO_CALIBRATION)
454
-    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (1-4)
455
-    #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 15) // set the radius for the calibration probe points
459
+    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (-2,1-7)
456 460
   #endif
457 461
 
458 462
   // After homing move down to a height where XY movement is unconstrained
459 463
   #define DELTA_HOME_TO_SAFE_ZONE
460 464
 
461
-  //#define DELTA_ENDSTOP_ADJ { 0, 0, 0 }
465
+  #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate
462 466
 
463 467
   // Trim adjustments for individual towers
464
-  #define DELTA_RADIUS_TRIM_TOWER_1 0.0
465
-  #define DELTA_RADIUS_TRIM_TOWER_2 0.0
466
-  #define DELTA_RADIUS_TRIM_TOWER_3 0.0
467
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0
468
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_2 0.0
469
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
470
-  #define DELTA_TOWER_ANGLE_TRIM_1 0.0
471
-  #define DELTA_TOWER_ANGLE_TRIM_2 0.0
472
-  #define DELTA_TOWER_ANGLE_TRIM_3 0.0
468
+  // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0
469
+  // measured in degrees anticlockwise looking from above the printer
470
+  #define DELTA_TOWER_ANGLE_TRIM { -0.00, -0.00 } // get these from auto calibrate
471
+
472
+  // delta radius and diaginal rod adjustments measured in mm
473
+  //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0}
474
+  //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0}
473 475
 
474 476
 #endif
475 477
 

+ 13
- 13
Marlin/example_configurations/delta/kossel_xl/Configuration.h Прегледај датотеку

@@ -466,28 +466,28 @@
466 466
   // See http://minow.blogspot.com/index.html#4918805519571907051
467 467
   //#define DELTA_CALIBRATION_MENU
468 468
 
469
+  // set the radius for the calibration probe points - max 0.8 * DELTA_PRINTABLE_RADIUS if DELTA_AUTO_CALIBRATION enabled
470
+  #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 17) // mm
471
+  
469 472
   // G33 Delta Auto-Calibration (Enable EEPROM_SETTINGS to store results)
470
-  //#define DELTA_AUTO_CALIBRATION
473
+  #define DELTA_AUTO_CALIBRATION
471 474
   #if ENABLED(DELTA_AUTO_CALIBRATION)
472
-    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (1-4)
473
-    #define DELTA_CALIBRATION_RADIUS (DELTA_PRINTABLE_RADIUS - 15) // set the radius for the calibration probe points
475
+    #define DELTA_CALIBRATION_DEFAULT_POINTS 3 // set the default number of probe points : n*n (-2,1-7)
474 476
   #endif
475 477
 
476 478
   // After homing move down to a height where XY movement is unconstrained
477 479
   #define DELTA_HOME_TO_SAFE_ZONE
478 480
 
479
-  //#define DELTA_ENDSTOP_ADJ { 0, 0, 0 }
481
+  #define DELTA_ENDSTOP_ADJ { -0.00, -0.00, -0.00 } // get these from auto calibrate
480 482
 
481 483
   // Trim adjustments for individual towers
482
-  #define DELTA_RADIUS_TRIM_TOWER_1 0.0
483
-  #define DELTA_RADIUS_TRIM_TOWER_2 0.0
484
-  #define DELTA_RADIUS_TRIM_TOWER_3 0.0
485
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_1 0.0
486
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_2 0.0
487
-  #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
488
-  #define DELTA_TOWER_ANGLE_TRIM_1 0.0
489
-  #define DELTA_TOWER_ANGLE_TRIM_2 0.0
490
-  #define DELTA_TOWER_ANGLE_TRIM_3 0.0
484
+  // tower angle corrections for X and Y tower / rotate XYZ so Z tower angle = 0
485
+  // measured in degrees anticlockwise looking from above the printer
486
+  #define DELTA_TOWER_ANGLE_TRIM { -0.00, -0.00 } // get these from auto calibrate
487
+
488
+  // delta radius and diaginal rod adjustments measured in mm
489
+  //#define DELTA_RADIUS_TRIM_TOWER {0.0, 0.0, 0.0}
490
+  //#define DELTA_DIAGONAL_ROD_TRIM_TOWER {0.0, 0.0, 0.0}
491 491
 
492 492
 #endif
493 493
 

+ 2
- 8
Marlin/ultralcd.cpp Прегледај датотеку

@@ -1805,20 +1805,14 @@ void kill_screen(const char* lcd_msg) {
1805 1805
       lcd_goto_screen(_lcd_calibrate_homing);
1806 1806
     }
1807 1807
 
1808
-    #if ENABLED(DELTA_AUTO_CALIBRATION)
1809
-      #define _DELTA_TOWER_MOVE_RADIUS DELTA_CALIBRATION_RADIUS
1810
-    #else
1811
-      #define _DELTA_TOWER_MOVE_RADIUS DELTA_PRINTABLE_RADIUS
1812
-    #endif
1813
-
1814 1808
     // Move directly to the tower position with uninterpolated moves
1815 1809
     // If we used interpolated moves it would cause this to become re-entrant
1816 1810
     void _goto_tower_pos(const float &a) {
1817 1811
       current_position[Z_AXIS] = max(Z_HOMING_HEIGHT, Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5;
1818 1812
       line_to_current(Z_AXIS);
1819 1813
 
1820
-      current_position[X_AXIS] = a < 0 ? LOGICAL_X_POSITION(X_HOME_POS) : sin(a) * -(_DELTA_TOWER_MOVE_RADIUS);
1821
-      current_position[Y_AXIS] = a < 0 ? LOGICAL_Y_POSITION(Y_HOME_POS) : cos(a) *  (_DELTA_TOWER_MOVE_RADIUS);
1814
+      current_position[X_AXIS] = a < 0 ? LOGICAL_X_POSITION(X_HOME_POS) : sin(a) * -(delta_calibration_radius);
1815
+      current_position[Y_AXIS] = a < 0 ? LOGICAL_Y_POSITION(Y_HOME_POS) : cos(a) *  (delta_calibration_radius);
1822 1816
       line_to_current(Z_AXIS);
1823 1817
 
1824 1818
       current_position[Z_AXIS] = 4.0;

Loading…
Откажи
Сачувај