Procházet zdrojové kódy

More sanity-checking for ABL

- Moved sanity-checks to Marlin_main.cpp
- Applied to other configuration files
- Fixed formatting of ABL output
- Passing verbose level to probe_pt
- Miscellaneous cleanup
- Put CONFIG_STEPPERS_TOSHIBA into Configuration.h
Scott Lahteine před 9 roky
rodič
revize
d085725c86

+ 27
- 49
Marlin/Configuration.h Zobrazit soubor

@@ -8,7 +8,7 @@
8 8
 //===========================================================================
9 9
 /*
10 10
 Here are some standard links for getting your machine calibrated:
11
- * http://reprap.org/wiki/Calibration 
11
+ * http://reprap.org/wiki/Calibration
12 12
  * http://youtu.be/wAL9d7FgInk
13 13
  * http://calculator.josefprusa.cz
14 14
  * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
@@ -295,9 +295,12 @@ your extruder heater takes 2 minutes to hit the target on heating.
295 295
 //============================= Mechanical Settings =========================
296 296
 //===========================================================================
297 297
 
298
-// Uncomment the following line to enable CoreXY kinematics
298
+// Uncomment this option to enable CoreXY kinematics
299 299
 // #define COREXY
300 300
 
301
+// Enable this option for Toshiba steppers
302
+// #define CONFIG_STEPPERS_TOSHIBA
303
+
301 304
 // coarse Endstop Settings
302 305
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
303 306
 
@@ -382,40 +385,38 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
382 385
 
383 386
 #ifdef ENABLE_AUTO_BED_LEVELING
384 387
 
385
-// There are 2 different ways to pick the X and Y locations to probe:
386
-
387
-//  - "grid" mode
388
-//    Probe every point in a rectangular grid
389
-//    You must specify the rectangle, and the density of sample points
390
-//    This mode is preferred because there are more measurements.
391
-//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
392
-
393
-//  - "3-point" mode
394
-//    Probe 3 arbitrary points on the bed (that aren't colinear)
395
-//    You must specify the X & Y coordinates of all 3 points
396
-
388
+  // There are 2 different ways to specify probing locations
389
+  //
390
+  // - "grid" mode
391
+  //   Probe several points in a rectangular grid.
392
+  //   You specify the rectangle and the density of sample points.
393
+  //   This mode is preferred because there are more measurements.
394
+  //
395
+  // - "3-point" mode
396
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
397
+  //   You specify the XY coordinates of all 3 points.
398
+
399
+  // Enable this to sample the bed in a grid (least squares solution)
400
+  // Note: this feature generates 10KB extra code size
397 401
   #define AUTO_BED_LEVELING_GRID
398
-  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
399
-  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
400
-  // and least squares solution is calculated
401
-  // Note: this feature occupies 10'206 byte
402
+
402 403
   #ifdef AUTO_BED_LEVELING_GRID
403 404
 
404
-    // set the rectangle in which to probe
405
+    // The edges of the rectangle in which to probe
405 406
     #define LEFT_PROBE_BED_POSITION 15
406 407
     #define RIGHT_PROBE_BED_POSITION 170
407
-    #define BACK_PROBE_BED_POSITION 180
408 408
     #define FRONT_PROBE_BED_POSITION 20
409
+    #define BACK_PROBE_BED_POSITION 170
409 410
 
410
-     // set the number of grid points per dimension
411
-     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
411
+    // Set the number of grid points per dimension
412
+    // You probably don't need more than 3 (squared=9)
412 413
     #define AUTO_BED_LEVELING_GRID_POINTS 2
413 414
 
414 415
 
415
-  #else  // not AUTO_BED_LEVELING_GRID
416
-    // with no grid, just probe 3 arbitrary points.  A simple cross-product
417
-    // is used to esimate the plane of the print bed
416
+  #else  // !AUTO_BED_LEVELING_GRID
418 417
 
418
+      // Arbitrary points to probe. A simple cross-product
419
+      // is used to estimate the plane of the bed.
419 420
       #define ABL_PROBE_PT_1_X 15
420 421
       #define ABL_PROBE_PT_1_Y 180
421 422
       #define ABL_PROBE_PT_2_X 15
@@ -426,7 +427,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
426 427
   #endif // AUTO_BED_LEVELING_GRID
427 428
 
428 429
 
429
-  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
430
+  // Offsets to the probe relative to the extruder tip (Hotend - Probe)
430 431
   // X and Y offsets must be integers
431 432
   #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
432 433
   #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
@@ -467,29 +468,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
467 468
 
468 469
   #endif
469 470
 
470
-  #ifdef AUTO_BED_LEVELING_GRID	// Check if Probe_Offset * Grid Points is greater than Probing Range
471
-    #if X_PROBE_OFFSET_FROM_EXTRUDER < 0
472
-      #if (-(X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
473
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
474
-	  #endif
475
-	#else
476
-      #if ((X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
477
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
478
-	  #endif
479
-	#endif
480
-    #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
481
-      #if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
482
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
483
-	  #endif
484
-	#else
485
-      #if ((Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
486
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
487
-	  #endif
488
-	#endif
489
-
490
-	
491
-  #endif
492
-  
493 471
 #endif // ENABLE_AUTO_BED_LEVELING
494 472
 
495 473
 

+ 13
- 13
Marlin/Marlin.h Zobrazit soubor

@@ -23,41 +23,41 @@
23 23
 #include "pins.h"
24 24
 
25 25
 #ifndef AT90USB
26
-#define  HardwareSerial_h // trick to disable the standard HWserial
26
+  #define  HardwareSerial_h // trick to disable the standard HWserial
27 27
 #endif
28 28
 
29 29
 #if (ARDUINO >= 100)
30
-# include "Arduino.h"
30
+  #include "Arduino.h"
31 31
 #else
32
-# include "WProgram.h"
32
+  #include "WProgram.h"
33 33
 #endif
34 34
 
35 35
 // Arduino < 1.0.0 does not define this, so we need to do it ourselves
36 36
 #ifndef analogInputToDigitalPin
37
-# define analogInputToDigitalPin(p) ((p) + 0xA0)
37
+  #define analogInputToDigitalPin(p) ((p) + 0xA0)
38 38
 #endif
39 39
 
40 40
 #ifdef AT90USB
41
-#include "HardwareSerial.h"
41
+  #include "HardwareSerial.h"
42 42
 #endif
43 43
 
44 44
 #include "MarlinSerial.h"
45 45
 
46 46
 #ifndef cbi
47
-#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
47
+  #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
48 48
 #endif
49 49
 #ifndef sbi
50
-#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
50
+  #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
51 51
 #endif
52 52
 
53 53
 #include "WString.h"
54 54
 
55 55
 #ifdef AT90USB
56
-   #ifdef BTENABLED
57
-         #define MYSERIAL bt
58
-   #else
59
-         #define MYSERIAL Serial
60
-   #endif // BTENABLED
56
+  #ifdef BTENABLED
57
+    #define MYSERIAL bt
58
+  #else
59
+    #define MYSERIAL Serial
60
+  #endif // BTENABLED
61 61
 #else
62 62
   #define MYSERIAL MSerial
63 63
 #endif
@@ -86,7 +86,7 @@ extern const char echomagic[] PROGMEM;
86 86
 
87 87
 #define SERIAL_ECHOPAIR(name,value) (serial_echopair_P(PSTR(name),(value)))
88 88
 
89
-#define SERIAL_EOL SERIAL_ECHOLN("")
89
+#define SERIAL_EOL MYSERIAL.write('\n')
90 90
 
91 91
 void serial_echopair_P(const char *s_P, float v);
92 92
 void serial_echopair_P(const char *s_P, double v);

+ 119
- 81
Marlin/Marlin_main.cpp Zobrazit soubor

@@ -39,6 +39,8 @@
39 39
   #endif
40 40
 #endif // ENABLE_AUTO_BED_LEVELING
41 41
 
42
+#define SERVO_LEVELING defined(ENABLE_AUTO_BED_LEVELING) && PROBE_SERVO_DEACTIVATION_DELAY > 0
43
+
42 44
 #include "ultralcd.h"
43 45
 #include "planner.h"
44 46
 #include "stepper.h"
@@ -589,9 +591,9 @@ void servo_init()
589 591
   }
590 592
   #endif
591 593
 
592
-  #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
593
-  delay(PROBE_SERVO_DEACTIVATION_DELAY);
594
-  servos[servo_endstops[Z_AXIS]].detach();
594
+  #if SERVO_LEVELING
595
+    delay(PROBE_SERVO_DEACTIVATION_DELAY);
596
+    servos[servo_endstops[Z_AXIS]].detach();
595 597
   #endif
596 598
 }
597 599
 
@@ -1182,41 +1184,41 @@ static void clean_up_after_endstop_move() {
1182 1184
 }
1183 1185
 
1184 1186
 static void engage_z_probe() {
1185
-    // Engage Z Servo endstop if enabled
1186
-    #ifdef SERVO_ENDSTOPS
1187
+  // Engage Z Servo endstop if enabled
1188
+  #ifdef SERVO_ENDSTOPS
1187 1189
     if (servo_endstops[Z_AXIS] > -1) {
1188
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1190
+      #if SERVO_LEVELING
1189 1191
         servos[servo_endstops[Z_AXIS]].attach(0);
1190
-#endif
1191
-        servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2]);
1192
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1192
+      #endif
1193
+      servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2]);
1194
+      #if SERVO_LEVELING
1193 1195
         delay(PROBE_SERVO_DEACTIVATION_DELAY);
1194 1196
         servos[servo_endstops[Z_AXIS]].detach();
1195
-#endif
1197
+      #endif
1196 1198
     }
1197
-    #endif
1199
+  #endif
1198 1200
 }
1199 1201
 
1200 1202
 static void retract_z_probe() {
1201
-    // Retract Z Servo endstop if enabled
1202
-    #ifdef SERVO_ENDSTOPS
1203
+  // Retract Z Servo endstop if enabled
1204
+  #ifdef SERVO_ENDSTOPS
1203 1205
     if (servo_endstops[Z_AXIS] > -1) {
1204
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1206
+      #if SERVO_LEVELING
1205 1207
         servos[servo_endstops[Z_AXIS]].attach(0);
1206
-#endif
1207
-        servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2 + 1]);
1208
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1208
+      #endif
1209
+      servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2 + 1]);
1210
+      #if SERVO_LEVELING
1209 1211
         delay(PROBE_SERVO_DEACTIVATION_DELAY);
1210 1212
         servos[servo_endstops[Z_AXIS]].detach();
1211
-#endif
1213
+      #endif
1212 1214
     }
1213
-    #endif
1215
+  #endif
1214 1216
 }
1215 1217
 
1216 1218
 enum ProbeAction { ProbeStay, ProbeEngage, ProbeRetract, ProbeEngageRetract };
1217 1219
 
1218 1220
 /// Probe bed height at position (x,y), returns the measured z value
1219
-static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageRetract) {
1221
+static float probe_pt(float x, float y, float z_before, ProbeAction retract_action=ProbeEngageRetract, int verbose_level=1) {
1220 1222
   // move to right place
1221 1223
   do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z_before);
1222 1224
   do_blocking_move_to(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER, current_position[Z_AXIS]);
@@ -1232,18 +1234,20 @@ static float probe_pt(float x, float y, float z_before, ProbeAction retract_acti
1232 1234
     if (retract_action & ProbeRetract) retract_z_probe();
1233 1235
   #endif
1234 1236
 
1235
-  SERIAL_PROTOCOLPGM(MSG_BED);
1236
-  SERIAL_PROTOCOLPGM(" x: ");
1237
-  SERIAL_PROTOCOL(x);
1238
-  SERIAL_PROTOCOLPGM(" y: ");
1239
-  SERIAL_PROTOCOL(y);
1240
-  SERIAL_PROTOCOLPGM(" z: ");
1241
-  SERIAL_PROTOCOL(measured_z);
1242
-  SERIAL_PROTOCOLPGM("\n");
1237
+  if (verbose_level > 2) {
1238
+    SERIAL_PROTOCOLPGM(MSG_BED);
1239
+    SERIAL_PROTOCOLPGM(" X: ");
1240
+    SERIAL_PROTOCOL(x + 0.0001);
1241
+    SERIAL_PROTOCOLPGM(" Y: ");
1242
+    SERIAL_PROTOCOL(y + 0.0001);
1243
+    SERIAL_PROTOCOLPGM(" Z: ");
1244
+    SERIAL_PROTOCOL(measured_z + 0.0001);
1245
+    SERIAL_EOL;
1246
+  }
1243 1247
   return measured_z;
1244 1248
 }
1245 1249
 
1246
-#endif // #ifdef ENABLE_AUTO_BED_LEVELING
1250
+#endif // ENABLE_AUTO_BED_LEVELING
1247 1251
 
1248 1252
 static void homeaxis(int axis) {
1249 1253
 #define HOMEAXIS_DO(LETTER) \
@@ -1266,7 +1270,7 @@ static void homeaxis(int axis) {
1266 1270
 #ifndef Z_PROBE_SLED
1267 1271
     // Engage Servo endstop if enabled
1268 1272
     #ifdef SERVO_ENDSTOPS
1269
-      #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1273
+      #if SERVO_LEVELING
1270 1274
         if (axis==Z_AXIS) {
1271 1275
           engage_z_probe();
1272 1276
         }
@@ -1317,7 +1321,7 @@ static void homeaxis(int axis) {
1317 1321
         servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2 + 1]);
1318 1322
       }
1319 1323
     #endif
1320
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1324
+#if SERVO_LEVELING
1321 1325
   #ifndef Z_PROBE_SLED
1322 1326
     if (axis==Z_AXIS) retract_z_probe();
1323 1327
   #endif
@@ -1744,6 +1748,53 @@ inline void gcode_G28() {
1744 1748
 
1745 1749
 #ifdef ENABLE_AUTO_BED_LEVELING
1746 1750
 
1751
+  // Define the possible boundaries for probing based on set limits
1752
+  #define MIN_PROBE_X (max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
1753
+  #define MAX_PROBE_X (min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER))
1754
+  #define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
1755
+  #define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
1756
+
1757
+  #ifdef AUTO_BED_LEVELING_GRID
1758
+
1759
+    #define MIN_PROBE_EDGE 20 // The probe square sides can be no smaller than this
1760
+
1761
+    // Make sure probing points are reachable
1762
+
1763
+    #if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
1764
+      #error The given LEFT_PROBE_BED_POSITION can't be reached by the probe.
1765
+    #elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
1766
+      #error The given RIGHT_PROBE_BED_POSITION can't be reached by the probe.
1767
+    #elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
1768
+      #error The given FRONT_PROBE_BED_POSITION can't be reached by the probe.
1769
+    #elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y
1770
+      #error The given BACK_PROBE_BED_POSITION can't be reached by the probe.
1771
+
1772
+    // Check if Probe_Offset * Grid Points is greater than Probing Range
1773
+
1774
+    #elif abs(X_PROBE_OFFSET_FROM_EXTRUDER) * (AUTO_BED_LEVELING_GRID_POINTS-1) >= RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION
1775
+      #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
1776
+    #elif abs(Y_PROBE_OFFSET_FROM_EXTRUDER) * (AUTO_BED_LEVELING_GRID_POINTS-1) >= BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION
1777
+      #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
1778
+    #endif
1779
+
1780
+  #else // !AUTO_BED_LEVELING_GRID
1781
+
1782
+    #if ABL_PROBE_PT_1_X < MIN_PROBE_X || ABL_PROBE_PT_1_X > MAX_PROBE_X
1783
+      #error The given ABL_PROBE_PT_1_X can't be reached by the probe.
1784
+    #elif ABL_PROBE_PT_2_X < MIN_PROBE_X || ABL_PROBE_PT_2_X > MAX_PROBE_X
1785
+      #error The given ABL_PROBE_PT_2_X can't be reached by the probe.
1786
+    #elif ABL_PROBE_PT_3_X < MIN_PROBE_X || ABL_PROBE_PT_3_X > MAX_PROBE_X
1787
+      #error The given ABL_PROBE_PT_3_X can't be reached by the probe.
1788
+    #elif ABL_PROBE_PT_1_Y < MIN_PROBE_Y || ABL_PROBE_PT_1_Y > MAX_PROBE_Y
1789
+      #error The given ABL_PROBE_PT_1_Y can't be reached by the probe.
1790
+    #elif ABL_PROBE_PT_2_Y < MIN_PROBE_Y || ABL_PROBE_PT_2_Y > MAX_PROBE_Y
1791
+      #error The given ABL_PROBE_PT_2_Y can't be reached by the probe.
1792
+    #elif ABL_PROBE_PT_3_Y < MIN_PROBE_Y || ABL_PROBE_PT_3_Y > MAX_PROBE_Y
1793
+      #error The given ABL_PROBE_PT_3_Y can't be reached by the probe.
1794
+    #endif
1795
+
1796
+  #endif // !AUTO_BED_LEVELING_GRID
1797
+
1747 1798
   /**
1748 1799
    * G29: Detailed Z-Probe, probes the bed at 3 or more points.
1749 1800
    *      Will fail if the printer has not been homed with G28.
@@ -1816,48 +1867,36 @@ inline void gcode_G28() {
1816 1867
         return;
1817 1868
       }
1818 1869
 
1819
-      // Define the possible boundaries for probing based on the set limits.
1820
-      // Code above (in G28) might have these limits wrong, or I am wrong here.
1821
-      #define MIN_PROBE_EDGE 10 // Edges of the probe square can be no less
1822
-      const int min_probe_x = max(X_MIN_POS, X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER),
1823
-                max_probe_x = min(X_MAX_POS, X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER),
1824
-                min_probe_y = max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER),
1825
-                max_probe_y = min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER);
1826
-
1827 1870
       int left_probe_bed_position = code_seen('L') ? code_value_long() : LEFT_PROBE_BED_POSITION,
1828 1871
           right_probe_bed_position = code_seen('R') ? code_value_long() : RIGHT_PROBE_BED_POSITION,
1829 1872
           front_probe_bed_position = code_seen('F') ? code_value_long() : FRONT_PROBE_BED_POSITION,
1830 1873
           back_probe_bed_position = code_seen('B') ? code_value_long() : BACK_PROBE_BED_POSITION;
1831 1874
 
1832
-      bool left_out_l = left_probe_bed_position < min_probe_x,
1833
-           left_out_r = left_probe_bed_position > right_probe_bed_position - MIN_PROBE_EDGE,
1834
-           left_out = left_out_l || left_out_r,
1835
-           right_out_r = right_probe_bed_position > max_probe_x,
1836
-           right_out_l =right_probe_bed_position < left_probe_bed_position + MIN_PROBE_EDGE,
1837
-           right_out = right_out_l || right_out_r,
1838
-           front_out_f = front_probe_bed_position < min_probe_y,
1839
-           front_out_b = front_probe_bed_position > back_probe_bed_position - MIN_PROBE_EDGE,
1840
-           front_out = front_out_f || front_out_b,
1841
-           back_out_b = back_probe_bed_position > max_probe_y,
1842
-           back_out_f = back_probe_bed_position < front_probe_bed_position + MIN_PROBE_EDGE,
1843
-           back_out = back_out_f || back_out_b;
1875
+      bool left_out_l = left_probe_bed_position < MIN_PROBE_X,
1876
+           left_out = left_out_l || left_probe_bed_position > right_probe_bed_position - MIN_PROBE_EDGE,
1877
+           right_out_r = right_probe_bed_position > MAX_PROBE_X,
1878
+           right_out = right_out_r || right_probe_bed_position < left_probe_bed_position + MIN_PROBE_EDGE,
1879
+           front_out_f = front_probe_bed_position < MIN_PROBE_Y,
1880
+           front_out = front_out_f || front_probe_bed_position > back_probe_bed_position - MIN_PROBE_EDGE,
1881
+           back_out_b = back_probe_bed_position > MAX_PROBE_Y,
1882
+           back_out = back_out_b || back_probe_bed_position < front_probe_bed_position + MIN_PROBE_EDGE;
1844 1883
 
1845 1884
       if (left_out || right_out || front_out || back_out) {
1846 1885
         if (left_out) {
1847 1886
           SERIAL_PROTOCOLPGM("?Probe (L)eft position out of range.\n");
1848
-          left_probe_bed_position = left_out_l ? min_probe_x : right_probe_bed_position - MIN_PROBE_EDGE;
1887
+          left_probe_bed_position = left_out_l ? MIN_PROBE_X : right_probe_bed_position - MIN_PROBE_EDGE;
1849 1888
         }
1850 1889
         if (right_out) {
1851 1890
           SERIAL_PROTOCOLPGM("?Probe (R)ight position out of range.\n");
1852
-          right_probe_bed_position = right_out_r ? max_probe_x : left_probe_bed_position + MIN_PROBE_EDGE;
1891
+          right_probe_bed_position = right_out_r ? MAX_PROBE_X : left_probe_bed_position + MIN_PROBE_EDGE;
1853 1892
         }
1854 1893
         if (front_out) {
1855 1894
           SERIAL_PROTOCOLPGM("?Probe (F)ront position out of range.\n");
1856
-          front_probe_bed_position = front_out_f ? min_probe_y : back_probe_bed_position - MIN_PROBE_EDGE;
1895
+          front_probe_bed_position = front_out_f ? MIN_PROBE_Y : back_probe_bed_position - MIN_PROBE_EDGE;
1857 1896
         }
1858 1897
         if (back_out) {
1859 1898
           SERIAL_PROTOCOLPGM("?Probe (B)ack position out of range.\n");
1860
-          back_probe_bed_position = back_out_b ? max_probe_y : front_probe_bed_position + MIN_PROBE_EDGE;
1899
+          back_probe_bed_position = back_out_b ? MAX_PROBE_Y : front_probe_bed_position + MIN_PROBE_EDGE;
1861 1900
         }
1862 1901
         return;
1863 1902
       }
@@ -1935,7 +1974,7 @@ inline void gcode_G28() {
1935 1974
           else
1936 1975
             act = ProbeEngageRetract;
1937 1976
 
1938
-          measured_z = probe_pt(xProbe, yProbe, z_before, act);
1977
+          measured_z = probe_pt(xProbe, yProbe, z_before, act, verbose_level);
1939 1978
 
1940 1979
           mean += measured_z;
1941 1980
 
@@ -1960,15 +1999,15 @@ inline void gcode_G28() {
1960 1999
 
1961 2000
       if (verbose_level) {
1962 2001
         SERIAL_PROTOCOLPGM("Eqn coefficients: a: ");
1963
-        SERIAL_PROTOCOL(plane_equation_coefficients[0]);
2002
+        SERIAL_PROTOCOL(plane_equation_coefficients[0] + 0.0001);
1964 2003
         SERIAL_PROTOCOLPGM(" b: ");
1965
-        SERIAL_PROTOCOL(plane_equation_coefficients[1]);
2004
+        SERIAL_PROTOCOL(plane_equation_coefficients[1] + 0.0001);
1966 2005
         SERIAL_PROTOCOLPGM(" d: ");
1967
-        SERIAL_PROTOCOLLN(plane_equation_coefficients[2]);
2006
+        SERIAL_PROTOCOLLN(plane_equation_coefficients[2] + 0.0001);
1968 2007
         if (verbose_level > 2) {
1969 2008
           SERIAL_PROTOCOLPGM("Mean of sampled points: ");
1970 2009
           SERIAL_PROTOCOL_F(mean, 6);
1971
-          SERIAL_PROTOCOLPGM(" \n");
2010
+          SERIAL_EOL;
1972 2011
         }
1973 2012
       }
1974 2013
 
@@ -2000,14 +2039,14 @@ inline void gcode_G28() {
2000 2039
                 ;
2001 2040
                 float diff = eqnBVector[ind] - mean;
2002 2041
                 if (diff >= 0.0)
2003
-                  SERIAL_PROTOCOLPGM(" +");   // Watch column alignment in Pronterface
2042
+                  SERIAL_PROTOCOLPGM(" +");   // Include + for column alignment
2004 2043
                 else
2005
-                  SERIAL_PROTOCOLPGM(" -");
2044
+                  SERIAL_PROTOCOLPGM(" ");
2006 2045
                 SERIAL_PROTOCOL_F(diff, 5);
2007 2046
               } // xx
2008
-              SERIAL_PROTOCOLPGM("\n");
2047
+              SERIAL_EOL;
2009 2048
           } // yy
2010
-          SERIAL_PROTOCOLPGM("\n");
2049
+          SERIAL_EOL;
2011 2050
 
2012 2051
       } //topo_flag
2013 2052
 
@@ -2022,14 +2061,14 @@ inline void gcode_G28() {
2022 2061
 
2023 2062
       if (enhanced_g29) {
2024 2063
         // Basic Enhanced G29
2025
-        z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, ProbeEngage);
2026
-        z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, ProbeStay);
2027
-        z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, ProbeRetract);
2064
+        z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, ProbeEngage, verbose_level);
2065
+        z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, ProbeStay, verbose_level);
2066
+        z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, ProbeRetract, verbose_level);
2028 2067
       }
2029 2068
       else {
2030
-        z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING);
2031
-        z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
2032
-        z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);
2069
+        z_at_pt_1 = probe_pt(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, Z_RAISE_BEFORE_PROBING, verbose_level);
2070
+        z_at_pt_2 = probe_pt(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, verbose_level);
2071
+        z_at_pt_3 = probe_pt(ABL_PROBE_PT_3_X, ABL_PROBE_PT_3_Y, current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS, verbose_level);
2033 2072
       }
2034 2073
       clean_up_after_endstop_move();
2035 2074
       set_bed_level_equation_3pts(z_at_pt_1, z_at_pt_2, z_at_pt_3);
@@ -2041,7 +2080,7 @@ inline void gcode_G28() {
2041 2080
     if (verbose_level > 0)
2042 2081
       plan_bed_level_matrix.debug(" \n\nBed Level Correction Matrix:");
2043 2082
 
2044
-    // The following code correct the Z height difference from z-probe position and hotend tip position.
2083
+    // Correct the Z height difference from z-probe position and hotend tip position.
2045 2084
     // The Z height on homing is measured by Z-Probe, but the probe is quite far from the hotend.
2046 2085
     // When the bed is uneven, this height must be corrected.
2047 2086
     real_z = float(st_get_position(Z_AXIS)) / axis_steps_per_unit[Z_AXIS];  //get the real Z (since the auto bed leveling is already correcting the plane)
@@ -2071,12 +2110,12 @@ inline void gcode_G28() {
2071 2110
       run_z_probe();
2072 2111
       SERIAL_PROTOCOLPGM(MSG_BED);
2073 2112
       SERIAL_PROTOCOLPGM(" X: ");
2074
-      SERIAL_PROTOCOL(current_position[X_AXIS]);
2113
+      SERIAL_PROTOCOL(current_position[X_AXIS] + 0.0001);
2075 2114
       SERIAL_PROTOCOLPGM(" Y: ");
2076
-      SERIAL_PROTOCOL(current_position[Y_AXIS]);
2115
+      SERIAL_PROTOCOL(current_position[Y_AXIS] + 0.0001);
2077 2116
       SERIAL_PROTOCOLPGM(" Z: ");
2078
-      SERIAL_PROTOCOL(current_position[Z_AXIS]);
2079
-      SERIAL_PROTOCOLPGM("\n");
2117
+      SERIAL_PROTOCOL(current_position[Z_AXIS] + 0.0001);
2118
+      SERIAL_EOL;
2080 2119
 
2081 2120
       clean_up_after_endstop_move();
2082 2121
       retract_z_probe(); // Retract Z Servo endstop if available
@@ -2603,8 +2642,7 @@ inline void gcode_M42() {
2603 2642
         SERIAL_PROTOCOL_F(sigma,6);
2604 2643
       }
2605 2644
 
2606
-      if (verbose_level > 0) 
2607
-        SERIAL_PROTOCOLPGM("\n");
2645
+      if (verbose_level > 0) SERIAL_EOL;
2608 2646
 
2609 2647
       plan_buffer_line(X_probe_location, Y_probe_location, Z_start_location,
2610 2648
           current_position[E_AXIS], homing_feedrate[Z_AXIS]/60, active_extruder);
@@ -2626,12 +2664,12 @@ inline void gcode_M42() {
2626 2664
     if (verbose_level > 0) {
2627 2665
       SERIAL_PROTOCOLPGM("Mean: ");
2628 2666
       SERIAL_PROTOCOL_F(mean, 6);
2629
-      SERIAL_PROTOCOLPGM("\n");
2667
+      SERIAL_EOL;
2630 2668
     }
2631 2669
 
2632 2670
     SERIAL_PROTOCOLPGM("Standard Deviation: ");
2633 2671
     SERIAL_PROTOCOL_F(sigma, 6);
2634
-    SERIAL_PROTOCOLPGM("\n\n");
2672
+    SERIAL_EOL; SERIAL_EOL;
2635 2673
   }
2636 2674
 
2637 2675
 #endif // ENABLE_AUTO_BED_LEVELING && Z_PROBE_REPEATABILITY_TEST
@@ -3438,11 +3476,11 @@ inline void gcode_M226() {
3438 3476
     if (code_seen('S')) {
3439 3477
       servo_position = code_value();
3440 3478
       if ((servo_index >= 0) && (servo_index < NUM_SERVOS)) {
3441
-        #if defined(ENABLE_AUTO_BED_LEVELING) && PROBE_SERVO_DEACTIVATION_DELAY > 0
3479
+        #if SERVO_LEVELING
3442 3480
           servos[servo_index].attach(0);
3443 3481
         #endif
3444 3482
         servos[servo_index].write(servo_position);
3445
-        #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
3483
+        #if SERVO_LEVELING
3446 3484
           delay(PROBE_SERVO_DEACTIVATION_DELAY);
3447 3485
           servos[servo_index].detach();
3448 3486
         #endif

+ 46
- 64
Marlin/example_configurations/Hephestos/Configuration.h Zobrazit soubor

@@ -82,7 +82,7 @@ Here are some standard links for getting your machine calibrated:
82 82
 // #define PS_DEFAULT_OFF
83 83
 
84 84
 //===========================================================================
85
-//============================= Thermal Settings  ============================
85
+//============================= Thermal Settings ============================
86 86
 //===========================================================================
87 87
 //
88 88
 //--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
@@ -118,6 +118,10 @@ Here are some standard links for getting your machine calibrated:
118 118
 // 1010 is Pt1000 with 1k pullup (non standard)
119 119
 // 147 is Pt100 with 4k7 pullup
120 120
 // 110 is Pt100 with 1k pullup (non standard)
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
122
+//     Use it for Testing or Development purposes. NEVER for production machine.
123
+//     #define DUMMY_THERMISTOR_998_VALUE 25
124
+//     #define DUMMY_THERMISTOR_999_VALUE 100
121 125
 
122 126
 #define TEMP_SENSOR_0 1
123 127
 #define TEMP_SENSOR_1 0
@@ -297,9 +301,12 @@ your extruder heater takes 2 minutes to hit the target on heating.
297 301
 //============================= Mechanical Settings =========================
298 302
 //===========================================================================
299 303
 
300
-// Uncomment the following line to enable CoreXY kinematics
304
+// Uncomment this option to enable CoreXY kinematics
301 305
 // #define COREXY
302 306
 
307
+// Enable this option for Toshiba steppers
308
+// #define CONFIG_STEPPERS_TOSHIBA
309
+
303 310
 // coarse Endstop Settings
304 311
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
305 312
 
@@ -332,11 +339,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
332 339
 //#define DISABLE_MAX_ENDSTOPS
333 340
 //#define DISABLE_MIN_ENDSTOPS
334 341
 
335
-// Disable max endstops for compatibility with endstop checking routine
336
-#if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
337
-  #define DISABLE_MAX_ENDSTOPS
338
-#endif
339
-
340 342
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
341 343
 #define X_ENABLE_ON 0
342 344
 #define Y_ENABLE_ON 0
@@ -389,40 +391,38 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
389 391
 
390 392
 #ifdef ENABLE_AUTO_BED_LEVELING
391 393
 
392
-// There are 2 different ways to pick the X and Y locations to probe:
393
-
394
-//  - "grid" mode
395
-//    Probe every point in a rectangular grid
396
-//    You must specify the rectangle, and the density of sample points
397
-//    This mode is preferred because there are more measurements.
398
-//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
399
-
400
-//  - "3-point" mode
401
-//    Probe 3 arbitrary points on the bed (that aren't colinear)
402
-//    You must specify the X & Y coordinates of all 3 points
403
-
394
+  // There are 2 different ways to specify probing locations
395
+  //
396
+  // - "grid" mode
397
+  //   Probe several points in a rectangular grid.
398
+  //   You specify the rectangle and the density of sample points.
399
+  //   This mode is preferred because there are more measurements.
400
+  //
401
+  // - "3-point" mode
402
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
403
+  //   You specify the XY coordinates of all 3 points.
404
+
405
+  // Enable this to sample the bed in a grid (least squares solution)
406
+  // Note: this feature generates 10KB extra code size
404 407
   #define AUTO_BED_LEVELING_GRID
405
-  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
406
-  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
407
-  // and least squares solution is calculated
408
-  // Note: this feature occupies 10'206 byte
408
+
409 409
   #ifdef AUTO_BED_LEVELING_GRID
410 410
 
411
-    // set the rectangle in which to probe
411
+    // The edges of the rectangle in which to probe
412 412
     #define LEFT_PROBE_BED_POSITION 15
413 413
     #define RIGHT_PROBE_BED_POSITION 170
414
-    #define BACK_PROBE_BED_POSITION 180
415 414
     #define FRONT_PROBE_BED_POSITION 20
415
+    #define BACK_PROBE_BED_POSITION 170
416 416
 
417
-     // set the number of grid points per dimension
418
-     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
417
+    // Set the number of grid points per dimension
418
+    // You probably don't need more than 3 (squared=9)
419 419
     #define AUTO_BED_LEVELING_GRID_POINTS 2
420 420
 
421 421
 
422
-  #else  // not AUTO_BED_LEVELING_GRID
423
-    // with no grid, just probe 3 arbitrary points.  A simple cross-product
424
-    // is used to esimate the plane of the print bed
422
+  #else  // !AUTO_BED_LEVELING_GRID
425 423
 
424
+      // Arbitrary points to probe. A simple cross-product
425
+      // is used to estimate the plane of the bed.
426 426
       #define ABL_PROBE_PT_1_X 15
427 427
       #define ABL_PROBE_PT_1_Y 180
428 428
       #define ABL_PROBE_PT_2_X 15
@@ -433,11 +433,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
433 433
   #endif // AUTO_BED_LEVELING_GRID
434 434
 
435 435
 
436
-  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
436
+  // Offsets to the probe relative to the extruder tip (Hotend - Probe)
437 437
   // X and Y offsets must be integers
438
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
439
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
440
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
438
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
439
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
440
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
441 441
 
442 442
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
443 443
                                         // Be sure you have this distance over your Z_MAX_POS in case
@@ -474,29 +474,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
474 474
 
475 475
   #endif
476 476
 
477
-  #ifdef AUTO_BED_LEVELING_GRID	// Check if Probe_Offset * Grid Points is greater than Probing Range
478
-    #if X_PROBE_OFFSET_FROM_EXTRUDER < 0
479
-      #if (-(X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
480
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
481
-	  #endif
482
-	#else
483
-      #if ((X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
484
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
485
-	  #endif
486
-	#endif
487
-    #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
488
-      #if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
489
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
490
-	  #endif
491
-	#else
492
-      #if ((Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
493
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
494
-	  #endif
495
-	#endif
496
-
497
-	
498
-  #endif
499
-  
500 477
 #endif // ENABLE_AUTO_BED_LEVELING
501 478
 
502 479
 
@@ -536,9 +513,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
536 513
 #define DEFAULT_EJERK                 5.0    // (mm/sec)
537 514
 
538 515
 
539
-//===========================================================================
540
-//============================= Additional Features =========================
541
-//===========================================================================
516
+//=============================================================================
517
+//============================= Additional Features ===========================
518
+//=============================================================================
542 519
 
543 520
 // Custom M code points
544 521
 #define CUSTOM_M_CODES
@@ -569,7 +546,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
569 546
 #define ABS_PREHEAT_HPB_TEMP 100
570 547
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
571 548
 
572
-//LCD and SD support
549
+//==============================LCD and SD support=============================
550
+
551
+// Define your display language below. Replace (en) with your language code and uncomment.
552
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
553
+// See also language.h
554
+//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
573 555
 
574 556
 // Character based displays can have different extended charsets.
575 557
 #define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
@@ -583,7 +565,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
583 565
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
584 566
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
585 567
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
586
-#define ULTIPANEL  //the UltiPanel as on Thingiverse
568
+//#define ULTIPANEL  //the UltiPanel as on Thingiverse
587 569
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
588 570
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
589 571
 
@@ -750,7 +732,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
750 732
   #define SDSUPPORT
751 733
   #define ULTRA_LCD
752 734
   #ifdef DOGLCD // Change number of lines to match the DOG graphic display
753
-    #define LCD_WIDTH 20
735
+    #define LCD_WIDTH 22
754 736
     #define LCD_HEIGHT 5
755 737
   #else
756 738
     #define LCD_WIDTH 20
@@ -759,7 +741,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
759 741
 #else //no panel but just LCD
760 742
   #ifdef ULTRA_LCD
761 743
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
762
-    #define LCD_WIDTH 20
744
+    #define LCD_WIDTH 22
763 745
     #define LCD_HEIGHT 5
764 746
   #else
765 747
     #define LCD_WIDTH 16

+ 45
- 68
Marlin/example_configurations/K8200/Configuration.h Zobrazit soubor

@@ -3,13 +3,12 @@
3 3
 
4 4
 #include "boards.h"
5 5
 
6
-
7 6
 //===========================================================================
8 7
 //============================= Getting Started =============================
9 8
 //===========================================================================
10 9
 /*
11 10
 Here are some standard links for getting your machine calibrated:
12
- * http://reprap.org/wiki/Calibration 
11
+ * http://reprap.org/wiki/Calibration
13 12
  * http://youtu.be/wAL9d7FgInk
14 13
  * http://calculator.josefprusa.cz
15 14
  * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
@@ -39,7 +38,7 @@ Here are some standard links for getting your machine calibrated:
39 38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
40 39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
41 40
 // build by the user have been successfully uploaded into firmware.
42
-#define STRING_VERSION "v1.0.2"
41
+#define STRING_VERSION "1.0.2"
43 42
 #define STRING_URL "reprap.org"
44 43
 #define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
45 44
 #define STRING_CONFIG_H_AUTHOR "(K8200, CONSULitAS)" // Who made the changes.
@@ -82,7 +81,6 @@ Here are some standard links for getting your machine calibrated:
82 81
 // Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
83 82
 // #define PS_DEFAULT_OFF
84 83
 
85
-
86 84
 //===========================================================================
87 85
 //============================= Thermal Settings ============================
88 86
 //===========================================================================
@@ -120,6 +118,10 @@ Here are some standard links for getting your machine calibrated:
120 118
 // 1010 is Pt1000 with 1k pullup (non standard)
121 119
 // 147 is Pt100 with 4k7 pullup
122 120
 // 110 is Pt100 with 1k pullup (non standard)
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
122
+//     Use it for Testing or Development purposes. NEVER for production machine.
123
+//     #define DUMMY_THERMISTOR_998_VALUE 25
124
+//     #define DUMMY_THERMISTOR_999_VALUE 100
123 125
 
124 126
 #define TEMP_SENSOR_0 5
125 127
 #define TEMP_SENSOR_1 0
@@ -260,7 +262,6 @@ Here are some standard links for getting your machine calibrated:
260 262
 #define EXTRUDE_MINTEMP 170
261 263
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
262 264
 
263
-
264 265
 //===========================================================================
265 266
 //============================= Thermal Runaway Protection ==================
266 267
 //===========================================================================
@@ -305,9 +306,12 @@ your extruder heater takes 2 minutes to hit the target on heating.
305 306
 //============================= Mechanical Settings =========================
306 307
 //===========================================================================
307 308
 
308
-// Uncomment the following line to enable CoreXY kinematics
309
+// Uncomment this option to enable CoreXY kinematics
309 310
 // #define COREXY
310 311
 
312
+// Enable this option for Toshiba steppers
313
+// #define CONFIG_STEPPERS_TOSHIBA
314
+
311 315
 // coarse Endstop Settings
312 316
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
313 317
 
@@ -340,11 +344,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
340 344
 #define DISABLE_MAX_ENDSTOPS
341 345
 //#define DISABLE_MIN_ENDSTOPS
342 346
 
343
-// Disable max endstops for compatibility with endstop checking routine
344
-#if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
345
-  #define DISABLE_MAX_ENDSTOPS
346
-#endif
347
-
348 347
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
349 348
 #define X_ENABLE_ON 0
350 349
 #define Y_ENABLE_ON 0
@@ -397,40 +396,38 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
397 396
 
398 397
 #ifdef ENABLE_AUTO_BED_LEVELING
399 398
 
400
-// There are 2 different ways to pick the X and Y locations to probe:
401
-
402
-//  - "grid" mode
403
-//    Probe every point in a rectangular grid
404
-//    You must specify the rectangle, and the density of sample points
405
-//    This mode is preferred because there are more measurements.
406
-//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
407
-
408
-//  - "3-point" mode
409
-//    Probe 3 arbitrary points on the bed (that aren't colinear)
410
-//    You must specify the X & Y coordinates of all 3 points
411
-
399
+  // There are 2 different ways to specify probing locations
400
+  //
401
+  // - "grid" mode
402
+  //   Probe several points in a rectangular grid.
403
+  //   You specify the rectangle and the density of sample points.
404
+  //   This mode is preferred because there are more measurements.
405
+  //
406
+  // - "3-point" mode
407
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
408
+  //   You specify the XY coordinates of all 3 points.
409
+
410
+  // Enable this to sample the bed in a grid (least squares solution)
411
+  // Note: this feature generates 10KB extra code size
412 412
   #define AUTO_BED_LEVELING_GRID
413
-  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
414
-  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
415
-  // and least squares solution is calculated
416
-  // Note: this feature occupies 10'206 byte
413
+
417 414
   #ifdef AUTO_BED_LEVELING_GRID
418 415
 
419
-    // set the rectangle in which to probe
416
+    // The edges of the rectangle in which to probe
420 417
     #define LEFT_PROBE_BED_POSITION 15
421 418
     #define RIGHT_PROBE_BED_POSITION 170
422
-    #define BACK_PROBE_BED_POSITION 180
423 419
     #define FRONT_PROBE_BED_POSITION 20
420
+    #define BACK_PROBE_BED_POSITION 170
424 421
 
425
-     // set the number of grid points per dimension
426
-     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
422
+    // Set the number of grid points per dimension
423
+    // You probably don't need more than 3 (squared=9)
427 424
     #define AUTO_BED_LEVELING_GRID_POINTS 2
428 425
 
429 426
 
430
-  #else  // not AUTO_BED_LEVELING_GRID
431
-    // with no grid, just probe 3 arbitrary points.  A simple cross-product
432
-    // is used to esimate the plane of the print bed
427
+  #else  // !AUTO_BED_LEVELING_GRID
433 428
 
429
+      // Arbitrary points to probe. A simple cross-product
430
+      // is used to estimate the plane of the bed.
434 431
       #define ABL_PROBE_PT_1_X 15
435 432
       #define ABL_PROBE_PT_1_Y 180
436 433
       #define ABL_PROBE_PT_2_X 15
@@ -441,11 +438,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
441 438
   #endif // AUTO_BED_LEVELING_GRID
442 439
 
443 440
 
444
-  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
441
+  // Offsets to the probe relative to the extruder tip (Hotend - Probe)
445 442
   // X and Y offsets must be integers
446
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
447
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
448
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
443
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
444
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
445
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
449 446
 
450 447
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
451 448
                                         // Be sure you have this distance over your Z_MAX_POS in case
@@ -482,29 +479,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
482 479
 
483 480
   #endif
484 481
 
485
-  #ifdef AUTO_BED_LEVELING_GRID	// Check if Probe_Offset * Grid Points is greater than Probing Range
486
-    #if X_PROBE_OFFSET_FROM_EXTRUDER < 0
487
-      #if (-(X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
488
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
489
-	  #endif
490
-	#else
491
-      #if ((X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
492
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
493
-	  #endif
494
-	#endif
495
-    #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
496
-      #if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
497
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
498
-	  #endif
499
-	#else
500
-      #if ((Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
501
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
502
-	  #endif
503
-	#endif
504
-
505
-	
506
-  #endif
507
-  
508 482
 #endif // ENABLE_AUTO_BED_LEVELING
509 483
 
510 484
 
@@ -544,9 +518,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
544 518
 #define DEFAULT_EJERK                 5.0    // (mm/sec)
545 519
 
546 520
 
547
-//===========================================================================
548
-//============================= Additional Features =========================
549
-//===========================================================================
521
+//=============================================================================
522
+//============================= Additional Features ===========================
523
+//=============================================================================
550 524
 
551 525
 // Custom M code points
552 526
 #define CUSTOM_M_CODES
@@ -577,9 +551,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
577 551
 #define ABS_PREHEAT_HPB_TEMP 60
578 552
 #define ABS_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
579 553
 
580
-//LCD and SD support
554
+//==============================LCD and SD support=============================
581 555
 
582
-// VM8201 (LCD Option for K8200) uses "DISPLAY_CHARSET_HD44870_JAPAN" and "ULTIMAKERCONTROLLER"
556
+// Define your display language below. Replace (en) with your language code and uncomment.
557
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
558
+// See also language.h
559
+//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
583 560
 
584 561
 // Character based displays can have different extended charsets.
585 562
 #define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
@@ -760,7 +737,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
760 737
   #define SDSUPPORT
761 738
   #define ULTRA_LCD
762 739
   #ifdef DOGLCD // Change number of lines to match the DOG graphic display
763
-    #define LCD_WIDTH 20
740
+    #define LCD_WIDTH 22
764 741
     #define LCD_HEIGHT 5
765 742
   #else
766 743
     #define LCD_WIDTH 20
@@ -769,7 +746,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
769 746
 #else //no panel but just LCD
770 747
   #ifdef ULTRA_LCD
771 748
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
772
-    #define LCD_WIDTH 20
749
+    #define LCD_WIDTH 22
773 750
     #define LCD_HEIGHT 5
774 751
   #else
775 752
     #define LCD_WIDTH 16

+ 90
- 79
Marlin/example_configurations/SCARA/Configuration.h Zobrazit soubor

@@ -3,13 +3,12 @@
3 3
 
4 4
 #include "boards.h"
5 5
 
6
-
7 6
 //===========================================================================
8 7
 //============================= Getting Started =============================
9 8
 //===========================================================================
10 9
 /*
11 10
 Here are some standard links for getting your machine calibrated:
12
- * http://reprap.org/wiki/Calibration 
11
+ * http://reprap.org/wiki/Calibration
13 12
  * http://youtu.be/wAL9d7FgInk
14 13
  * http://calculator.josefprusa.cz
15 14
  * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
@@ -18,7 +17,6 @@ Here are some standard links for getting your machine calibrated:
18 17
  * http://www.thingiverse.com/thing:298812
19 18
 */
