瀏覽代碼

Moved SLOWDOWN function. (jetty840)

Included AD595 calibration options. (daid)
Erik van der Zalm 13 年之前
父節點
當前提交
018c567abf
共有 4 個檔案被更改,包括 31 行新增50 行删除
  1. 19
    24
      Marlin/Configuration.h
  2. 5
    0
      Marlin/Configuration_adv.h
  3. 7
    6
      Marlin/planner.cpp
  4. 0
    20
      README.md

+ 19
- 24
Marlin/Configuration.h 查看文件

@@ -28,7 +28,7 @@
28 28
 // Ultimaker = 7
29 29
 // Teensylu = 8
30 30
 // Gen3+ =9
31
-#define MOTHERBOARD 51
31
+#define MOTHERBOARD 7
32 32
 
33 33
 //===========================================================================
34 34
 //=============================Thermal Settings  ============================
@@ -46,13 +46,13 @@
46 46
 // 6 is EPCOS 100k
47 47
 // 7 is 100k Honeywell thermistor 135-104LAG-J01
48 48
 
49
-#define TEMP_SENSOR_0 1
49
+#define TEMP_SENSOR_0 -1
50 50
 #define TEMP_SENSOR_1 0
51 51
 #define TEMP_SENSOR_2 0
52
-#define TEMP_SENSOR_BED 1
52
+#define TEMP_SENSOR_BED 0
53 53
 
54 54
 // Actual temperature must be close to target for this long before M109 returns success
55
-#define TEMP_RESIDENCY_TIME 10	// 30  // (seconds) 30 seconds was too long
55
+#define TEMP_RESIDENCY_TIME 10	// (seconds)
56 56
 #define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
57 57
 
58 58
 // The minimal temperature defines the temperature below which the heater will not be enabled It is used
@@ -71,11 +71,6 @@
71 71
 #define HEATER_2_MAXTEMP 275
72 72
 #define BED_MAXTEMP 150
73 73
 
74
-//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
75
-//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
76
-#define TEMP_SENSOR_AD595_OFFSET 0.0
77
-#define TEMP_SENSOR_AD595_GAIN   1.0
78
-
79 74
 
80 75
 // PID settings:
81 76
 // Comment the following line to disable PID and enable bang-bang.
@@ -119,9 +114,9 @@
119 114
 #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
120 115
 
121 116
 // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
122
-const bool X_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops. 
123
-const bool Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops. 
124
-const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops. 
117
+const bool X_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops. 
118
+const bool Y_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops. 
119
+const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops. 
125 120
 
126 121
 // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
127 122
 #define X_ENABLE_ON 0
@@ -135,8 +130,8 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t
135 130
 #define DISABLE_Z false
136 131
 #define DISABLE_E false // For all extruders
137 132
 
138
-#define INVERT_X_DIR false    // for Mendel set to false, for Orca set to true
139
-#define INVERT_Y_DIR true    // for Mendel set to true, for Orca set to false
133
+#define INVERT_X_DIR true    // for Mendel set to false, for Orca set to true
134
+#define INVERT_Y_DIR false    // for Mendel set to true, for Orca set to false
140 135
 #define INVERT_Z_DIR true     // for Mendel set to false, for Orca set to true
141 136
 #define INVERT_E0_DIR false   // for direct drive extruder v9 set to true, for geared extruder set to false
142 137
 #define INVERT_E1_DIR false    // for direct drive extruder v9 set to true, for geared extruder set to false
@@ -148,11 +143,11 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t
148 143
 #define Y_HOME_DIR -1
149 144
 #define Z_HOME_DIR -1
150 145
 
151
-#define min_software_endstops false //If true, axis won't move to coordinates less than zero.
146
+#define min_software_endstops true //If true, axis won't move to coordinates less than HOME_POS.
152 147
 #define max_software_endstops true  //If true, axis won't move to coordinates greater than the defined lengths below.
153
-#define X_MAX_LENGTH 175
154
-#define Y_MAX_LENGTH 185
155
-#define Z_MAX_LENGTH 90
148
+#define X_MAX_LENGTH 205
149
+#define Y_MAX_LENGTH 205
150
+#define Z_MAX_LENGTH 200
156 151
 
157 152
 // The position of the homing switches. Use MAX_LENGTH * -0.5 if the center should be 0, 0, 0
158 153
 #define X_HOME_POS 0
@@ -161,7 +156,7 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t
161 156
 
162 157
 //// MOVEMENT SETTINGS
163 158
 #define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
164
-#define HOMING_FEEDRATE {1500, 1500, 80, 0} // {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
159
+#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
165 160
 
166 161
 // default settings 
167 162
 
@@ -169,8 +164,8 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t
169 164
 #define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 45}    // (mm/sec)    
170 165
 #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.
171 166
 
172
-#define DEFAULT_ACCELERATION          1500	// 3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves 
173
-#define DEFAULT_RETRACT_ACCELERATION  1500	// 3000   // X, Y, Z and E max acceleration in mm/s^2 for r retracts
167
+#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves 
168
+#define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for r retracts
174 169
 
175 170
 // 
176 171
 #define DEFAULT_XYJERK                20.0    // (mm/sec)
