Browse Source

Merge pull request #5056 from thinkyhead/rc_lin_adv_opt

LIN_ADVANCE optimizations
Scott Lahteine 8 years ago
parent
commit
627f9d5285

+ 14
- 3
Marlin/Configuration_adv.h View File

@@ -501,9 +501,20 @@
501 501
   #define D_FILAMENT 2.85
502 502
 #endif
503 503
 
504
-// Implementation of a linear pressure control
505
-// Assumption: advance = k * (delta velocity)
506
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
504
+/**
505
+ * Implementation of linear pressure control
506
+ *
507
+ * Assumption: advance = k * (delta velocity)
508
+ * K=0 means advance disabled.
509
+ * To get a rough start value for calibration, measure your "free filament length"
510
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
511
+ * your setup, where L is the "free filament length":
512
+ *
513
+ * Filament diameter           |   1.75mm  |    3.0mm   |
514
+ * ----------------------------|-----------|------------|
515
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
516
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
517
+ */
507 518
 //#define LIN_ADVANCE
508 519
 
509 520
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/Cartesio/Configuration_adv.h View File

@@ -501,9 +501,20 @@
501 501
   #define D_FILAMENT 2.85
502 502
 #endif
503 503
 
504
-// Implementation of a linear pressure control
505
-// Assumption: advance = k * (delta velocity)
506
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
504
+/**
505
+ * Implementation of linear pressure control
506
+ *
507
+ * Assumption: advance = k * (delta velocity)
508
+ * K=0 means advance disabled.
509
+ * To get a rough start value for calibration, measure your "free filament length"
510
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
511
+ * your setup, where L is the "free filament length":
512
+ *
513
+ * Filament diameter           |   1.75mm  |    3.0mm   |
514
+ * ----------------------------|-----------|------------|
515
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
516
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
517
+ */
507 518
 //#define LIN_ADVANCE
508 519
 
509 520
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -501,9 +501,20 @@
501 501
   #define D_FILAMENT 2.85
502 502
 #endif
503 503
 
504
-// Implementation of a linear pressure control
505
-// Assumption: advance = k * (delta velocity)
506
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
504
+/**
505
+ * Implementation of linear pressure control
506
+ *
507
+ * Assumption: advance = k * (delta velocity)
508
+ * K=0 means advance disabled.
509
+ * To get a rough start value for calibration, measure your "free filament length"
510
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
511
+ * your setup, where L is the "free filament length":
512
+ *
513
+ * Filament diameter           |   1.75mm  |    3.0mm   |
514
+ * ----------------------------|-----------|------------|
515
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
516
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
517
+ */
507 518
 //#define LIN_ADVANCE
508 519
 
509 520
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -501,9 +501,20 @@
501 501
   #define D_FILAMENT 1.75
502 502
 #endif
503 503
 
504
-// Implementation of a linear pressure control
505
-// Assumption: advance = k * (delta velocity)
506
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
504
+/**
505
+ * Implementation of linear pressure control
506
+ *
507
+ * Assumption: advance = k * (delta velocity)
508
+ * K=0 means advance disabled.
509
+ * To get a rough start value for calibration, measure your "free filament length"
510
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
511
+ * your setup, where L is the "free filament length":
512
+ *
513
+ * Filament diameter           |   1.75mm  |    3.0mm   |
514
+ * ----------------------------|-----------|------------|
515
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
516
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
517
+ */
507 518
 //#define LIN_ADVANCE
508 519
 
509 520
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

@@ -501,9 +501,20 @@
501 501
   #define D_FILAMENT 2.85
502 502
 #endif
503 503
 
504
-// Implementation of a linear pressure control
505
-// Assumption: advance = k * (delta velocity)
506
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
504
+/**
505
+ * Implementation of linear pressure control
506
+ *
507
+ * Assumption: advance = k * (delta velocity)
508
+ * K=0 means advance disabled.
509
+ * To get a rough start value for calibration, measure your "free filament length"
510
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
511
+ * your setup, where L is the "free filament length":
512
+ *
513
+ * Filament diameter           |   1.75mm  |    3.0mm   |
514
+ * ----------------------------|-----------|------------|
515
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
516
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
517
+ */
507 518
 //#define LIN_ADVANCE