20 19
 
21
-
22 20
 // This configuration file contains the basic settings.
23 21
 // Advanced settings can be found in Configuration_adv.h
24 22
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
@@ -52,7 +50,7 @@ Here are some standard links for getting your machine calibrated:
52 50
 #define L2_2 sq(Linkage_2) // do not change
53 51
 
54 52
 //===========================================================================
55
-//========================= SCARA Settings end ==================================
53
+//========================= SCARA Settings end ==============================
56 54
 //===========================================================================
57 55
 
58 56
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
@@ -71,7 +69,6 @@ Here are some standard links for getting your machine calibrated:
71 69
 #define SERIAL_PORT 0
72 70
 
73 71
 // This determines the communication speed of the printer
74
-// This determines the communication speed of the printer
75 72
 #define BAUDRATE 250000
76 73
 
77 74
 // This enables the serial port associated to the Bluetooth interface
@@ -125,6 +122,7 @@ Here are some standard links for getting your machine calibrated:
125 122
 // 10 is 100k RS thermistor 198-961 (4.7k pullup)
126 123
 // 11 is 100k beta 3950 1% thermistor (4.7k pullup)
127 124
 // 12 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
125
+// 13 is 100k Hisens 3950  1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 
128 126
 // 20 is the PT100 circuit found in the Ultimainboard V2.x
