Browse Source

Merge pull request #1691 from AnHardt/PID_dt

Move definition of PIDdT back to temperature.h
Scott Lahteine 9 years ago
parent
commit
ad05a726c1

+ 0
- 11
Marlin/Conditionals.h View File

390
     #define WRITE_FAN(v) WRITE(FAN_PIN, v)
390
     #define WRITE_FAN(v) WRITE(FAN_PIN, v)
391
   #endif
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
 #endif //CONFIGURATION_LCD
393
 #endif //CONFIGURATION_LCD
405
 #endif //CONDITIONALS_H
394
 #endif //CONDITIONALS_H

+ 1
- 2
Marlin/Configuration.h View File

184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186
   #define K1 0.95 //smoothing factor within the PID
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
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190
 // Ultimaker
189
 // Ultimaker
209
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
208
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
210
 //
209
 //
211
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
212
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
214
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
213
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
215
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
193
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
194
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
194
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
195
   #define K1 0.95 //smoothing factor within the PID
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
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
197
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
199
 // Ultimaker
198
 // Ultimaker
218
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
217
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
219
 //
218
 //
220
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
221
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
223
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
222
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
224
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186
   #define K1 0.95 //smoothing factor within the PID
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
   // Felix 2.0+ electronics with v4 Hotend
188
   // Felix 2.0+ electronics with v4 Hotend
190
   #define DEFAULT_Kp 12
189
   #define DEFAULT_Kp 12
199
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
198
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
200
 //
199
 //
201
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
202
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
204
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
203
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
205
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186
   #define K1 0.95 //smoothing factor within the PID
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
   // Felix 2.0+ electronics with v4 Hotend
188
   // Felix 2.0+ electronics with v4 Hotend
190
   #define DEFAULT_Kp 12
189
   #define DEFAULT_Kp 12
199
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
198
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
200
 //
199
 //
201
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
202
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
204
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
203
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
205
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186
   #define K1 0.95 //smoothing factor within the PID
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
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190
 // Ultimaker
189
 // Ultimaker
215
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
214
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
216
 //
215
 //
217
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
218
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
220
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
219
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
221
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186
   #define K1 0.95 //smoothing factor within the PID
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
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190
 // Ultimaker
189
 // Ultimaker
214
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
213
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
215
 //
214
 //
216
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
217
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
219
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
218
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
220
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
202
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
203
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
203
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
204
   #define K1 0.95 //smoothing factor within the PID
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
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
206
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
208
 // Ultimaker
207
 // Ultimaker
238
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
237
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
239
 //
238
 //
240
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
241
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
243
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
242
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
244
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186
   #define K1 0.95 //smoothing factor within the PID
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
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190
 // Ultimaker
189
 // Ultimaker
214
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
213
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
215
 //
214
 //
216
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
217
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
219
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
218
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
220
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
217
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
218
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
218
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
219
   #define K1 0.95 //smoothing factor within the PID
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
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
221
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
223
 // Ultimaker
222
 // Ultimaker
242
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
241
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
243
 //
242
 //
244
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
245
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
247
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
246
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
248
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
218
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
219
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
219
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
220
   #define K1 0.95 //smoothing factor within the PID
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
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
222
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
224
 // Ultimaker
223
 // Ultimaker
243
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
242
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
244
 //
243
 //
245
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
246
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
248
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
247
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
249
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186
   #define K1 0.95 //smoothing factor within the PID
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
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190
 // Ultimaker
189
 // Ultimaker
209
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
208
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
210
 //
209
 //
211
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
212
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
214
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
213
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
215
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
184
                                   // is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
185
   #define PID_INTEGRAL_DRIVE_MAX PID_MAX  //limit for the integral term
186
   #define K1 0.95 //smoothing factor within the PID
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
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
188
 // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
190
 // J-Head Mk V-B
189
 // J-Head Mk V-B
214
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
213
 // Select PID or bang-bang with PIDTEMPBED. If bang-bang, BED_LIMIT_SWITCHING will enable hysteresis
215
 //
214
 //
216
 // Uncomment this to enable PID on the bed. It uses the same frequency PWM as the extruder.
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
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
217
 // which is fine for driving a square wave into a resistive load and does not significantly impact you FET heating.
219
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
218
 // This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater.
220
 // If your configuration is significantly different than this and you don't understand the issues involved, you probably
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
   #define K2 (1.0-K1)
45
   #define K2 (1.0-K1)
46
 #endif
46
 #endif
47
 
47
 
48
+#if defined(PIDTEMPBED) || defined(PIDTEMP)
49
+  #define PID_dT ((OVERSAMPLENR * 12.0)/(F_CPU / 64.0 / 256.0))
50
+#endif
51
+
48
 //===========================================================================
52
 //===========================================================================
49
 //============================= public variables ============================
53
 //============================= public variables ============================
50
 //===========================================================================
54
 //===========================================================================

Loading…
Cancel
Save