Browse Source

Move definition of PIDdT back to temperature.h

make it unconditional
remove all definitions in the 'Configuration.h's
remove form 'Conditionals.h'
AnHardt 9 years ago
parent
commit
94330705c7

+ 0
- 11
Marlin/Conditionals.h View File

@@ -390,16 +390,5 @@
390 390
     #define WRITE_FAN(v) WRITE(FAN_PIN, v)
391 391
   #endif
392 392
 
393
-  /**
394
-   * Sampling period of the temperature routine
395
-   * This override comes originally from temperature.cpp
396
-   * The Configuration.h option is basically ignored.
397
-   */
398
-  #ifdef PID_dT
399
-    #undef PID_dT
400
-  #endif
401
-  #define PID_dT ((OVERSAMPLENR * 12.0)/(F_CPU / 64.0 / 256.0))
402
-
403
-
404 393
 #endif //CONFIGURATION_LCD
405 394
 #endif //CONDITIONALS_H

+ 1
- 2
Marlin/Configuration.h View File

@@ -184,7 +184,6 @@ Here are some standard links for getting your machine calibrated:
184 184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185 185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186 186
   #define K1 0.95 //smoothing factor within the PID
187
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188 187
 
189 188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190 189
 // Ultimaker
@@ -209,7 +208,7 @@ Here are some standard links for getting your machine calibrated:
209 208
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
210 209
 //
211 210
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
212
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
211
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
213 212
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
214 213
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
215 214
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 1
- 2
Marlin/configurator/config/Configuration.h View File

@@ -193,7 +193,6 @@ Here are some standard links for getting your machine calibrated:
193 193
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
194 194
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
195 195
   #define K1 0.95 //smoothing factor within the PID
196
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
197 196
 
198 197
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
199 198
 // Ultimaker
@@ -218,7 +217,7 @@ Here are some standard links for getting your machine calibrated:
218 217
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
219 218
 //
220 219
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
221
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
220
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
222 221
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
223 222
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
224 223
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 1
- 2
Marlin/example_configurations/Felix/Configuration.h View File

@@ -184,7 +184,6 @@ Here are some standard links for getting your machine calibrated:
184 184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185 185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186 186
   #define K1 0.95 //smoothing factor within the PID
187
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188 187
 
189 188
   // Felix 2.0+ electronics with v4 Hotend
190 189
   #define DEFAULT_Kp 12
@@ -199,7 +198,7 @@ Here are some standard links for getting your machine calibrated:
199 198
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
200 199
 //
201 200
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
202
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
201
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
203 202
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
204 203
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
205 204
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 1
- 2
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -184,7 +184,6 @@ Here are some standard links for getting your machine calibrated:
184 184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185 185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186 186
   #define K1 0.95 //smoothing factor within the PID
187
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188 187
 
189 188
   // Felix 2.0+ electronics with v4 Hotend
190 189
   #define DEFAULT_Kp 12
@@ -199,7 +198,7 @@ Here are some standard links for getting your machine calibrated:
199 198
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
200 199
 //
201 200
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
202
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
201
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
203 202
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
204 203
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
205 204
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 1
- 2
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -184,7 +184,6 @@ Here are some standard links for getting your machine calibrated:
184 184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185 185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186 186
   #define K1 0.95 //smoothing factor within the PID
187
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188 187
 
189 188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190 189
 // Ultimaker
@@ -215,7 +214,7 @@ Here are some standard links for getting your machine calibrated:
215 214
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
216 215
 //
217 216
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
218
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
217
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
219 218
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
220 219
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
221 220
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 1
- 2
Marlin/example_configurations/K8200/Configuration.h View File

@@ -184,7 +184,6 @@ Here are some standard links for getting your machine calibrated:
184 184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185 185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186 186
   #define K1 0.95 //smoothing factor within the PID
187
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188 187
 
189 188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190 189
 // Ultimaker
@@ -214,7 +213,7 @@ Here are some standard links for getting your machine calibrated:
214 213
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
215 214
 //
216 215
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
217
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
216
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
218 217
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
219 218
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
220 219
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 1
- 2
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -202,7 +202,6 @@ Here are some standard links for getting your machine calibrated:
202 202
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
203 203
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
204 204
   #define K1 0.95 //smoothing factor within the PID
205
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
206 205
 
207 206
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
208 207
 // Ultimaker
@@ -238,7 +237,7 @@ Here are some standard links for getting your machine calibrated:
238 237
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
239 238
 //
240 239
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
241
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
240
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
242 241
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
243 242
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
244 243
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 1
- 2
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -184,7 +184,6 @@ Here are some standard links for getting your machine calibrated:
184 184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185 185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186 186
   #define K1 0.95 //smoothing factor within the PID
187
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188 187
 
189 188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190 189
 // Ultimaker
@@ -214,7 +213,7 @@ Here are some standard links for getting your machine calibrated:
214 213
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
215 214
 //
216 215
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
217
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
216
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
218 217
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
219 218
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
220 219
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 1
- 2
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -217,7 +217,6 @@ Here are some standard links for getting your machine calibrated:
217 217
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
218 218
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
219 219
   #define K1 0.95 //smoothing factor within the PID
220
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
221 220
 
222 221
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
223 222
 // Ultimaker
@@ -242,7 +241,7 @@ Here are some standard links for getting your machine calibrated:
242 241
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
243 242
 //
244 243
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
245
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
244
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
246 245
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
247 246
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
248 247
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 1
- 2
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -218,7 +218,6 @@ Here are some standard links for getting your machine calibrated:
218 218
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
219 219
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
220 220
   #define K1 0.95 //smoothing factor within the PID
221
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
222 221
 
223 222
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
224 223
 // Ultimaker
@@ -243,7 +242,7 @@ Here are some standard links for getting your machine calibrated:
243 242
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
244 243
 //
245 244
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
246
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
245
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
247 246
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
248 247
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
249 248
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 1
- 2
Marlin/example_configurations/makibox/Configuration.h View File

@@ -184,7 +184,6 @@ Here are some standard links for getting your machine calibrated:
184 184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185 185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186 186
   #define K1 0.95 //smoothing factor within the PID
187
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188 187
 
189 188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190 189
 // Ultimaker
@@ -209,7 +208,7 @@ Here are some standard links for getting your machine calibrated:
209 208
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
210 209
 //
211 210
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
212
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
211
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
213 212
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
214 213
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
215 214
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 1
- 2
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -184,7 +184,6 @@ Here are some standard links for getting your machine calibrated:
184 184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185 185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186 186
   #define K1 0.95 //smoothing factor within the PID
187
-  #define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
188 187
 
189 188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190 189
 // J-Head Mk V-B
@@ -214,7 +213,7 @@ Here are some standard links for getting your machine calibrated:
214 213
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
215 214
 //
216 215
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
217
-// If your PID_dT above is the default, and correct for your hardware/configuration, that means 7.689Hz,
216
+// If your PID_dT is the default, and correct for your hardware/configuration, that means 7.689Hz,
218 217
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
219 218
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
220 219
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably

+ 4
- 0
Marlin/temperature.cpp View File

@@ -45,6 +45,10 @@
45 45
   #define K2 (1.0-K1)
46 46
 #endif
47 47
 
48
+#ifdef PIDTEMPBED
49
+  #define PID_dT ((OVERSAMPLENR * 12.0)/(F_CPU / 64.0 / 256.0))
50
+#endif
51
+
48 52
 //===========================================================================
49 53
 //============================= public variables ============================
50 54
 //===========================================================================

Loading…
Cancel
Save