129 127
 // 60 is 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
130 128
 //
@@ -138,6 +136,10 @@ Here are some standard links for getting your machine calibrated:
138 136
 // 1010 is Pt1000 with 1k pullup (non standard)
139 137
 // 147 is Pt100 with 4k7 pullup
140 138
 // 110 is Pt100 with 1k pullup (non standard)
139
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
140
+//     Use it for Testing or Development purposes. NEVER for production machine.
141
+//     #define DUMMY_THERMISTOR_998_VALUE 25
142
+//     #define DUMMY_THERMISTOR_999_VALUE 100
141 143
 
142 144
 #define TEMP_SENSOR_0 1
143 145
 #define TEMP_SENSOR_1 0
@@ -189,31 +191,24 @@ Here are some standard links for getting your machine calibrated:
189 191
 // Comment the following line to disable PID and enable bang-bang.
190 192
 #define PIDTEMP
191 193
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
192
-#define PID_MAX 255 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
194
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
193 195
 #ifdef PIDTEMP
194 196
   //#define PID_DEBUG // Sends debug data to the serial port.
195 197
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
198
+  //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
199
+  //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
200
+                                    // Set/get with gcode: M301 E[extruder number, 0-2]
196 201
   #define PID_FUNCTIONAL_RANGE 20 // If the temperature difference between the target temperature and the actual temperature
