Browse Source

PPID tune exports more constants.

Erik van der Zalm 13 years ago
parent
commit
33f5697888
1 changed files with 17 additions and 0 deletions
  1. 17
    0
      Marlin/temperature.cpp

+ 17
- 0
Marlin/temperature.cpp View File

191
             if(cycles > 2) {
191
             if(cycles > 2) {
192
               Ku = (4.0*d)/(3.14159*(max-min)/2.0);
192
               Ku = (4.0*d)/(3.14159*(max-min)/2.0);
193
               Tu = ((float)(t_low + t_high)/1000.0);
193
               Tu = ((float)(t_low + t_high)/1000.0);
194
+              SERIAL_PROTOCOLPGM(" Ku: "); SERIAL_PROTOCOL(Ku);
195
+              SERIAL_PROTOCOLPGM(" Tu: "); SERIAL_PROTOCOLLN(Tu);
194
               Kp = 0.6*Ku;
196
               Kp = 0.6*Ku;
195
               Ki = 2*Kp/Tu;
197
               Ki = 2*Kp/Tu;
196
               Kd = Kp*Tu/8;
198
               Kd = Kp*Tu/8;
199
+              SERIAL_PROTOCOLLNPGM(" Clasic PID ")
200
+              SERIAL_PROTOCOLPGM(" Kp: "); SERIAL_PROTOCOLLN(Kp);
201
+              SERIAL_PROTOCOLPGM(" Ki: "); SERIAL_PROTOCOLLN(Ki);
202
+              SERIAL_PROTOCOLPGM(" Kd: "); SERIAL_PROTOCOLLN(Kd);
203
+              Kp = 0.33*Ku;
204
+              Ki = Kp/Tu;
205
+              Kd = Kp*Tu/3;
206
+              SERIAL_PROTOCOLLNPGM(" Some overshoot ")
207
+              SERIAL_PROTOCOLPGM(" Kp: "); SERIAL_PROTOCOLLN(Kp);
208
+              SERIAL_PROTOCOLPGM(" Ki: "); SERIAL_PROTOCOLLN(Ki);
209
+              SERIAL_PROTOCOLPGM(" Kd: "); SERIAL_PROTOCOLLN(Kd);
210
+              Kp = 0.2*Ku;
211
+              Ki = 2*Kp/Tu;
212
+              Kd = Kp*Tu/3;
213
+              SERIAL_PROTOCOLLNPGM(" No overshoot ")
197
               SERIAL_PROTOCOLPGM(" Kp: "); SERIAL_PROTOCOLLN(Kp);
214
               SERIAL_PROTOCOLPGM(" Kp: "); SERIAL_PROTOCOLLN(Kp);
198
               SERIAL_PROTOCOLPGM(" Ki: "); SERIAL_PROTOCOLLN(Ki);
215
               SERIAL_PROTOCOLPGM(" Ki: "); SERIAL_PROTOCOLLN(Ki);
199
               SERIAL_PROTOCOLPGM(" Kd: "); SERIAL_PROTOCOLLN(Kd);
216
               SERIAL_PROTOCOLPGM(" Kd: "); SERIAL_PROTOCOLLN(Kd);

Loading…
Cancel
Save