소스 검색

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
 // 
171
 // 
172
 #define DEFAULT_XYJERK                20.0    // (mm/sec)
172
 #define DEFAULT_XYJERK                20.0    // (mm/sec)
173
 #define DEFAULT_ZJERK                 0.4     // (mm/sec)
173
 #define DEFAULT_ZJERK                 0.4     // (mm/sec)
174
+#define DEFAULT_EJERK                 5.0    // (mm/sec)
174
 
175
 
175
 //===========================================================================
176
 //===========================================================================
176
 //=============================Additional Features===========================
177
 //=============================Additional Features===========================
191
 //#define ULTRA_LCD  //general lcd support, also 16x2
192
 //#define ULTRA_LCD  //general lcd support, also 16x2
192
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
193
 //#define SDSUPPORT // Enable SD Card Support in Hardware Console
193
 
194
 
194
-//#define ULTIPANEL
195
+#define ULTIPANEL
195
 #ifdef ULTIPANEL
196
 #ifdef ULTIPANEL
196
   #define NEWPANEL  //enable this if you have a click-encoder panel
197
   #define NEWPANEL  //enable this if you have a click-encoder panel
197
   #define SDSUPPORT
198
   #define SDSUPPORT

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

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

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

97
 // M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
97
 // M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
98
 // M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
98
 // M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
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
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
 // M206 - set additional homeing offset
101
 // M206 - set additional homeing offset
102
 // M220 S<factor in percent>- set speed factor override percentage
102
 // M220 S<factor in percent>- set speed factor override percentage
103
 // M221 S<factor in percent>- set extrude factor override percentage
103
 // M221 S<factor in percent>- set extrude factor override percentage
1116
       if(code_seen('B')) minsegmenttime = code_value() ;
1116
       if(code_seen('B')) minsegmenttime = code_value() ;
1117
       if(code_seen('X')) max_xy_jerk = code_value() ;
1117
       if(code_seen('X')) max_xy_jerk = code_value() ;
1118
       if(code_seen('Z')) max_z_jerk = code_value() ;
1118
       if(code_seen('Z')) max_z_jerk = code_value() ;
1119
+      if(code_seen('E')) max_e_jerk = code_value() ;
1119
     }
1120
     }
1120
     break;
1121
     break;
1121
     case 206: // M206 additional homeing offset
1122
     case 206: // M206 additional homeing offset

BIN
Marlin/Marlin.suo 파일 보기


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

74
 float retract_acceleration; //  mm/s^2   filament pull-pack and push-forward  while standing still in the other axis M204 TXXXX
74
 float retract_acceleration; //  mm/s^2   filament pull-pack and push-forward  while standing still in the other axis M204 TXXXX
75
 float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
75
 float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.
76
 float max_z_jerk;
76
 float max_z_jerk;
77
+float max_e_jerk;
77
 float mintravelfeedrate;
78
 float mintravelfeedrate;
78
 unsigned long axis_steps_per_sqr_second[NUM_AXIS];
79
 unsigned long axis_steps_per_sqr_second[NUM_AXIS];
79
 
80
 
531
   if(block->steps_e != 0) { enable_e0();enable_e1();enable_e2(); }
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
   // slow down when de buffer starts to empty, rather than wait at the corner for a buffer refill
542
   // slow down when de buffer starts to empty, rather than wait at the corner for a buffer refill
535
   int moves_queued=(block_buffer_head-block_buffer_tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1);
543
   int moves_queued=(block_buffer_head-block_buffer_tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1);
536
   #ifdef SLOWDOWN
544
   #ifdef SLOWDOWN
555
   block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
563
   block->nominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0
556
   block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0
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
   //  segment time im micro seconds
568
   //  segment time im micro seconds
705
   if(abs(current_speed[Z_AXIS]) > max_z_jerk/2) 
707
   if(abs(current_speed[Z_AXIS]) > max_z_jerk/2) 
706
     vmax_junction = max_z_jerk/2;
708
     vmax_junction = max_z_jerk/2;
707
   vmax_junction = min(vmax_junction, block->nominal_speed);
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
   if ((moves_queued > 1) && (previous_nominal_speed > 0.0)) {
713
   if ((moves_queued > 1) && (previous_nominal_speed > 0.0)) {
710
     float jerk = sqrt(pow((current_speed[X_AXIS]-previous_speed[X_AXIS]), 2)+pow((current_speed[Y_AXIS]-previous_speed[Y_AXIS]), 2));
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
     if((previous_speed[X_AXIS] != 0.0) || (previous_speed[Y_AXIS] != 0.0)) {
715
     if((previous_speed[X_AXIS] != 0.0) || (previous_speed[Y_AXIS] != 0.0)) {
717
     if(abs(current_speed[Z_AXIS] - previous_speed[Z_AXIS]) > max_z_jerk) {
721
     if(abs(current_speed[Z_AXIS] - previous_speed[Z_AXIS]) > max_z_jerk) {
718
       vmax_junction *= (max_z_jerk/abs(current_speed[Z_AXIS] - previous_speed[Z_AXIS]));
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
   block->max_entry_speed = vmax_junction;
728
   block->max_entry_speed = vmax_junction;
722
     
729
     

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

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

Loading…
취소
저장