197 202
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
198
-  #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term
203
+  #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
199 204
   #define K1 0.95 //smoothing factor within the PID
200
-  #define PID_dT ((OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
205
+  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
201 206
 
202 207
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
203 208
 // Ultimaker
204
-  //  #define  DEFAULT_Kp 22.2
205
-  //  #define  DEFAULT_Ki 1.08
206
-   // #define  DEFAULT_Kd 114
207
-  
208
- // Jhead MK5: From Autotune  
209
-  //  #define  DEFAULT_Kp 20.92
210
-   // #define  DEFAULT_Ki 1.51
211
-  //  #define  DEFAULT_Kd 72.34
212
-    
213
- //Merlin Hotend: From Autotune  
214
-    #define  DEFAULT_Kp 24.5
215
-    #define  DEFAULT_Ki 1.72
216
-    #define  DEFAULT_Kd 87.73
209
+//    #define  DEFAULT_Kp 22.2
210
+//    #define  DEFAULT_Ki 1.08
211
+//    #define  DEFAULT_Kd 114
217 212
 
218 213
 // MakerGear
219 214
 //    #define  DEFAULT_Kp 7.0
@@ -221,9 +216,20 @@ Here are some standard links for getting your machine calibrated:
221 216
 //    #define  DEFAULT_Kd 12
222 217
 
223 218
 // Mendel Parts V9 on 12V
224
-  //  #define  DEFAULT_Kp 63.0
225
-   // #define  DEFAULT_Ki 2.25
226
-   // #define  DEFAULT_Kd 440
219
+//    #define  DEFAULT_Kp 63.0
220
+//    #define  DEFAULT_Ki 2.25
221
+//    #define  DEFAULT_Kd 440
222
+  
223
+// Jhead MK5: From Autotune
224
+//    #define  DEFAULT_Kp 20.92
225
+//    #define  DEFAULT_Ki 1.51
226
+//    #define  DEFAULT_Kd 72.34
227
+    
228
+// Merlin Hotend: From Autotune
229
+    #define  DEFAULT_Kp 24.5
230
+    #define  DEFAULT_Ki 1.72
231
+    #define  DEFAULT_Kd 87.73
232
+
227 233
 #endif // PIDTEMP
228 234
 
229 235
 //===========================================================================
@@ -251,9 +257,9 @@ Here are some standard links for getting your machine calibrated:
251 257
 #ifdef PIDTEMPBED
252 258
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
253 259
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
254
-  //  #define  DEFAULT_bedKp 10.00
255
-  //  #define  DEFAULT_bedKi .023
256
-  //  #define  DEFAULT_bedKd 305.4
260
+//    #define  DEFAULT_bedKp 10.00
261
+//    #define  DEFAULT_bedKi .023
262
+//    #define  DEFAULT_bedKd 305.4
257 263
 
258 264
 //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
259 265
 //from pidautotune
@@ -271,7 +277,6 @@ Here are some standard links for getting your machine calibrated:
271 277
 #endif // PIDTEMPBED
272 278
 
273 279
 
274
-
275 280
 //this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
276 281
 //can be software-disabled for whatever purposes by
277 282
 //#define PREVENT_DANGEROUS_EXTRUDE
@@ -281,7 +286,6 @@ Here are some standard links for getting your machine calibrated:
281 286
 #define EXTRUDE_MINTEMP 150
282 287
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
283 288
 
284
-
285 289
 //===========================================================================
286 290
 //============================= Thermal Runaway Protection ==================
287 291
 //===========================================================================
@@ -323,12 +327,15 @@ your extruder heater takes 2 minutes to hit the target on heating.
323 327
 
324 328
 
325 329
 //===========================================================================
326
-//============================ Mechanical Settings ==========================
330
+//============================= Mechanical Settings =========================
327 331
 //===========================================================================
328 332
 
329
-// Uncomment the following line to enable CoreXY kinematics
333
+// Uncomment this option to enable CoreXY kinematics
330 334
 // #define COREXY
331 335
 
336
+// Enable this option for Toshiba steppers
337
+// #define CONFIG_STEPPERS_TOSHIBA
338
+
332 339
 // coarse Endstop Settings
333 340
 //#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
334 341
 
@@ -361,11 +368,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
361 368
 //#define DISABLE_MAX_ENDSTOPS
362 369
 //#define DISABLE_MIN_ENDSTOPS
363 370
 
364
-// Disable max endstops for compatibility with endstop checking routine
365
-#if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
366
-  #define DISABLE_MAX_ENDSTOPS
367
-#endif
368
-
369 371
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
370 372
 #define X_ENABLE_ON 0
371 373
 #define Y_ENABLE_ON 0
@@ -388,7 +390,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
388 390
 #define INVERT_E3_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
389 391
 
390 392
 // ENDSTOP SETTINGS:
391
-// Sets direction of endstop	s when homing; 1=MAX, -1=MIN
393
+// Sets direction of endstops when homing; 1=MAX, -1=MIN
392 394
 #define X_HOME_DIR 1
393 395
 #define Y_HOME_DIR 1
394 396
 #define Z_HOME_DIR -1
@@ -414,43 +416,42 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
414 416
 //===========================================================================
415 417
 
416 418
 //#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
419
+#define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
417 420
 
418 421
 #ifdef ENABLE_AUTO_BED_LEVELING
419 422
 
420
-// There are 2 different ways to pick the X and Y locations to probe:
421
-
422
-//  - "grid" mode
423
-//    Probe every point in a rectangular grid
424
-//    You must specify the rectangle, and the density of sample points
425
-//    This mode is preferred because there are more measurements.
426
-//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
427
-
428
-//  - "3-point" mode
429
-//    Probe 3 arbitrary points on the bed (that aren't colinear)
430
-//    You must specify the X & Y coordinates of all 3 points
431
-
423
+  // There are 2 different ways to specify probing locations
424
+  //
425
+  // - "grid" mode
426
+  //   Probe several points in a rectangular grid.
427
+  //   You specify the rectangle and the density of sample points.
428
+  //   This mode is preferred because there are more measurements.
429
+  //
430
+  // - "3-point" mode
431
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
432
+  //   You specify the XY coordinates of all 3 points.
433
+
434
+  // Enable this to sample the bed in a grid (least squares solution)
435
+  // Note: this feature generates 10KB extra code size
432 436
   #define AUTO_BED_LEVELING_GRID
433
-  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
434
-  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
435
-  // and least squares solution is calculated
436
-  // Note: this feature occupies 10'206 byte
437
+
437 438
   #ifdef AUTO_BED_LEVELING_GRID
438 439
 
439
-    // set the rectangle in which to probe
440
+    // The edges of the rectangle in which to probe
440 441
     #define LEFT_PROBE_BED_POSITION 15
441 442
     #define RIGHT_PROBE_BED_POSITION 170
442
-    #define BACK_PROBE_BED_POSITION 180
443 443
     #define FRONT_PROBE_BED_POSITION 20
