need to test FULL_PID_BAND

This commit is contained in:
jeanmarc
2012-06-02 21:28:49 +01:00
parent 34d72198e6
commit 42423d53fa
3 changed files with 7 additions and 6 deletions
+3 -2
View File
@@ -8,7 +8,7 @@
//User specified version info of THIS file to display in [Pronterface, etc] terminal window during startup.
//Implementation of an idea by Prof Braino to inform user that any changes made
//to THIS file by the user have been successfully uploaded into firmware.
#define STRING_VERSION_CONFIG_H "2012-04-12-2" //Personal revision number for changes to THIS file.
#define STRING_VERSION_CONFIG_H "2012-05-22-1" //Personal revision number for changes to THIS file.
#define STRING_CONFIG_H_AUTHOR "eMAKER" //Who made the changes.
// This determines the communication speed of the printer
@@ -84,10 +84,11 @@
// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
#define PID_MAX 255 // limits current to nozzle; 255=full current
#define FULL_PID_BAND 150 // Full power is applied when pid_error[e] > FULL_PID_BAND
#ifdef PIDTEMP
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104 sets the output power in %
#define PID_INTEGRAL_DRIVE_MAX 130 //limit for the integral term
#define PID_INTEGRAL_DRIVE_MAX 100 //limit for the integral term
#define K1 0.95 //smoothing factor withing the PID
#define PID_dT 0.122 //sampling period of the PID
+2 -2
View File
@@ -587,8 +587,8 @@
#define PROBE_PIN -1 //29 on Melzi1284p A2, 11 on SL1.3a
#define LED_PIN -1//27 //27 on Melzi1284p
#define FAN_PIN -1 //4 on Melzi1284p
#define LED_PIN 27//27 //27 on Melzi1284p
#define FAN_PIN 4 //4 on Melzi1284p
#define PS_ON_PIN -1
#define KILL_PIN -1
+2 -2
View File
@@ -275,11 +275,11 @@ void manage_heater()
#ifndef PID_OPENLOOP
pid_error[e] = pid_setpoint[e] - pid_input;
if(pid_error[e] > 10) {
if(pid_error[e] > FULL_PID_BAND) {
pid_output = PID_MAX;
pid_reset[e] = true;
}
else if(pid_error[e] < -10) {
else if(pid_error[e] < -FULL_PID_BAND) {
pid_output = 0;
pid_reset[e] = true;
}