Browse Source

repaired nozzle runout prevention to not collide with automatic stepper disabeling.

Bernhard 12 years ago
parent
commit
01001b89d2
2 changed files with 10 additions and 5 deletions
  1. 1
    2
      Marlin/Configuration.h
  2. 9
    3
      Marlin/Marlin.pde

+ 1
- 2
Marlin/Configuration.h View File

@@ -157,9 +157,8 @@
157 157
 //if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
158 158
 //#define EXTRUDER_RUNOUT_PREVENT  
159 159
 #define EXTRUDER_RUNOUT_MINTEMP 190  
160
-#define EXTRUDER_RUNOUT_SECONDS 60.
160
+#define EXTRUDER_RUNOUT_SECONDS 30.
161 161
 #define EXTRUDER_RUNOUT_ESTEPS 14. //mm filament
162
-#define EXTRUDER_RUNOUT_EXTRUDE 50. //mm filament
163 162
 #define EXTRUDER_RUNOUT_SPEED 1500.  //extrusion speed
164 163
 
165 164
 

+ 9
- 3
Marlin/Marlin.pde View File

@@ -235,7 +235,9 @@ void setup()
235 235
   SERIAL_PROTOCOLLNPGM("start");
236 236
   SERIAL_ECHO_START;
237 237
   SERIAL_ECHOPGM("Free Memory:");
238
-  SERIAL_ECHOLN(freeMemory());
238
+  SERIAL_ECHO(freeMemory());
239
+  SERIAL_ECHOPGM(" PlannerBufferBytes:");
240
+  SERIAL_ECHOLN((int)sizeof(block_t)*BLOCK_BUFFER_SIZE);
239 241
   for(int8_t i = 0; i < BUFSIZE; i++)
240 242
   {
241 243
     fromsd[i] = false;
@@ -1207,7 +1209,8 @@ void manage_inactivity(byte debug)
1207 1209
       last_stepperdisabled_time=previous_millis_cmd;
1208 1210
     else
1209 1211
     {
1210
-      enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND); 
1212
+      if(  (X_ENABLE_ON && (READ(X_ENABLE_PIN)!=0))  ||  (!X_ENABLE_ON && READ(X_ENABLE_PIN)==0)  )
1213
+        enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND); 
1211 1214
       last_stepperdisabled_time=millis();
1212 1215
     }
1213 1216
   }
@@ -1215,6 +1218,7 @@ void manage_inactivity(byte debug)
1215 1218
     if( (millis()-previous_millis_cmd) >  EXTRUDER_RUNOUT_SECONDS*1000 ) 
1216 1219
     if(degHotend(active_extruder)>EXTRUDER_RUNOUT_MINTEMP)
1217 1220
     {
1221
+     bool oldstatus=READ(E_ENABLE_PIN);
1218 1222
      enable_e();
1219 1223
      float oldepos=current_position[E_AXIS];
1220 1224
      float oldedes=destination[E_AXIS];
@@ -1225,7 +1229,9 @@ void manage_inactivity(byte debug)
1225 1229
      destination[E_AXIS]=oldedes;
1226 1230
      plan_set_e_position(oldepos);
1227 1231
      previous_millis_cmd=millis();
1228
-     enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
1232
+     //enquecommand(DEFAULT_STEPPER_DEACTIVE_COMMAND);
1233
+     st_synchronize();
1234
+     WRITE(E_ENABLE_PIN,oldstatus);
1229 1235
     }
1230 1236
   #endif
1231 1237
   check_axes_activity();

Loading…
Cancel
Save