소스 검색

Added E-Jerk

Erik van der Zalm 13 년 전
부모
커밋
e056bf8081
6개의 변경된 파일24개의 추가작업 그리고 10개의 파일을 삭제
  1. 2
    1
      Marlin/Configuration.h
  2. 5
    1
      Marlin/EEPROMwrite.h
  3. 2
    1
      Marlin/Marlin.pde
  4. BIN
      Marlin/Marlin.suo
  5. 14
    7
      Marlin/planner.cpp
  6. 1
    0
      Marlin/planner.h

+ 2
- 1
Marlin/Configuration.h 파일 보기

@@ -171,6 +171,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
171 171
 // 
172 172
 #define DEFAULT_XYJERK                20.0    // (mm/sec)
173 173
 #define DEFAULT_ZJERK                 0.4     // (mm/sec)
174
+#define DEFAULT_EJERK                 5.0    // (mm/sec)
174 175
 
175 176
 //===========================================================================
176 177
 //=============================Additional Features===========================
@@ -191,7 +192,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
191 192
 //#define ULTRA_LCD  //general lcd support, also 16x2
192 193
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
193 194
 
194
-//#define ULTIPANEL
195
+#define ULTIPANEL
195 196
 #ifdef ULTIPANEL
196 197
   #define NEWPANEL  //enable this if you have a click-encoder panel
197 198
   #define SDSUPPORT

+ 5
- 1
Marlin/EEPROMwrite.h 파일 보기

@@ -38,7 +38,7 @@ template <class T> int EEPROM_readAnything(int &ee, T& value)
38 38
 // the default values are used whenever there is a change to the data, to prevent
39 39
 // wrong data being written to the variables.
40 40
 // ALSO:  always make sure the variables in the Store and retrieve sections are in the same order.
41
-#define EEPROM_VERSION "V04"  
41
+#define EEPROM_VERSION "V05"  
42 42
 
43 43
 inline void EEPROM_StoreSettings() 
44 44
 {
@@ -56,6 +56,7 @@ inline void EEPROM_StoreSettings()
56 56
   EEPROM_writeAnything(i,minsegmenttime);
57 57
   EEPROM_writeAnything(i,max_xy_jerk);
58 58
   EEPROM_writeAnything(i,max_z_jerk);
59
+  EEPROM_writeAnything(i,max_e_jerk);
59 60
   #ifdef PIDTEMP
60 61
     EEPROM_writeAnything(i,Kp);
61 62
     EEPROM_writeAnything(i,Ki);
@@ -116,6 +117,7 @@ inline void EEPROM_printSettings()
116 117
       SERIAL_ECHOPAIR(" B" ,minsegmenttime ); 
117 118
       SERIAL_ECHOPAIR(" X" ,max_xy_jerk ); 
118 119
       SERIAL_ECHOPAIR(" Z" ,max_z_jerk);
120
+      SERIAL_ECHOPAIR(" E" ,max_e_jerk);
119 121
       SERIAL_ECHOLN(""); 
120 122
     #ifdef PIDTEMP
121 123
       SERIAL_ECHO_START;
@@ -150,6 +152,7 @@ inline void EEPROM_RetrieveSettings(bool def=false)
150 152
       EEPROM_readAnything(i,minsegmenttime);
151 153
       EEPROM_readAnything(i,max_xy_jerk);
152 154
       EEPROM_readAnything(i,max_z_jerk);
155
+      EEPROM_readAnything(i,max_e_jerk);
153 156
       #ifndef PIDTEMP
154 157
         float Kp,Ki,Kd;
155 158
       #endif
@@ -179,6 +182,7 @@ inline void EEPROM_RetrieveSettings(bool def=false)
179 182
       mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE;
180 183
       max_xy_jerk=DEFAULT_XYJERK;
181 184
       max_z_jerk=DEFAULT_ZJERK;
185
+      max_e_jerk=DEFAULT_EJERK;
182 186
       SERIAL_ECHO_START;
183 187
       SERIAL_ECHOLN("Using Default settings:");
184 188
     }

+ 2
- 1
Marlin/Marlin.pde 파일 보기

@@ -97,7 +97,7 @@
97 97
 // M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
98 98
 // M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
99 99
 // M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2  also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
100
-// M205 -  advanced settings:  minimum travel speed S=while printing T=travel only,  B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk
100
+// M205 -  advanced settings:  minimum travel speed S=while printing T=travel only,  B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
101 101
 // M206 - set additional homeing offset
102 102
 // M220 S<factor in percent>- set speed factor override percentage