444
+    #define BACK_PROBE_BED_POSITION 170
444 445
 
445
-     // set the number of grid points per dimension
446
-     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
446
+    // Set the number of grid points per dimension
447
+    // You probably don't need more than 3 (squared=9)
447 448
     #define AUTO_BED_LEVELING_GRID_POINTS 2
448 449
 
449 450
 
450
-  #else  // not AUTO_BED_LEVELING_GRID
451
-    // with no grid, just probe 3 arbitrary points.  A simple cross-product
452
-    // is used to esimate the plane of the print bed
451
+  #else  // !AUTO_BED_LEVELING_GRID
453 452
 
453
+      // Arbitrary points to probe. A simple cross-product
454
+      // is used to estimate the plane of the bed.
454 455
       #define ABL_PROBE_PT_1_X 15
455 456
       #define ABL_PROBE_PT_1_Y 180
456 457
       #define ABL_PROBE_PT_2_X 15
@@ -461,10 +462,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
461 462
   #endif // AUTO_BED_LEVELING_GRID
462 463
 
463 464
 
464
-  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
465
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
466
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
467
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
465
+  // Offsets to the probe relative to the extruder tip (Hotend - Probe)
466
+  // X and Y offsets must be integers
467
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
468
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
469
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
468 470
 
469 471
   //#define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
470 472
                                         // Be sure you have this distance over your Z_MAX_POS in case
@@ -474,6 +476,8 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
474 476
   #define Z_RAISE_BEFORE_PROBING 15    //How much the extruder will be raised before traveling to the first probing point.
475 477
   #define Z_RAISE_BETWEEN_PROBINGS 5  //How much the extruder will be raised when traveling from between next probing points
476 478
 
479
+  //#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
480
+  //#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.
477 481
 
478 482
   //If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
479 483
   //The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
@@ -528,7 +532,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
528 532
 #define DEFAULT_RETRACT_ACCELERATION  2000  // X, Y, Z and E max acceleration in mm/s^2 for retracts
529 533
 
530 534
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
531
-// The offset has to be X=0, Y=0 for extruder 0 hotend (default extruder).
535
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
532 536
 // For the other hotends it is their distance from the extruder 0 hotend.
533 537
 // #define EXTRUDER_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis
534 538
 // #define EXTRUDER_OFFSET_Y {0.0, 5.00}  // (in mm) for each extruder, offset of the hotend on the Y axis
@@ -539,9 +543,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
539 543
 #define DEFAULT_EJERK                 3    // (mm/sec)
540 544
 
541 545
 
542
-//===========================================================================
543
-//============================= Additional Features =========================
544
-//===========================================================================
546
+//=============================================================================
547
+//============================= Additional Features ===========================
548
+//=============================================================================
545 549
 
546 550
 // Custom M code points
547 551
 //#define CUSTOM_M_CODES
@@ -572,7 +576,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
572 576
 #define ABS_PREHEAT_HPB_TEMP 100
573 577
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
574 578
 
575
-//LCD and SD support
579
+//==============================LCD and SD support=============================
580
+
581
+// Define your display language below. Replace (en) with your language code and uncomment.
582
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
583
+// See also language.h
584
+//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
576 585
 
577 586
 // Character based displays can have different extended charsets.
578 587
 #define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
@@ -738,11 +747,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
738 747
 // Shift register panels
739 748
 // ---------------------
740 749
 // 2 wire Non-latching LCD SR from:
741
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
742
-//#define SR_LCD
743
-#ifdef SR_LCD
744
-   #define SR_LCD_2W_NL    // Non latching 2 wire shift register
745
-   //#define NEWPANEL
750
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
751
+
752
+//#define SAV_3DLCD
753
+#ifdef SAV_3DLCD
754
+   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
755
+   #define NEWPANEL
756
+   #define ULTIPANEL
746 757
 #endif
747 758
 
748 759
 
@@ -751,7 +762,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
751 762
   #define SDSUPPORT
752 763
   #define ULTRA_LCD
753 764
   #ifdef DOGLCD // Change number of lines to match the DOG graphic display
754
-    #define LCD_WIDTH 20
765
+    #define LCD_WIDTH 22
755 766
     #define LCD_HEIGHT 5
756 767
   #else
757 768
     #define LCD_WIDTH 20
@@ -760,7 +771,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
760 771
 #else //no panel but just LCD
761 772
   #ifdef ULTRA_LCD
762 773
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
763
-    #define LCD_WIDTH 20
774
+    #define LCD_WIDTH 22
764 775
     #define LCD_HEIGHT 5
765 776
   #else
766 777
     #define LCD_WIDTH 16
@@ -844,13 +855,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
844 855
 // Uncomment below to enable
845 856
 //#define FILAMENT_SENSOR
846 857
 
847
-#define FILAMENT_SENSOR_EXTRUDER_NUM  0  //The number of the extruder that has the filament sensor (0,1,2)
848
-#define MEASUREMENT_DELAY_CM      14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
858
+#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
859
+#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
849 860
 
850 861
 #define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
851 862
 #define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
852 863
 #define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
853
-#define MAX_MEASUREMENT_DELAY     20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
864
+#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
854 865
 
855 866
 //defines used in the code
856 867
 #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 

+ 47
- 70
Marlin/example_configurations/WITBOX/Configuration.h Zobrazit soubor

@@ -3,13 +3,12 @@
3 3
 
4 4
 #include "boards.h"
5 5
 
6
-
7 6
 //===========================================================================
8 7
 //============================= Getting Started =============================
9 8
 //===========================================================================
10 9
 /*
11 10
 Here are some standard links for getting your machine calibrated:
12
- * http://reprap.org/wiki/Calibration 
11
+ * http://reprap.org/wiki/Calibration
13 12
  * http://youtu.be/wAL9d7FgInk
14 13
  * http://calculator.josefprusa.cz
15 14
  * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
@@ -18,7 +17,6 @@ Here are some standard links for getting your machine calibrated:
18 17
  * http://www.thingiverse.com/thing:298812
19 18
 */
20 19
 
21
-
22 20
 // This configuration file contains the basic settings.
23 21
 // Advanced settings can be found in Configuration_adv.h
24 22
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
@@ -83,7 +81,6 @@ Here are some standard links for getting your machine calibrated:
83 81
 // Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
84 82
 // #define PS_DEFAULT_OFF
85 83
 
86
-
87 84
 //===========================================================================
88 85
 //============================= Thermal Settings ============================
89 86
 //===========================================================================
@@ -121,6 +118,10 @@ Here are some standard links for getting your machine calibrated:
121 118
 // 1010 is Pt1000 with 1k pullup (non standard)
122 119
 // 147 is Pt100 with 4k7 pullup
123 120
 // 110 is Pt100 with 1k pullup (non standard)
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
122
+//     Use it for Testing or Development purposes. NEVER for production machine.
123
+//     #define DUMMY_THERMISTOR_998_VALUE 25
124
+//     #define DUMMY_THERMISTOR_999_VALUE 100
124 125
 
125 126
 #define TEMP_SENSOR_0 1
126 127
 #define TEMP_SENSOR_1 0
@@ -164,7 +165,6 @@ Here are some standard links for getting your machine calibrated:
164 165
 //#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
165 166
 //#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
166 167
 
167
-
168 168
 //===========================================================================
169 169
 //============================= PID Settings ================================
170 170
 //===========================================================================
@@ -184,7 +184,7 @@ Here are some standard links for getting your machine calibrated:
184 184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185 185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186 186
   #define K1 0.95 //smoothing factor within the PID
187
-  #define PID_dT ((OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
187
+  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188 188
 
189 189
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190 190
 // Ultimaker
@@ -256,7 +256,6 @@ Here are some standard links for getting your machine calibrated:
256 256
 #define EXTRUDE_MINTEMP 170
257 257
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
258 258
 
259
-
260 259
 //===========================================================================
261 260
 //============================= Thermal Runaway Protection ==================
262 261
 //===========================================================================
@@ -301,9 +300,12 @@ your extruder heater takes 2 minutes to hit the target on heating.
301 300
 //============================= Mechanical Settings =========================
302 301
 //===========================================================================
303 302
 
304
-// Uncomment the following line to enable CoreXY kinematics
303
+// Uncomment this option to enable CoreXY kinematics
305 304
 // #define COREXY
306 305
 
306
+// Enable this option for Toshiba steppers
307
+// #define CONFIG_STEPPERS_TOSHIBA
308
+
307 309
 // coarse Endstop Settings
308 310
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
309 311
 
@@ -336,11 +338,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
336 338
 //#define DISABLE_MAX_ENDSTOPS
337 339
 //#define DISABLE_MIN_ENDSTOPS
338 340
 
339
-// Disable max endstops for compatibility with endstop checking routine
340
-#if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
341
-  #define DISABLE_MAX_ENDSTOPS
342
-#endif
343
-
344 341
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
345 342
 #define X_ENABLE_ON 0
346 343
 #define Y_ENABLE_ON 0
@@ -393,40 +390,38 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
393 390
 
394 391
 #ifdef ENABLE_AUTO_BED_LEVELING
395 392
 
396
-// There are 2 different ways to pick the X and Y locations to probe:
397
-
398
-//  - "grid" mode
399
-//    Probe every point in a rectangular grid
400
-//    You must specify the rectangle, and the density of sample points
401
-//    This mode is preferred because there are more measurements.
402
-//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
403
-
404
-//  - "3-point" mode
405
-//    Probe 3 arbitrary points on the bed (that aren't colinear)
406
-//    You must specify the X & Y coordinates of all 3 points
407
-
393
+  // There are 2 different ways to specify probing locations
394
+  //
395
+  // - "grid" mode
396
+  //   Probe several points in a rectangular grid.
397
+  //   You specify the rectangle and the density of sample points.
398
+  //   This mode is preferred because there are more measurements.
399
+  //
400
+  // - "3-point" mode
401
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
402
+  //   You specify the XY coordinates of all 3 points.
403
+
404
+  // Enable this to sample the bed in a grid (least squares solution)
405
+  // Note: this feature generates 10KB extra code size
408 406
   #define AUTO_BED_LEVELING_GRID
409
-  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
410
-  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
411
-  // and least squares solution is calculated
412
-  // Note: this feature occupies 10'206 byte
407
+
413 408
   #ifdef AUTO_BED_LEVELING_GRID
414 409
 
415
-    // set the rectangle in which to probe
410
+    // The edges of the rectangle in which to probe
416 411
     #define LEFT_PROBE_BED_POSITION 15
417 412
     #define RIGHT_PROBE_BED_POSITION 170
418
-    #define BACK_PROBE_BED_POSITION 180
419 413
     #define FRONT_PROBE_BED_POSITION 20
414
+    #define BACK_PROBE_BED_POSITION 170
420 415
 
421
-     // set the number of grid points per dimension
422
-     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
416
+    // Set the number of grid points per dimension
417
+    // You probably don't need more than 3 (squared=9)
423 418
     #define AUTO_BED_LEVELING_GRID_POINTS 2
424 419
 
425 420
 
426
-  #else  // not AUTO_BED_LEVELING_GRID
427
-    // with no grid, just probe 3 arbitrary points.  A simple cross-product
428
-    // is used to esimate the plane of the print bed
421
+  #else  // !AUTO_BED_LEVELING_GRID
429 422
 
423
+      // Arbitrary points to probe. A simple cross-product
424
+      // is used to estimate the plane of the bed.
430 425
       #define ABL_PROBE_PT_1_X 15
431 426
       #define ABL_PROBE_PT_1_Y 180
432 427
       #define ABL_PROBE_PT_2_X 15
@@ -437,11 +432,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
437 432
   #endif // AUTO_BED_LEVELING_GRID
438 433
 
439 434
 
440
-  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
435
+  // Offsets to the probe relative to the extruder tip (Hotend - Probe)
441 436
   // X and Y offsets must be integers
442
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
443
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
444
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
437
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
438
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
439
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
445 440
 
446 441
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
447 442
                                         // Be sure you have this distance over your Z_MAX_POS in case
@@ -478,29 +473,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
478 473
 
479 474
   #endif
480 475
 
481
-  #ifdef AUTO_BED_LEVELING_GRID	// Check if Probe_Offset * Grid Points is greater than Probing Range
482
-    #if X_PROBE_OFFSET_FROM_EXTRUDER < 0
483
-      #if (-(X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
484
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
485
-	  #endif
486
-	#else
487
-      #if ((X_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
488
-	     #error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
489
-	  #endif
490
-	#endif
491
-    #if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
492
-      #if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
493
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
494
-	  #endif
495
-	#else
496
-      #if ((Y_PROBE_OFFSET_FROM_EXTRUDER * (AUTO_BED_LEVELING_GRID_POINTS-1)) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
497
-	     #error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
498
-	  #endif
499
-	#endif
500
-
501
-	
502
-  #endif
503
-  
504 476
 #endif // ENABLE_AUTO_BED_LEVELING
505 477
 
506 478
 
@@ -540,9 +512,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
540 512
 #define DEFAULT_EJERK                 5.0    // (mm/sec)
541 513
 
542 514
 
543
-//===========================================================================
544
-//============================ Additional Features ==========================
545
-//===========================================================================
515
+//=============================================================================
516
+//============================= Additional Features ===========================
517
+//=============================================================================
546 518
 
547 519
 // Custom M code points
548 520
 #define CUSTOM_M_CODES
@@ -573,7 +545,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
573 545
 #define ABS_PREHEAT_HPB_TEMP 100
574 546
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
575 547
 
576
-//LCD and SD support
548
+//==============================LCD and SD support=============================
549
+
550
+// Define your display language below. Replace (en) with your language code and uncomment.
551
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
552
+// See also language.h
553
+//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
577 554
 
578 555
 // Character based displays can have different extended charsets.
579 556
 #define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
@@ -587,7 +564,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
587 564
 //#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder
588 565
 //#define ENCODER_STEPS_PER_MENU_ITEM 5 // Set according to ENCODER_PULSES_PER_STEP or your liking
589 566
 //#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
590
-#define ULTIPANEL  //the UltiPanel as on Thingiverse
567
+//#define ULTIPANEL  //the UltiPanel as on Thingiverse
591 568
 //#define LCD_FEEDBACK_FREQUENCY_HZ 1000	// this is the tone frequency the buzzer plays when on UI feedback. ie Screen Click