508 519
 
509 520
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -507,9 +507,20 @@
507 507
   #define D_FILAMENT 2.85
508 508
 #endif
509 509
 
510
-// Implementation of a linear pressure control
511
-// Assumption: advance = k * (delta velocity)
512
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
510
+/**
511
+ * Implementation of linear pressure control
512
+ *
513
+ * Assumption: advance = k * (delta velocity)
514
+ * K=0 means advance disabled.
515
+ * To get a rough start value for calibration, measure your "free filament length"
516
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
517
+ * your setup, where L is the "free filament length":
518
+ *
519
+ * Filament diameter           |   1.75mm  |    3.0mm   |
520
+ * ----------------------------|-----------|------------|
521
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
522
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
523
+ */
513 524
 //#define LIN_ADVANCE
514 525
 
515 526
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/K8400/Configuration_adv.h View File

@@ -501,9 +501,20 @@
501 501
   #define D_FILAMENT 2.85
502 502
 #endif
503 503
 
504
-// Implementation of a linear pressure control
505
-// Assumption: advance = k * (delta velocity)
506
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
504
+/**
505
+ * Implementation of linear pressure control
506
+ *
507
+ * Assumption: advance = k * (delta velocity)
508
+ * K=0 means advance disabled.
509
+ * To get a rough start value for calibration, measure your "free filament length"
510
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
511
+ * your setup, where L is the "free filament length":
512
+ *
513
+ * Filament diameter           |   1.75mm  |    3.0mm   |
514
+ * ----------------------------|-----------|------------|
515
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
516
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
517
+ */
507 518
 //#define LIN_ADVANCE
508 519
 
509 520
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

@@ -501,9 +501,20 @@
501 501
   #define D_FILAMENT 1.75
502 502
 #endif
503 503
 
504
-// Implementation of a linear pressure control
505
-// Assumption: advance = k * (delta velocity)
506
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
504
+/**
505
+ * Implementation of linear pressure control
506
+ *
507
+ * Assumption: advance = k * (delta velocity)
508
+ * K=0 means advance disabled.
509
+ * To get a rough start value for calibration, measure your "free filament length"
510
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
511
+ * your setup, where L is the "free filament length":
512
+ *
513
+ * Filament diameter           |   1.75mm  |    3.0mm   |
514
+ * ----------------------------|-----------|------------|
515
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
516
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
517
+ */
507 518
 //#define LIN_ADVANCE
508 519
 
509 520
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -501,9 +501,20 @@
501 501
   #define D_FILAMENT 1.75
502 502
 #endif
503 503
 
504
-// Implementation of a linear pressure control
505
-// Assumption: advance = k * (delta velocity)
506
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
504
+/**
505
+ * Implementation of linear pressure control
506
+ *
507
+ * Assumption: advance = k * (delta velocity)
508
+ * K=0 means advance disabled.
509
+ * To get a rough start value for calibration, measure your "free filament length"
510
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
511
+ * your setup, where L is the "free filament length":
512
+ *
513
+ * Filament diameter           |   1.75mm  |    3.0mm   |
514
+ * ----------------------------|-----------|------------|
515
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
516
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
517
+ */
507 518
 //#define LIN_ADVANCE
508 519
 
509 520
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

@@ -509,9 +509,20 @@
509 509
   #define D_FILAMENT 2.85
510 510
 #endif
511 511
 
512
-// Implementation of a linear pressure control
513
-// Assumption: advance = k * (delta velocity)
514
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
512
+/**
513
+ * Implementation of linear pressure control
514
+ *
515
+ * Assumption: advance = k * (delta velocity)
516
+ * K=0 means advance disabled.
517
+ * To get a rough start value for calibration, measure your "free filament length"
518
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
519
+ * your setup, where L is the "free filament length":
520
+ *
521
+ * Filament diameter           |   1.75mm  |    3.0mm   |
522
+ * ----------------------------|-----------|------------|
523
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
524
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
525
+ */
515 526
 //#define LIN_ADVANCE