103 103
 // M221 S<factor in percent>- set extrude factor override percentage
@@ -1116,6 +1116,7 @@ void process_commands()
1116 1116
       if(code_seen('B')) minsegmenttime = code_value() ;
1117 1117
       if(code_seen('X')) max_xy_jerk = code_value() ;
1118 1118
       if(code_seen('Z')) max_z_jerk = code_value() ;
1119
+      if(code_seen('E')) max_e_jerk = code_value() ;
1119 1120
     }
1120 1121
     break;
1121 1122
     case 206: // M206 additional homeing offset

BIN
Marlin/Marlin.suo 파일 보기


+ 14
- 7
Marlin/planner.cpp 파일 보기

@@ -74,6 +74,7 @@ float acceleration;         // Normal acceleration mm/s^2  THIS IS THE DEFAULT A
74 74
 float retract_acceleration; //  mm/s^2   filament pull-pack and push-forward  while standing still in the other axis M204 TXXXX
75 75
 float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
76 76
 float max_z_jerk;
77
+float max_e_jerk;
77 78
 float mintravelfeedrate;
78 79
 unsigned long axis_steps_per_sqr_second[NUM_AXIS];
79 80
 
@@ -531,6 +532,13 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
531 532
   if(block->steps_e != 0) { enable_e0();enable_e1();enable_e2(); }
532 533
 
533 534
 
535
+  if (block->steps_e == 0) {
536
+        if(feed_rate<mintravelfeedrate) feed_rate=mintravelfeedrate;
537
+  }
538
+  else {
539
+    	if(feed_rate<minimumfeedrate) feed_rate=minimumfeedrate;
540
+  } 
541
+  
534 542
   // slow down when de buffer starts to empty, rather than wait at the corner for a buffer refill
535 543
   int moves_queued=(block_buffer_head-block_buffer_tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1);
536 544
   #ifdef SLOWDOWN
@@ -555,12 +563,6 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
555 563
   block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
556 564
   block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
557 565
 
558
-  if (block->steps_e == 0) {
559
-        if(feed_rate<mintravelfeedrate) feed_rate=mintravelfeedrate;
560
-  }
561
-  else {
562
-    	if(feed_rate<minimumfeedrate) feed_rate=minimumfeedrate;
563
-  } 
564 566
 
565 567
 /*
566 568
   //  segment time im micro seconds
@@ -705,7 +707,9 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
705 707
   if(abs(current_speed[Z_AXIS]) > max_z_jerk/2) 
706 708
     vmax_junction = max_z_jerk/2;
707 709
   vmax_junction = min(vmax_junction, block->nominal_speed);
708
-
710
+  if(abs(current_speed[E_AXIS]) > max_e_jerk/2) 
711
+    vmax_junction = min(vmax_junction, max_z_jerk/2);
712
+    
709 713
   if ((moves_queued > 1) && (previous_nominal_speed > 0.0)) {
710 714
     float jerk = sqrt(pow((current_speed[X_AXIS]-previous_speed[X_AXIS]), 2)+pow((current_speed[Y_AXIS]-previous_speed[Y_AXIS]), 2));
711 715
     if((previous_speed[X_AXIS] != 0.0) || (previous_speed[Y_AXIS] != 0.0)) {
@@ -717,6 +721,9 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
717 721
     if(abs(current_speed[Z_AXIS] - previous_speed[Z_AXIS]) > max_z_jerk) {
718 722
       vmax_junction *= (max_z_jerk/abs(current_speed[Z_AXIS] - previous_speed[Z_AXIS]));
719 723
     } 
724
+    if(abs(current_speed[E_AXIS] - previous_speed[E_AXIS]) > max_e_jerk) {
725
+      vmax_junction *= (max_e_jerk/abs(current_speed[E_AXIS] - previous_speed[E_AXIS]));
726
+    } 
720 727
   }
721 728
   block->max_entry_speed = vmax_junction;
722 729
     

+ 1
- 0
Marlin/planner.h 파일 보기

@@ -88,6 +88,7 @@ extern float acceleration;         // Normal acceleration mm/s^2  THIS IS THE DE
88 88
 extern float retract_acceleration; //  mm/s^2   filament pull-pack and push-forward  while standing still in the other axis M204 TXXXX
89 89
 extern float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
90 90
 extern float max_z_jerk;
91
+extern float max_e_jerk;
91 92
 extern float mintravelfeedrate;
92 93
 extern unsigned long axis_steps_per_sqr_second[NUM_AXIS];
93 94
 

Loading…
취소
저장