592 569
 //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100 // the duration the buzzer plays the UI feedback sound. ie Screen Click
593 570
 
@@ -754,7 +731,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
754 731
   #define SDSUPPORT
755 732
   #define ULTRA_LCD
756 733
   #ifdef DOGLCD // Change number of lines to match the DOG graphic display
757
-    #define LCD_WIDTH 20
734
+    #define LCD_WIDTH 22
758 735
     #define LCD_HEIGHT 5
759 736
   #else
760 737
     #define LCD_WIDTH 20
@@ -763,7 +740,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
763 740
 #else //no panel but just LCD
764 741
   #ifdef ULTRA_LCD
765 742
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
766
-    #define LCD_WIDTH 20
743
+    #define LCD_WIDTH 22
767 744
     #define LCD_HEIGHT 5
768 745
   #else
769 746
     #define LCD_WIDTH 16

+ 47
- 30
Marlin/example_configurations/delta/Configuration.h Zobrazit soubor

@@ -3,13 +3,12 @@
3 3
 
4 4
 #include "boards.h"
5 5
 
6
-
7 6
 //===========================================================================
8 7
 //============================= Getting Started =============================
9 8
 //===========================================================================
10 9
 /*
11 10
 Here are some standard links for getting your machine calibrated:
12
- * http://reprap.org/wiki/Calibration 
11
+ * http://reprap.org/wiki/Calibration
13 12
  * http://youtu.be/wAL9d7FgInk
14 13
  * http://calculator.josefprusa.cz
15 14
  * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
@@ -22,7 +21,6 @@ Here are some standard links for getting your machine calibrated:
22 21
 // Advanced settings can be found in Configuration_adv.h
23 22
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
24 23
 
25
-
26 24
 //===========================================================================
27 25
 //============================= DELTA Printer ===============================
28 26
 //===========================================================================
@@ -30,6 +28,13 @@ Here are some standard links for getting your machine calibrated:
30 28
 // example_configurations/delta directory.
31 29
 //
32 30
 
31
+//===========================================================================
32
+//============================= SCARA Printer ===============================
33
+//===========================================================================
34
+// For a Delta printer replace the configuration files with the files in the
35
+// example_configurations/SCARA directory.
36
+//
37
+
33 38
 // User-specified version info of this build to display in [Pronterface, etc] terminal window during
34 39
 // startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
35 40
 // build by the user have been successfully uploaded into firmware.
@@ -143,6 +148,10 @@ Here are some standard links for getting your machine calibrated:
143 148
 // 1010 is Pt1000 with 1k pullup (non standard)
144 149
 // 147 is Pt100 with 4k7 pullup
145 150
 // 110 is Pt100 with 1k pullup (non standard)
151
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
152
+//     Use it for Testing or Development purposes. NEVER for production machine.
153
+//     #define DUMMY_THERMISTOR_998_VALUE 25
154
+//     #define DUMMY_THERMISTOR_999_VALUE 100
146 155
 
147 156
 #define TEMP_SENSOR_0 -1
148 157
 #define TEMP_SENSOR_1 -1
@@ -186,7 +195,6 @@ Here are some standard links for getting your machine calibrated:
186 195
 //#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
187 196
 //#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
188 197
 
189
-
190 198
 //===========================================================================
191 199
 //============================= PID Settings ================================
192 200
 //===========================================================================
@@ -195,13 +203,16 @@ Here are some standard links for getting your machine calibrated:
195 203
 // Comment the following line to disable PID and enable bang-bang.
196 204
 #define PIDTEMP
197 205
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
198
-#define PID_MAX 255 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
206
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
199 207
 #ifdef PIDTEMP
200 208
   //#define PID_DEBUG // Sends debug data to the serial port.
201 209
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
210
+  //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
211
+  //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
212
+                                    // Set/get with gcode: M301 E[extruder number, 0-2]
202 213
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
203 214
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
204
-  #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term
215
+  #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
205 216
   #define K1 0.95 //smoothing factor within the PID
206 217
   #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
207 218
 
@@ -222,7 +233,6 @@ Here are some standard links for getting your machine calibrated:
222 233
 //    #define  DEFAULT_Kd 440
223 234
 #endif // PIDTEMP
224 235
 
225
-
226 236
 //===========================================================================
227 237
 //============================= PID > Bed Temperature Control ===============
228 238
 //===========================================================================
@@ -271,7 +281,6 @@ Here are some standard links for getting your machine calibrated:
271 281
 #define EXTRUDE_MINTEMP 170
272 282
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
273 283
 
274
-
275 284
 //===========================================================================
276 285
 //============================= Thermal Runaway Protection ==================
277 286
 //===========================================================================
@@ -316,6 +325,12 @@ your extruder heater takes 2 minutes to hit the target on heating.
316 325
 //============================= Mechanical Settings =========================
317 326
 //===========================================================================
318 327
 
328
+// Uncomment this option to enable CoreXY kinematics
329
+// #define COREXY
330
+
331
+// Enable this option for Toshiba steppers
332
+// #define CONFIG_STEPPERS_TOSHIBA
333
+
319 334
 // coarse Endstop Settings
320 335
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
321 336
 
@@ -348,10 +363,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
348 363
 //#define DISABLE_MAX_ENDSTOPS
349 364
 // Deltas never have min endstops
350 365
 #define DISABLE_MIN_ENDSTOPS
351
-// Disable max endstops for compatibility with endstop checking routine
352
-#if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
353
-  #define DISABLE_MAX_ENDSTOPS
354
-#endif
355 366
 
356 367
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
357 368
 #define X_ENABLE_ON 0
@@ -397,6 +408,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
397 408
 #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
398 409
 #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
399 410
 
411
+
400 412
 //===========================================================================
401 413
 //============================= Bed Auto Leveling ===========================
402 414
 //===========================================================================
@@ -407,12 +419,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
407 419
 
408 420
 
409 421
 // The position of the homing switches
410
-//#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
422
+#define MANUAL_HOME_POSITIONS  // If defined, MANUAL_*_HOME_POS below will be used
411 423
 //#define BED_CENTER_AT_0_0  // If defined, the center of the bed is at (X=0, Y=0)
412 424
 
413 425
 //Manual homing switch locations:
414
-
415
-#define MANUAL_HOME_POSITIONS  // MANUAL_*_HOME_POS below will be used
416 426
 // For deltabots this means top and center of the Cartesian print volume.
417 427
 #define MANUAL_X_HOME_POS 0
418 428
 #define MANUAL_Y_HOME_POS 0
@@ -444,9 +454,10 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
444 454
 #define DEFAULT_ZJERK                 20.0    // (mm/sec) Must be same as XY for delta
445 455
 #define DEFAULT_EJERK                 5.0    // (mm/sec)
446 456
 
447
-//===========================================================================
448
-//============================= Additional Features =========================
449
-//===========================================================================
457
+
458
+//=============================================================================
459
+//============================= Additional Features ===========================
460
+//=============================================================================
450 461
 
451 462
 // Custom M code points
452 463
 #define CUSTOM_M_CODES
@@ -477,7 +488,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
477 488
 #define ABS_PREHEAT_HPB_TEMP 100
478 489
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
479 490
 
480
-//LCD and SD support
491
+//==============================LCD and SD support=============================
492
+
493
+// Define your display language below. Replace (en) with your language code and uncomment.
494
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
495
+// See also language.h
496
+//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
481 497
 
482 498
 // Character based displays can have different extended charsets.
483 499
 #define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
@@ -650,11 +666,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
650 666
 // Shift register panels
651 667
 // ---------------------
652 668
 // 2 wire Non-latching LCD SR from:
653
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
654
-//#define SR_LCD
655
-#ifdef SR_LCD
656
-   #define SR_LCD_2W_NL    // Non latching 2 wire shift register
657
-   //#define NEWPANEL
669
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
670
+
671
+//#define SAV_3DLCD
672
+#ifdef SAV_3DLCD
673
+   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
674
+   #define NEWPANEL
675
+   #define ULTIPANEL
658 676
 #endif
659 677
 
660 678
 
@@ -663,7 +681,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
663 681
   #define SDSUPPORT
664 682
   #define ULTRA_LCD
665 683
   #ifdef DOGLCD // Change number of lines to match the DOG graphic display
666
-    #define LCD_WIDTH 20
684
+    #define LCD_WIDTH 22
667 685
     #define LCD_HEIGHT 5
668 686
   #else
669 687
     #define LCD_WIDTH 20
@@ -672,7 +690,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
672 690
 #else //no panel but just LCD
673 691
   #ifdef ULTRA_LCD
674 692
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
675
-    #define LCD_WIDTH 20
693
+    #define LCD_WIDTH 22
676 694
     #define LCD_HEIGHT 5
677 695
   #else
678 696
     #define LCD_WIDTH 16
@@ -756,13 +774,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
756 774
 // Uncomment below to enable
757 775
 //#define FILAMENT_SENSOR
758 776
 
759
-#define FILAMENT_SENSOR_EXTRUDER_NUM  0  //The number of the extruder that has the filament sensor (0,1,2)
760
-#define MEASUREMENT_DELAY_CM      14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
777
+#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
778
+#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
761 779
 
762 780
 #define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
763 781
 #define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
764 782
 #define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
765
-#define MAX_MEASUREMENT_DELAY     20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
783
+#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
766 784
 
767 785
 //defines used in the code
768 786
 #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 
@@ -775,7 +793,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
775 793
 
776 794
 
777 795
 
778
-
779 796
 #include "Configuration_adv.h"
780 797
 #include "thermistortables.h"
781 798
 

+ 59
- 56
Marlin/example_configurations/makibox/Configuration.h Zobrazit soubor

@@ -3,13 +3,12 @@
3 3
 
4 4
 #include "boards.h"
5 5
 
6
-
7 6
 //===========================================================================
8 7
 //============================= Getting Started =============================
9 8
 //===========================================================================
10 9
 /*
11 10
 Here are some standard links for getting your machine calibrated:
12
- * http://reprap.org/wiki/Calibration 
11
+ * http://reprap.org/wiki/Calibration
13 12
  * http://youtu.be/wAL9d7FgInk
14 13
  * http://calculator.josefprusa.cz
15 14
  * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
@@ -18,12 +17,10 @@ Here are some standard links for getting your machine calibrated:
18 17
  * http://www.thingiverse.com/thing:298812
19 18
 */
20 19
 
21
-
22 20
 // This configuration file contains the basic settings.
23 21
 // Advanced settings can be found in Configuration_adv.h
24 22
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
25 23
 
26
-
27 24
 //===========================================================================
28 25
 //============================= DELTA Printer ===============================
29 26
 //===========================================================================
@@ -31,7 +28,6 @@ Here are some standard links for getting your machine calibrated:
31 28
 // example_configurations/delta directory.
32 29
 //
33 30
 
34
-
35 31
 //===========================================================================
36 32
 //============================= SCARA Printer ===============================
37 33
 //===========================================================================
@@ -85,7 +81,6 @@ Here are some standard links for getting your machine calibrated:
85 81
 // Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
86 82
 // #define PS_DEFAULT_OFF
87 83
 
88
-
89 84
 //===========================================================================
90 85
 //============================= Thermal Settings ============================
91 86
 //===========================================================================
@@ -123,6 +118,10 @@ Here are some standard links for getting your machine calibrated:
123 118
 // 1010 is Pt1000 with 1k pullup (non standard)
124 119
 // 147 is Pt100 with 4k7 pullup
125 120
 // 110 is Pt100 with 1k pullup (non standard)
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
122
+//     Use it for Testing or Development purposes. NEVER for production machine.
123
+//     #define DUMMY_THERMISTOR_998_VALUE 25
124
+//     #define DUMMY_THERMISTOR_999_VALUE 100
126 125
 
127 126
 #define TEMP_SENSOR_0 1
128 127
 #define TEMP_SENSOR_1 0
@@ -166,7 +165,6 @@ Here are some standard links for getting your machine calibrated:
166 165
 //#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
167 166
 //#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
168 167
 
169
-
170 168
 //===========================================================================
171 169
 //============================= PID Settings ================================
172 170
 //===========================================================================
@@ -175,13 +173,16 @@ Here are some standard links for getting your machine calibrated:
175 173
 // Comment the following line to disable PID and enable bang-bang.
176 174
 #define PIDTEMP
177 175
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
178
-#define PID_MAX 255 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
176
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
179 177
 #ifdef PIDTEMP
180 178
   //#define PID_DEBUG // Sends debug data to the serial port.
181 179
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
180
+  //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
181
+  //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
182
+                                    // Set/get with gcode: M301 E[extruder number, 0-2]
182 183
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
183 184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
184
-  #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term
185
+  #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
185 186
   #define K1 0.95 //smoothing factor within the PID
186 187
   #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
187 188
 
@@ -202,7 +203,6 @@ Here are some standard links for getting your machine calibrated:
202 203
 //    #define  DEFAULT_Kd 440
203 204
 #endif // PIDTEMP
204 205
 
205
-
206 206
 //===========================================================================
207 207
 //============================= PID > Bed Temperature Control ===============
208 208
 //===========================================================================
@@ -254,7 +254,6 @@ Here are some standard links for getting your machine calibrated:
254 254
 #define EXTRUDE_MINTEMP 170
255 255
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
256 256
 
257
-
258 257
 //===========================================================================
259 258
 //============================= Thermal Runaway Protection ==================
260 259
 //===========================================================================
@@ -296,12 +295,15 @@ your extruder heater takes 2 minutes to hit the target on heating.
296 295
 
297 296
 
298 297
 //===========================================================================
299
-//============================ Mechanical Settings ==========================
298
+//============================= Mechanical Settings =========================
300 299
 //===========================================================================
301 300
 
302
-// Uncomment the following line to enable CoreXY kinematics
301
+// Uncomment this option to enable CoreXY kinematics
303 302
 // #define COREXY
304 303
 
304
+// Enable this option for Toshiba steppers
305
+// #define CONFIG_STEPPERS_TOSHIBA
306
+
305 307
 // coarse Endstop Settings
306 308
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
307 309
 
@@ -334,11 +336,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
334 336
 //#define DISABLE_MAX_ENDSTOPS
335 337
 //#define DISABLE_MIN_ENDSTOPS
336 338
 