516 527
 
517 528
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -501,9 +501,20 @@
501 501
   #define D_FILAMENT 1.75
502 502
 #endif
503 503
 
504
-// Implementation of a linear pressure control
505
-// Assumption: advance = k * (delta velocity)
506
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
504
+/**
505
+ * Implementation of linear pressure control
506
+ *
507
+ * Assumption: advance = k * (delta velocity)
508
+ * K=0 means advance disabled.
509
+ * To get a rough start value for calibration, measure your "free filament length"
510
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
511
+ * your setup, where L is the "free filament length":
512
+ *
513
+ * Filament diameter           |   1.75mm  |    3.0mm   |
514
+ * ----------------------------|-----------|------------|
515
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
516
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
517
+ */
507 518
 //#define LIN_ADVANCE
508 519
 
509 520
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h View File

@@ -503,9 +503,20 @@
503 503
   #define D_FILAMENT 2.85
504 504
 #endif
505 505
 
506
-// Implementation of a linear pressure control
507
-// Assumption: advance = k * (delta velocity)
508
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
506
+/**
507
+ * Implementation of linear pressure control
508
+ *
509
+ * Assumption: advance = k * (delta velocity)
510
+ * K=0 means advance disabled.
511
+ * To get a rough start value for calibration, measure your "free filament length"
512
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
513
+ * your setup, where L is the "free filament length":
514
+ *
515
+ * Filament diameter           |   1.75mm  |    3.0mm   |
516
+ * ----------------------------|-----------|------------|
517
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
518
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
519
+ */
509 520
 //#define LIN_ADVANCE
510 521
 
511 522
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -503,9 +503,20 @@
503 503
   #define D_FILAMENT 2.85
504 504
 #endif
505 505
 
506
-// Implementation of a linear pressure control
507
-// Assumption: advance = k * (delta velocity)
508
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
506
+/**
507
+ * Implementation of linear pressure control
508
+ *
509
+ * Assumption: advance = k * (delta velocity)
510
+ * K=0 means advance disabled.
511
+ * To get a rough start value for calibration, measure your "free filament length"
512
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
513
+ * your setup, where L is the "free filament length":
514
+ *
515
+ * Filament diameter           |   1.75mm  |    3.0mm   |
516
+ * ----------------------------|-----------|------------|
517
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
518
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
519
+ */
509 520
 //#define LIN_ADVANCE
510 521
 
511 522
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -503,9 +503,20 @@
503 503
   #define D_FILAMENT 2.85
504 504
 #endif
505 505
 
506
-// Implementation of a linear pressure control
507
-// Assumption: advance = k * (delta velocity)
508
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
506
+/**
507
+ * Implementation of linear pressure control
508
+ *
509
+ * Assumption: advance = k * (delta velocity)
510
+ * K=0 means advance disabled.
511
+ * To get a rough start value for calibration, measure your "free filament length"
512
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
513
+ * your setup, where L is the "free filament length":
514
+ *
515
+ * Filament diameter           |   1.75mm  |    3.0mm   |
516
+ * ----------------------------|-----------|------------|
517
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
518
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
519
+ */
509 520
 //#define LIN_ADVANCE
510 521
 
511 522
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

@@ -508,9 +508,20 @@
508 508
   #define D_FILAMENT 2.85
509 509
 #endif
510 510
 
511
-// Implementation of a linear pressure control
512
-// Assumption: advance = k * (delta velocity)
513
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
511
+/**
512
+ * Implementation of linear pressure control
513
+ *
514
+ * Assumption: advance = k * (delta velocity)
515
+ * K=0 means advance disabled.
516
+ * To get a rough start value for calibration, measure your "free filament length"
517
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
518
+ * your setup, where L is the "free filament length":
519
+ *
520
+ * Filament diameter           |   1.75mm  |    3.0mm   |
521
+ * ----------------------------|-----------|------------|
522
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
523
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
524
+ */
514 525
 //#define LIN_ADVANCE