@@ -186,14 +181,14 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t
186 181
 // M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).  
187 182
 // M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
188 183
 //define this to enable eeprom support
189
-#define EEPROM_SETTINGS
184
+//#define EEPROM_SETTINGS
190 185
 //to disable EEPROM Serial responses and decrease program space by ~1700 byte: comment this out:
191 186
 // please keep turned on if you can.
192
-#define EEPROM_CHITCHAT
187
+//#define EEPROM_CHITCHAT
193 188
 
194 189
 //LCD and SD support
195 190
 //#define ULTRA_LCD  //general lcd support, also 16x2
196
-//#define SDSUPPORT // Enable SD Card Support in Hardware Console
191
+#define SDSUPPORT // Enable SD Card Support in Hardware Console
197 192
 
198 193
 //#define ULTIPANEL
199 194
 #ifdef ULTIPANEL

+ 5
- 0
Marlin/Configuration_adv.h 查看文件

@@ -59,6 +59,11 @@
59 59
 #define EXTRUDER_RUNOUT_SPEED 1500.  //extrusion speed
60 60
 #define EXTRUDER_RUNOUT_EXTRUDE 100
61 61
 
62
+//These defines help to calibrate the AD595 sensor in case you get wrong temperature measurements.
63
+//The measured temperature is defined as "actualTemp = (measuredTemp * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET"
64
+#define TEMP_SENSOR_AD595_OFFSET 0.0
65
+#define TEMP_SENSOR_AD595_GAIN   1.0
66
+
62 67
 //===========================================================================
63 68
 //=============================Mechanical Settings===========================
64 69
 //===========================================================================

+ 7
- 6
Marlin/planner.cpp 查看文件

@@ -529,6 +529,13 @@ void plan_buffer_line(float &x, float &y, float &z, float &e, float feed_rate, u
529 529
   // Enable all
530 530
   if(block->steps_e != 0) { enable_e0();enable_e1();enable_e2(); }
531 531
 
532
+
533
+  // slow down when de buffer starts to empty, rather than wait at the corner for a buffer refill
534
+  int moves_queued=(block_buffer_head-block_buffer_tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1);
535
+  #ifdef SLOWDOWN
536
+    if(moves_queued < (BLOCK_BUFFER_SIZE * 0.5) && moves_queued > 1) feed_rate = feed_rate*moves_queued / (BLOCK_BUFFER_SIZE * 0.5); 
537
+  #endif
538
+
532 539
   float delta_mm[4];
533 540
   delta_mm[X_AXIS] = (target[X_AXIS]-position[X_AXIS])/axis_steps_per_unit[X_AXIS];
534 541
   delta_mm[Y_AXIS] = (target[Y_AXIS]-position[Y_AXIS])/axis_steps_per_unit[Y_AXIS];
@@ -554,12 +561,6 @@ void plan_buffer_line(float &x, float &y, float &z, float &e, float feed_rate, u
554 561
     	if(feed_rate<minimumfeedrate) feed_rate=minimumfeedrate;
555 562
   } 
556 563
 
557
-  // slow down when de buffer starts to empty, rather than wait at the corner for a buffer refill
558
-  int moves_queued=(block_buffer_head-block_buffer_tail + BLOCK_BUFFER_SIZE) & (BLOCK_BUFFER_SIZE - 1);
559
-#ifdef SLOWDOWN
560
-  if(moves_queued < (BLOCK_BUFFER_SIZE * 0.5) && moves_queued > 1) feed_rate = feed_rate*moves_queued / (BLOCK_BUFFER_SIZE * 0.5); 
561
-#endif
562
-
563 564
 /*
564 565
   //  segment time im micro seconds
565 566
   long segment_time = lround(1000000.0/inverse_second);

+ 0
- 20
README.md 查看文件

@@ -1,23 +1,3 @@
1
-SCUBA82's fork:
2
------------------
3
-
4
-The main goal of my fork is porting the brilliant Marlin firmware to GEN7 Boards.
5
-I'm working on a 16MHz GEN7 board and have only tested with this configuration.
6
-But there were reports about successfully running it at 20 MHz. Expect 25% faster moves and maybe some other issues.
7
-
8
-Using lcd and sdcard support on an ATMega644(P) is not possible cause the sketch is way too big for its memory.
9
-I switched to an ATMega1284P which has double size program memory. Unfortunately it's not supported in Arduino IDE out of the box but expect a tutorial on how to compile for it soon. 
10
-For the necessary pin breakouts I used Alfons3 design of GEN7 (https://github.com/Alfons3/Generation_7_Electronics) with an additional breakout for pin A0/D31. 
11
-I'll publish my desing as soon as possible.
12
-
13
-You have to use different chip fuses to get Marlin running.
14
-The fuses I'm using are lfuse: 0xF7 hfuse: 0xD4 efuse: 0xFD
15
-
16
-For questions take a look into http://forums.reprap.org/read.php?181,118329 or send me an e-mail: christian_thalhammer@gmx.at
17
-
18
-
19
-Expect this fork to be highly experimental. 
20
-
21 1
 WARNING: 
22 2
 --------
23 3
 THIS IS RELEASE CANDIDATE 1 FOR MARLIN 1.0.0

Loading…
取消
儲存