337
-// Disable max endstops for compatibility with endstop checking routine
338
-#if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
339
-  #define DISABLE_MAX_ENDSTOPS
340
-#endif
341
-
342 339
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
343 340
 #define X_ENABLE_ON 0
344 341
 #define Y_ENABLE_ON 0
@@ -391,40 +388,38 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
391 388
 
392 389
 #ifdef ENABLE_AUTO_BED_LEVELING
393 390
 
394
-// There are 2 different ways to pick the X and Y locations to probe:
395
-
396
-//  - "grid" mode
397
-//    Probe every point in a rectangular grid
398
-//    You must specify the rectangle, and the density of sample points
399
-//    This mode is preferred because there are more measurements.
400
-//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
401
-
402
-//  - "3-point" mode
403
-//    Probe 3 arbitrary points on the bed (that aren't colinear)
404
-//    You must specify the X & Y coordinates of all 3 points
405
-
391
+  // There are 2 different ways to specify probing locations
392
+  //
393
+  // - "grid" mode
394
+  //   Probe several points in a rectangular grid.
395
+  //   You specify the rectangle and the density of sample points.
396
+  //   This mode is preferred because there are more measurements.
397
+  //
398
+  // - "3-point" mode
399
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
400
+  //   You specify the XY coordinates of all 3 points.
401
+
402
+  // Enable this to sample the bed in a grid (least squares solution)
403
+  // Note: this feature generates 10KB extra code size
406 404
   #define AUTO_BED_LEVELING_GRID
407
-  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
408
-  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
409
-  // and least squares solution is calculated
410
-  // Note: this feature occupies 10'206 byte
405
+
411 406
   #ifdef AUTO_BED_LEVELING_GRID
412 407
 
413
-    // set the rectangle in which to probe
408
+    // The edges of the rectangle in which to probe
414 409
     #define LEFT_PROBE_BED_POSITION 15
415 410
     #define RIGHT_PROBE_BED_POSITION 170
416
-    #define BACK_PROBE_BED_POSITION 180
417 411
     #define FRONT_PROBE_BED_POSITION 20
412
+    #define BACK_PROBE_BED_POSITION 170
418 413
 
419
-     // set the number of grid points per dimension
420
-     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
414
+    // Set the number of grid points per dimension
415
+    // You probably don't need more than 3 (squared=9)
421 416
     #define AUTO_BED_LEVELING_GRID_POINTS 2
422 417
 
423 418
 
424
-  #else  // not AUTO_BED_LEVELING_GRID
425
-    // with no grid, just probe 3 arbitrary points.  A simple cross-product
426
-    // is used to esimate the plane of the print bed
419
+  #else  // !AUTO_BED_LEVELING_GRID
427 420
 
421
+      // Arbitrary points to probe. A simple cross-product
422
+      // is used to estimate the plane of the bed.
428 423
       #define ABL_PROBE_PT_1_X 15
429 424
       #define ABL_PROBE_PT_1_Y 180
430 425
       #define ABL_PROBE_PT_2_X 15
@@ -435,10 +430,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
435 430
   #endif // AUTO_BED_LEVELING_GRID
436 431
 
437 432
 
438
-  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
439
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
440
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
441
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
433
+  // Offsets to the probe relative to the extruder tip (Hotend - Probe)
434
+  // X and Y offsets must be integers
435
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
436
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
437
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
442 438
 
443 439
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
444 440
                                         // Be sure you have this distance over your Z_MAX_POS in case
@@ -514,9 +510,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
514 510
 #define DEFAULT_EJERK                 5.0    // (mm/sec)
515 511
 
516 512
 
517
-//===========================================================================
518
-//============================ Additional Features ==========================
519
-//===========================================================================
513
+//=============================================================================
514
+//============================= Additional Features ===========================
515
+//=============================================================================
520 516
 
521 517
 // Custom M code points
522 518
 #define CUSTOM_M_CODES
@@ -547,7 +543,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
547 543
 #define ABS_PREHEAT_HPB_TEMP 100
548 544
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
549 545
 
550
-//LCD and SD support
546
+//==============================LCD and SD support=============================
547
+
548
+// Define your display language below. Replace (en) with your language code and uncomment.
549
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
550
+// See also language.h
551
+//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
551 552
 
552 553
 // Character based displays can have different extended charsets.
553 554
 #define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
@@ -713,11 +714,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
713 714
 // Shift register panels
714 715
 // ---------------------
715 716
 // 2 wire Non-latching LCD SR from:
716
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
717
-//#define SR_LCD
718
-#ifdef SR_LCD
719
-   #define SR_LCD_2W_NL    // Non latching 2 wire shift register
720
-   //#define NEWPANEL
717
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
718
+
719
+//#define SAV_3DLCD
720
+#ifdef SAV_3DLCD
721
+   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
722
+   #define NEWPANEL
723
+   #define ULTIPANEL
721 724
 #endif
722 725
 
723 726
 
@@ -726,7 +729,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
726 729
   #define SDSUPPORT
727 730
   #define ULTRA_LCD
728 731
   #ifdef DOGLCD // Change number of lines to match the DOG graphic display
729
-    #define LCD_WIDTH 20
732
+    #define LCD_WIDTH 22
730 733
     #define LCD_HEIGHT 5
731 734
   #else
732 735
     #define LCD_WIDTH 20
@@ -735,7 +738,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
735 738
 #else //no panel but just LCD
736 739
   #ifdef ULTRA_LCD
737 740
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
738
-    #define LCD_WIDTH 20
741
+    #define LCD_WIDTH 22
739 742
     #define LCD_HEIGHT 5
740 743
   #else
741 744
     #define LCD_WIDTH 16

+ 64
- 68
Marlin/example_configurations/tvrrug/Round2/Configuration.h Zobrazit soubor

@@ -8,7 +8,7 @@
8 8
 //===========================================================================
9 9
 /*
10 10
 Here are some standard links for getting your machine calibrated:
11
- * http://reprap.org/wiki/Calibration 
11
+ * http://reprap.org/wiki/Calibration
12 12
  * http://youtu.be/wAL9d7FgInk
13 13
  * http://calculator.josefprusa.cz
14 14
  * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
@@ -17,12 +17,10 @@ Here are some standard links for getting your machine calibrated:
17 17
  * http://www.thingiverse.com/thing:298812
18 18
 */
19 19
 
20
-
21 20
 // This configuration file contains the basic settings.
22 21
 // Advanced settings can be found in Configuration_adv.h
23 22
 // BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
24 23
 
25
-
26 24
 //===========================================================================
27 25
 //============================= DELTA Printer ===============================
28 26
 //===========================================================================
@@ -30,7 +28,6 @@ Here are some standard links for getting your machine calibrated:
30 28
 // example_configurations/delta directory.
31 29
 //
32 30
 
33
-
34 31
 //===========================================================================
35 32
 //============================= SCARA Printer ===============================
36 33
 //===========================================================================
@@ -84,7 +81,6 @@ Here are some standard links for getting your machine calibrated:
84 81
 // Define this to have the electronics keep the power supply off on startup. If you don't know what this is leave it.
85 82
 // #define PS_DEFAULT_OFF
86 83
 
87
-
88 84
 //===========================================================================
89 85
 //============================= Thermal Settings ============================
90 86
 //===========================================================================
@@ -122,6 +118,10 @@ Here are some standard links for getting your machine calibrated:
122 118
 // 1010 is Pt1000 with 1k pullup (non standard)
123 119
 // 147 is Pt100 with 4k7 pullup
124 120
 // 110 is Pt100 with 1k pullup (non standard)
121
+// 998 and 999 are Dummy Tables. They will ALWAYS read 25°C or the temperature defined below. 
122
+//     Use it for Testing or Development purposes. NEVER for production machine.
123
+//     #define DUMMY_THERMISTOR_998_VALUE 25
124
+//     #define DUMMY_THERMISTOR_999_VALUE 100
125 125
 
126 126
 #define TEMP_SENSOR_0 5
127 127
 #define TEMP_SENSOR_1 0
@@ -156,8 +156,6 @@ Here are some standard links for getting your machine calibrated:
156 156
 #define HEATER_3_MAXTEMP 275
157 157
 #define BED_MAXTEMP 150
158 158
 
159
-#define CONFIG_STEPPERS_TOSHIBA	1
160
-
161 159
 // If your bed has low resistance e.g. .6 ohm and throws the fuse you can duty cycle it to reduce the
162 160
 // average current. The value should be an integer and the heat bed will be turned on for 1 interval of
163 161
 // HEATER_BED_DUTY_CYCLE_DIVIDER intervals.
@@ -167,7 +165,6 @@ Here are some standard links for getting your machine calibrated:
167 165
 //#define EXTRUDER_WATTS (12.0*12.0/6.7) //  P=I^2/R
168 166
 //#define BED_WATTS (12.0*12.0/1.1)      // P=I^2/R
169 167
 
170
-
171 168
 //===========================================================================
172 169
 //============================= PID Settings ================================
173 170
 //===========================================================================
@@ -176,13 +173,16 @@ Here are some standard links for getting your machine calibrated:
176 173
 // Comment the following line to disable PID and enable bang-bang.
177 174
 #define PIDTEMP
178 175
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
179
-#define PID_MAX 255 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
176
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
180 177
 #ifdef PIDTEMP
181 178
   //#define PID_DEBUG // Sends debug data to the serial port.
182 179
   //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
180
+  //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
181
+  //#define PID_PARAMS_PER_EXTRUDER // Uses separate PID parameters for each extruder (useful for mismatched extruders)
182
+                                    // Set/get with gcode: M301 E[extruder number, 0-2]
183 183
   #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
184 184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185
-  #define PID_INTEGRAL_DRIVE_MAX 255  //limit for the integral term
185
+  #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186 186
   #define K1 0.95 //smoothing factor within the PID
187 187
   #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188 188
 
@@ -208,7 +208,6 @@ Here are some standard links for getting your machine calibrated:
208 208
 //    #define  DEFAULT_Kd 440
209 209
 #endif // PIDTEMP
210 210
 
211
-
212 211
 //===========================================================================
213 212
 //============================= PID > Bed Temperature Control ===============
214 213
 //===========================================================================
@@ -257,7 +256,6 @@ Here are some standard links for getting your machine calibrated:
257 256
 #define EXTRUDE_MINTEMP 170
258 257
 #define EXTRUDE_MAXLENGTH (X_MAX_LENGTH+Y_MAX_LENGTH) //prevent extrusion of very large distances.
259 258
 
260
-
261 259
 //===========================================================================
262 260
 //============================= Thermal Runaway Protection ==================
263 261
 //===========================================================================
@@ -299,12 +297,15 @@ your extruder heater takes 2 minutes to hit the target on heating.
299 297
 
300 298
 
301 299
 //===========================================================================
302
-//============================ Mechanical Settings ==========================
300
+//============================= Mechanical Settings =========================
303 301
 //===========================================================================
304 302
 
305
-// Uncomment the following line to enable CoreXY kinematics
303
+// Uncomment this option to enable CoreXY kinematics
306 304
 // #define COREXY
307 305
 
306
+// Enable this option for Toshiba steppers
307
+#define CONFIG_STEPPERS_TOSHIBA
308
+
308 309
 // coarse Endstop Settings
309 310
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
310 311
 
@@ -337,11 +338,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
337 338
 //#define DISABLE_MAX_ENDSTOPS
338 339
 //#define DISABLE_MIN_ENDSTOPS
339 340
 
340
-// Disable max endstops for compatibility with endstop checking routine
341
-#if defined(COREXY) && !defined(DISABLE_MAX_ENDSTOPS)
342
-  #define DISABLE_MAX_ENDSTOPS
343
-#endif
344
-
345 341
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
346 342
 #define X_ENABLE_ON 1
347 343
 #define Y_ENABLE_ON 1
@@ -394,40 +390,38 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
394 390
 
395 391
 #ifdef ENABLE_AUTO_BED_LEVELING
396 392
 
397
-// There are 2 different ways to pick the X and Y locations to probe:
398
-
399
-//  - "grid" mode
400
-//    Probe every point in a rectangular grid
401
-//    You must specify the rectangle, and the density of sample points
402
-//    This mode is preferred because there are more measurements.
403
-//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
404
-
405
-//  - "3-point" mode
406
-//    Probe 3 arbitrary points on the bed (that aren't colinear)
407
-//    You must specify the X & Y coordinates of all 3 points
408
-
393
+  // There are 2 different ways to specify probing locations
394
+  //
395
+  // - "grid" mode
396
+  //   Probe several points in a rectangular grid.
397
+  //   You specify the rectangle and the density of sample points.
398
+  //   This mode is preferred because there are more measurements.
399
+  //
400
+  // - "3-point" mode
401
+  //   Probe 3 arbitrary points on the bed (that aren't colinear)
402
+  //   You specify the XY coordinates of all 3 points.
403
+
404
+  // Enable this to sample the bed in a grid (least squares solution)
405
+  // Note: this feature generates 10KB extra code size
409 406
   #define AUTO_BED_LEVELING_GRID
410
-  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
411
-  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
412
-  // and least squares solution is calculated
413
-  // Note: this feature occupies 10'206 byte
407
+
414 408
   #ifdef AUTO_BED_LEVELING_GRID
415 409
 
416
-    // set the rectangle in which to probe
410
+    // The edges of the rectangle in which to probe
417 411
     #define LEFT_PROBE_BED_POSITION 15
418 412
     #define RIGHT_PROBE_BED_POSITION 170
419
-    #define BACK_PROBE_BED_POSITION 180
420 413
     #define FRONT_PROBE_BED_POSITION 20
414
+    #define BACK_PROBE_BED_POSITION 170
421 415
 
422
-     // set the number of grid points per dimension
423
-     // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
416
+    // Set the number of grid points per dimension
417
+    // You probably don't need more than 3 (squared=9)
424 418
     #define AUTO_BED_LEVELING_GRID_POINTS 2
425 419
 
426 420
 
427
-  #else  // not AUTO_BED_LEVELING_GRID
428
-    // with no grid, just probe 3 arbitrary points.  A simple cross-product
429
-    // is used to esimate the plane of the print bed
421
+  #else  // !AUTO_BED_LEVELING_GRID
430 422
 
423
+      // Arbitrary points to probe. A simple cross-product
424
+      // is used to estimate the plane of the bed.
431 425
       #define ABL_PROBE_PT_1_X 15
432 426
       #define ABL_PROBE_PT_1_Y 180