515 526
 
516 527
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

@@ -503,9 +503,20 @@
503 503
   #define D_FILAMENT 2.85
504 504
 #endif
505 505
 
506
-// Implementation of a linear pressure control
507
-// Assumption: advance = k * (delta velocity)
508
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
506
+/**
507
+ * Implementation of linear pressure control
508
+ *
509
+ * Assumption: advance = k * (delta velocity)
510
+ * K=0 means advance disabled.
511
+ * To get a rough start value for calibration, measure your "free filament length"
512
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
513
+ * your setup, where L is the "free filament length":
514
+ *
515
+ * Filament diameter           |   1.75mm  |    3.0mm   |
516
+ * ----------------------------|-----------|------------|
517
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
518
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
519
+ */
509 520
 //#define LIN_ADVANCE
510 521
 
511 522
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -501,9 +501,20 @@
501 501
   #define D_FILAMENT 2.85
502 502
 #endif
503 503
 
504
-// Implementation of a linear pressure control
505
-// Assumption: advance = k * (delta velocity)
506
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
504
+/**
505
+ * Implementation of linear pressure control
506
+ *
507
+ * Assumption: advance = k * (delta velocity)
508
+ * K=0 means advance disabled.
509
+ * To get a rough start value for calibration, measure your "free filament length"
510
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
511
+ * your setup, where L is the "free filament length":
512
+ *
513
+ * Filament diameter           |   1.75mm  |    3.0mm   |
514
+ * ----------------------------|-----------|------------|
515
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
516
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
517
+ */
507 518
 //#define LIN_ADVANCE
508 519
 
509 520
 #if ENABLED(LIN_ADVANCE)

+ 14
- 3
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -501,9 +501,20 @@
501 501
   #define D_FILAMENT 2.85
502 502
 #endif
503 503
 
504
-// Implementation of a linear pressure control
505
-// Assumption: advance = k * (delta velocity)
506
-// K=0 means advance disabled. A good value for a gregs wade extruder will be around K=75
504
+/**
505
+ * Implementation of linear pressure control
506
+ *
507
+ * Assumption: advance = k * (delta velocity)
508
+ * K=0 means advance disabled.
509
+ * To get a rough start value for calibration, measure your "free filament length"
510
+ * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits
511
+ * your setup, where L is the "free filament length":
512
+ *
513
+ * Filament diameter           |   1.75mm  |    3.0mm   |
514
+ * ----------------------------|-----------|------------|
515
+ * Stiff filament (PLA)        | K=47*L/10 | K=139*L/10 |
516
+ * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 |
517
+ */
507 518
 //#define LIN_ADVANCE
508 519
 
509 520
 #if ENABLED(LIN_ADVANCE)

+ 1
- 1
Marlin/planner.cpp View File

@@ -1206,7 +1206,7 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
1206 1206
     // This leads to an enormous number of advance steps due to a huge e_acceleration.
1207 1207
     // The math is correct, but you don't want a retract move done with advance!
1208 1208
     // So this situation is filtered out here.
1209
-    if (!block->steps[E_AXIS] || (!block->steps[X_AXIS] && !block->steps[Y_AXIS] && !block->steps[Z_AXIS]) || stepper.get_advance_k() == 0 || (uint32_t) block->steps[E_AXIS] == block->step_event_count) {
1209
+    if (!block->steps[E_AXIS] || (!block->steps[X_AXIS] && !block->steps[Y_AXIS]) || stepper.get_advance_k() == 0 || (uint32_t) block->steps[E_AXIS] == block->step_event_count) {
1210 1210
       block->use_advance_lead = false;
1211 1211
     }
1212 1212
     else {

Loading…
Cancel
Save