433 427
       #define ABL_PROBE_PT_2_X 15
@@ -438,10 +432,11 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
438 432
   #endif // AUTO_BED_LEVELING_GRID
439 433
 
440 434
 
441
-  // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
442
-  #define X_PROBE_OFFSET_FROM_EXTRUDER -25
443
-  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29
444
-  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
435
+  // Offsets to the probe relative to the extruder tip (Hotend - Probe)
436
+  // X and Y offsets must be integers
437
+  #define X_PROBE_OFFSET_FROM_EXTRUDER -25     // -left  +right
438
+  #define Y_PROBE_OFFSET_FROM_EXTRUDER -29     // -front +behind
439
+  #define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35  // -below (always!)
445 440
 
446 441
   #define Z_RAISE_BEFORE_HOMING 4       // (in mm) Raise Z before homing (G28) for Probe Clearance.
447 442
                                         // Be sure you have this distance over your Z_MAX_POS in case
@@ -498,21 +493,15 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
498 493
 
499 494
 // default settings
500 495
 
501
-//#define DEFAULT_AXIS_STEPS_PER_UNIT   {78.7402,78.7402,200.0*8/3,760*1.1}  // default steps per unit for Ultimaker
502
-//#define //DEFAULT_AXIS_STEPS_PER_UNIT   {79.87, 79.87, 2566, 563,78} // Al's TVRR
496
+//#define DEFAULT_AXIS_STEPS_PER_UNIT   {79.87, 79.87, 2566, 563,78} // Al's TVRR
503 497
 //#define DEFAULT_AXIS_STEPS_PER_UNIT   {81.26, 80.01, 2561, 599.14} // Michel TVRR old
504 498
 //#define DEFAULT_AXIS_STEPS_PER_UNIT   {71.1, 71.1, 2560, 739.65} // Michel TVRR
505 499
 #define DEFAULT_AXIS_STEPS_PER_UNIT   {71.1, 71.1, 2560, 600} // David TVRR
506
-
507
-
508
-
509
-//#define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 25}    // (mm/sec) default
510 500
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 45}    // (mm/sec) David TVRR   
511 501
 #define DEFAULT_MAX_ACCELERATION      {9000,9000,100,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
512 502
 
513 503
 /* MICHEL: This has an impact on the "ripples" in print walls */
514
-#define DEFAULT_ACCELERATION          500    // X, Y, Z and E max acceleration in mm/s^2 for printing moves 
515
-//#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
504
+#define DEFAULT_ACCELERATION          500    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
516 505
 #define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for retracts
517 506
 
518 507
 // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -527,9 +516,9 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
527 516
 #define DEFAULT_EJERK                 5.0    // (mm/sec)
528 517
 
529 518
 
530
-//===========================================================================
531
-//============================ Additional Features ==========================
532
-//===========================================================================
519
+//=============================================================================
520
+//============================= Additional Features ===========================
521
+//=============================================================================
533 522
 
534 523
 // Custom M code points
535 524
 #define CUSTOM_M_CODES
@@ -560,7 +549,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
560 549
 #define ABS_PREHEAT_HPB_TEMP 100
561 550
 #define ABS_PREHEAT_FAN_SPEED 255   // Insert Value between 0 and 255
562 551
 
563
-//LCD and SD support
552
+//==============================LCD and SD support=============================
553
+
554
+// Define your display language below. Replace (en) with your language code and uncomment.
555
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
556
+// See also language.h
557
+//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
564 558
 
565 559
 // Character based displays can have different extended charsets.
566 560
 #define DISPLAY_CHARSET_HD44780_JAPAN     // "ääööüüß23°"
@@ -726,11 +720,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
726 720
 // Shift register panels
727 721
 // ---------------------
728 722
 // 2 wire Non-latching LCD SR from:
729
-// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
730
-//#define SR_LCD
731
-#ifdef SR_LCD
732
-   #define SR_LCD_2W_NL    // Non latching 2 wire shift register
733
-   //#define NEWPANEL
723
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection 
724
+
725
+//#define SAV_3DLCD
726
+#ifdef SAV_3DLCD
727
+   #define SR_LCD_2W_NL    // Non latching 2 wire shiftregister
728
+   #define NEWPANEL
729
+   #define ULTIPANEL
734 730
 #endif
735 731
 
736 732
 
@@ -739,7 +735,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
739 735
   #define SDSUPPORT
740 736
   #define ULTRA_LCD
741 737
   #ifdef DOGLCD // Change number of lines to match the DOG graphic display
742
-    #define LCD_WIDTH 20
738
+    #define LCD_WIDTH 22
743 739
     #define LCD_HEIGHT 5
744 740
   #else
745 741
     #define LCD_WIDTH 20
@@ -748,7 +744,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
748 744
 #else //no panel but just LCD
749 745
   #ifdef ULTRA_LCD
750 746
   #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
751
-    #define LCD_WIDTH 20
747
+    #define LCD_WIDTH 22
752 748
     #define LCD_HEIGHT 5
753 749
   #else
754 750
     #define LCD_WIDTH 16
@@ -832,13 +828,13 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
832 828
 // Uncomment below to enable
833 829
 //#define FILAMENT_SENSOR
834 830
 
835
-#define FILAMENT_SENSOR_EXTRUDER_NUM  0  //The number of the extruder that has the filament sensor (0,1,2)
836
-#define MEASUREMENT_DELAY_CM      14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
831
+#define FILAMENT_SENSOR_EXTRUDER_NUM	0  //The number of the extruder that has the filament sensor (0,1,2)
832
+#define MEASUREMENT_DELAY_CM			14  //measurement delay in cm.  This is the distance from filament sensor to middle of barrel
837 833
 
838 834
 #define DEFAULT_NOMINAL_FILAMENT_DIA  3.0  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
839 835
 #define MEASURED_UPPER_LIMIT          3.30  //upper limit factor used for sensor reading validation in mm
840 836
 #define MEASURED_LOWER_LIMIT          1.90  //lower limit factor for sensor reading validation in mm
841
-#define MAX_MEASUREMENT_DELAY     20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
837
+#define MAX_MEASUREMENT_DELAY			20  //delay buffer size in bytes (1 byte = 1cm)- limits maximum measurement delay allowable (must be larger than MEASUREMENT_DELAY_CM  and lower number saves RAM)
842 838
 
843 839
 //defines used in the code
844 840
 #define DEFAULT_MEASURED_FILAMENT_DIA  DEFAULT_NOMINAL_FILAMENT_DIA  //set measured to nominal initially 

+ 19
- 26
Marlin/stepper.cpp Zobrazit soubor

@@ -554,54 +554,48 @@ ISR(TIMER1_COMPA_vect)
554 554
       #endif //ADVANCE
555 555
 
556 556
       counter_x += current_block->steps_x;
557
+
557 558
 #ifdef CONFIG_STEPPERS_TOSHIBA
558
-	/* The toshiba stepper controller require much longer pulses
559
-	 * tjerfore we 'stage' decompose the pulses between high, and
560
-	 * low instead of doing each in turn. The extra tests add enough
561
-	 * lag to allow it work with without needing NOPs */ 
562
-      if (counter_x > 0) {
563
-        WRITE(X_STEP_PIN, HIGH);
564
-      }
559
+    /* The Toshiba stepper controller require much longer pulses.
560
+     * So we 'stage' decompose the pulses between high and low
561
+     * instead of doing each in turn. The extra tests add enough
562
+     * lag to allow it work with without needing NOPs
563
+     */
564
+      if (counter_x > 0) WRITE(X_STEP_PIN, HIGH);
565 565
 
566 566
       counter_y += current_block->steps_y;
567
-      if (counter_y > 0) {
568
-        WRITE(Y_STEP_PIN, HIGH);
569
-      }
567
+      if (counter_y > 0) WRITE(Y_STEP_PIN, HIGH);
570 568
 
571 569
       counter_z += current_block->steps_z;
572
-      if (counter_z > 0) {
573
-        WRITE(Z_STEP_PIN, HIGH);
574
-      }
570
+      if (counter_z > 0) WRITE(Z_STEP_PIN, HIGH);
575 571
 
576 572
       #ifndef ADVANCE
577 573
         counter_e += current_block->steps_e;
578
-        if (counter_e > 0) {
579
-          WRITE_E_STEP(HIGH);
580
-        }
574
+        if (counter_e > 0) WRITE_E_STEP(HIGH);
581 575
       #endif //!ADVANCE
582 576
 
583 577
       if (counter_x > 0) {
584 578
         counter_x -= current_block->step_event_count;
585
-        count_position[X_AXIS]+=count_direction[X_AXIS];   
579
+        count_position[X_AXIS] += count_direction[X_AXIS];   
586 580
         WRITE(X_STEP_PIN, LOW);
587 581
       }
588 582
 
589 583
       if (counter_y > 0) {
590 584
         counter_y -= current_block->step_event_count;
591
-        count_position[Y_AXIS]+=count_direction[Y_AXIS];
585
+        count_position[Y_AXIS] += count_direction[Y_AXIS];
592 586
         WRITE(Y_STEP_PIN, LOW);
593 587
       }
594 588
 
595 589
       if (counter_z > 0) {
596 590
         counter_z -= current_block->step_event_count;
597
-        count_position[Z_AXIS]+=count_direction[Z_AXIS];
591
+        count_position[Z_AXIS] += count_direction[Z_AXIS];
598 592
         WRITE(Z_STEP_PIN, LOW);
599 593
       }
600 594
 
601 595
       #ifndef ADVANCE
602 596
         if (counter_e > 0) {
603 597
           counter_e -= current_block->step_event_count;
604
-          count_position[E_AXIS]+=count_direction[E_AXIS];
598
+          count_position[E_AXIS] += count_direction[E_AXIS];
605 599
           WRITE_E_STEP(LOW);
606 600
         }
607 601
       #endif //!ADVANCE
@@ -622,7 +616,7 @@ ISR(TIMER1_COMPA_vect)
622 616
           WRITE(X_STEP_PIN, !INVERT_X_STEP_PIN);
623 617
         #endif        
624 618
           counter_x -= current_block->step_event_count;
625
-          count_position[X_AXIS]+=count_direction[X_AXIS];   
619
+          count_position[X_AXIS] += count_direction[X_AXIS];   
626 620
         #ifdef DUAL_X_CARRIAGE
627 621
           if (extruder_duplication_enabled){
628 622
             WRITE(X_STEP_PIN, INVERT_X_STEP_PIN);
@@ -648,7 +642,7 @@ ISR(TIMER1_COMPA_vect)
648 642
 		  #endif
649 643
 		  
650 644
           counter_y -= current_block->step_event_count;
651
-          count_position[Y_AXIS]+=count_direction[Y_AXIS];
645
+          count_position[Y_AXIS] += count_direction[Y_AXIS];
652 646
           WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN);
653 647
 		  
654 648
 		  #ifdef Y_DUAL_STEPPER_DRIVERS
@@ -659,15 +653,14 @@ ISR(TIMER1_COMPA_vect)
659 653
       counter_z += current_block->steps_z;
660 654
       if (counter_z > 0) {
661 655
         WRITE(Z_STEP_PIN, !INVERT_Z_STEP_PIN);
662
-        
663 656
         #ifdef Z_DUAL_STEPPER_DRIVERS
664 657
           WRITE(Z2_STEP_PIN, !INVERT_Z_STEP_PIN);
665 658
         #endif
666 659
 
667 660
         counter_z -= current_block->step_event_count;
668
-        count_position[Z_AXIS]+=count_direction[Z_AXIS];
661
+        count_position[Z_AXIS] += count_direction[Z_AXIS];
669 662
         WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN);
670
-        
663
+
671 664
         #ifdef Z_DUAL_STEPPER_DRIVERS
672 665
           WRITE(Z2_STEP_PIN, INVERT_Z_STEP_PIN);
673 666
         #endif
@@ -678,7 +671,7 @@ ISR(TIMER1_COMPA_vect)
678 671
         if (counter_e > 0) {
679 672
           WRITE_E_STEP(!INVERT_E_STEP_PIN);
680 673
           counter_e -= current_block->step_event_count;
681
-          count_position[E_AXIS]+=count_direction[E_AXIS];
674
+          count_position[E_AXIS] += count_direction[E_AXIS];
682 675
           WRITE_E_STEP(INVERT_E_STEP_PIN);
683 676
         }
684 677
       #endif //!ADVANCE

+ 12
- 17
Marlin/vector_3.cpp Zobrazit soubor

@@ -84,7 +84,7 @@ void vector_3::debug(char* title)
84 84
 	SERIAL_PROTOCOL(y);
85 85
 	SERIAL_PROTOCOLPGM(" z: ");
86 86
 	SERIAL_PROTOCOL(z);
87
-	SERIAL_PROTOCOLPGM("\n");
87
+	SERIAL_EOL;
88 88
 }
89 89
 
90 90
 void apply_rotation_xyz(matrix_3x3 matrix, float &x, float& y, float& z)
@@ -145,22 +145,17 @@ matrix_3x3 matrix_3x3::transpose(matrix_3x3 original)
145 145
   return new_matrix;
146 146
 }
147 147
 
148
-void matrix_3x3::debug(char* title)
149
-{
150
-	SERIAL_PROTOCOL(title);
151
-	SERIAL_PROTOCOL("\n");
152
-	int count = 0;
153
-	for(int i=0; i<3; i++)
154
-	{
155
-		for(int j=0; j<3; j++)
156
-		{
157
-			SERIAL_PROTOCOL(matrix[count]);
158
-			SERIAL_PROTOCOLPGM(" ");
159
-		        count++;
160
-		}
161
-
162
-		SERIAL_PROTOCOLPGM("\n");
163
-	}
148
+void matrix_3x3::debug(char* title) {
149
+  SERIAL_PROTOCOLLN(title);
150
+  int count = 0;
151
+  for(int i=0; i<3; i++) {
152
+    for(int j=0; j<3; j++) {
153
+      SERIAL_PROTOCOL(matrix[count] + 0.0001);
154
+      SERIAL_PROTOCOLPGM(" ");
155
+      count++;
156
+    }
157
+    SERIAL_EOL;
158
+  }
164 159
 }
165 160
 
166 161
 #endif // #ifdef ENABLE_AUTO_BED_LEVELING

Loading…
Zrušit
Uložit