Browse Source

overworked lcd+eeprom to have only mm/sec and PID including pid_dt

Bernhard 13 years ago
parent
commit
235051253a
2 changed files with 23 additions and 23 deletions
  1. 11
    11
      Marlin/EEPROMwrite.h
  2. 12
    12
      Marlin/ultralcd.pde

+ 11
- 11
Marlin/EEPROMwrite.h View File

136
     SERIAL_ECHO_START;
136
     SERIAL_ECHO_START;
137
       SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
137
       SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
138
       SERIAL_ECHO_START;
138
       SERIAL_ECHO_START;
139
-      SERIAL_ECHOPAIR("  M203 X",max_feedrate[0]/60);
140
-      SERIAL_ECHOPAIR(" Y",max_feedrate[1]/60 ); 
141
-      SERIAL_ECHOPAIR(" Z", max_feedrate[2]/60 ); 
142
-      SERIAL_ECHOPAIR(" E", max_feedrate[3]/60);
139
+      SERIAL_ECHOPAIR("  M203 X",max_feedrate[0]);
140
+      SERIAL_ECHOPAIR(" Y",max_feedrate[1] ); 
141
+      SERIAL_ECHOPAIR(" Z", max_feedrate[2] ); 
142
+      SERIAL_ECHOPAIR(" E", max_feedrate[3]);
143
       SERIAL_ECHOLN("");
143
       SERIAL_ECHOLN("");
144
     SERIAL_ECHO_START;
144
     SERIAL_ECHO_START;
145
       SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
145
       SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
158
     SERIAL_ECHO_START;
158
     SERIAL_ECHO_START;
159
       SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum xY jerk (mm/s),  Z=maximum Z jerk (mm/s)");
159
       SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum xY jerk (mm/s),  Z=maximum Z jerk (mm/s)");
160
       SERIAL_ECHO_START;
160
       SERIAL_ECHO_START;
161
-      SERIAL_ECHOPAIR("  M205 S",minimumfeedrate/60 ); 
162
-      SERIAL_ECHOPAIR(" T" ,mintravelfeedrate/60 ); 
161
+      SERIAL_ECHOPAIR("  M205 S",minimumfeedrate ); 
162
+      SERIAL_ECHOPAIR(" T" ,mintravelfeedrate ); 
163
       SERIAL_ECHOPAIR(" B" ,minsegmenttime ); 
163
       SERIAL_ECHOPAIR(" B" ,minsegmenttime ); 
164
-      SERIAL_ECHOPAIR(" X" ,max_xy_jerk/60 ); 
165
-      SERIAL_ECHOPAIR(" Z" ,max_z_jerk/60);
164
+      SERIAL_ECHOPAIR(" X" ,max_xy_jerk ); 
165
+      SERIAL_ECHOPAIR(" Z" ,max_z_jerk);
166
       SERIAL_ECHOLN(""); 
166
       SERIAL_ECHOLN(""); 
167
     #ifdef PIDTEMP
167
     #ifdef PIDTEMP
168
       SERIAL_ECHO_START;
168
       SERIAL_ECHO_START;
169
       SERIAL_ECHOLNPGM("PID settings:");
169
       SERIAL_ECHOLNPGM("PID settings:");
170
       SERIAL_ECHO_START;
170
       SERIAL_ECHO_START;
171
-      SERIAL_ECHOPAIR("   M301 P",Kp ); 
172
-      SERIAL_ECHOPAIR(" I" ,Ki ); 
173
-      SERIAL_ECHOPAIR(" D" ,Kd);
171
+      SERIAL_ECHOPAIR("   M301 P",Kp); 
172
+      SERIAL_ECHOPAIR(" I" ,Ki/PID_dT); 
173
+      SERIAL_ECHOPAIR(" D" ,Kd*PID_dT);
174
       SERIAL_ECHOLN(""); 
174
       SERIAL_ECHOLN(""); 
175
     #endif
175
     #endif
176
   #endif
176
   #endif

+ 12
- 12
Marlin/ultralcd.pde View File

758
             linechanging=!linechanging;
758
             linechanging=!linechanging;
759
             if(linechanging)
759
             if(linechanging)
760
             {
760
             {
761
-               encoderpos=(int)Kp/5;
761
+               encoderpos=(int)Kp;
762
             }
762
             }
763
             else
763
             else
764
             {
764
             {
765
-              Kp= encoderpos*5;
765
+              Kp= encoderpos;
766
               encoderpos=activeline*lcdslow;
766
               encoderpos=activeline*lcdslow;
767
                 
767
                 
768
             }
768
             }
772
           if(linechanging)
772
           if(linechanging)
773
           {
773
           {
774
             if(encoderpos<1) encoderpos=1;
774
             if(encoderpos<1) encoderpos=1;
775
-            if(encoderpos>9990/5) encoderpos=9990/5;
776
-            lcd.setCursor(13,line);lcd.print(itostr4(encoderpos*5));
775
+            if(encoderpos>9990) encoderpos=9990;
776
+            lcd.setCursor(13,line);lcd.print(itostr4(encoderpos));
777
           }
777
           }
778
         }
778
         }
779
       }break;
779
       }break;
782
       if(force_lcd_update)
782
       if(force_lcd_update)
783
         {
783
         {
784
           lcd.setCursor(0,line);lcdprintPGM(" PID-I: ");
784
           lcd.setCursor(0,line);lcdprintPGM(" PID-I: ");
785
-          lcd.setCursor(13,line);lcd.print(ftostr51(Ki));
785
+          lcd.setCursor(13,line);lcd.print(ftostr51(Ki/PID_dT));
786
         }
786
         }
787
         
787
         
788
         if((activeline==line) )
788
         if((activeline==line) )
792
             linechanging=!linechanging;
792
             linechanging=!linechanging;
793
             if(linechanging)
793
             if(linechanging)
794
             {
794
             {
795
-               encoderpos=(int)(Ki*10);
795
+               encoderpos=(int)(Ki*10/PID_dT);
796
             }
796
             }
797
             else
797
             else
798
             {
798
             {
799
-              Ki= encoderpos/10.;
799
+              Ki= encoderpos/10.*PID_dT;
800
               encoderpos=activeline*lcdslow;
800
               encoderpos=activeline*lcdslow;
801
                 
801
                 
802
             }
802
             }
816
       if(force_lcd_update)
816
       if(force_lcd_update)
817
         {
817
         {
818
           lcd.setCursor(0,line);lcdprintPGM(" PID-D: ");
818
           lcd.setCursor(0,line);lcdprintPGM(" PID-D: ");
819
-          lcd.setCursor(13,line);lcd.print(itostr4(Kd));
819
+          lcd.setCursor(13,line);lcd.print(itostr4(Kd*PID_dT));
820
         }
820
         }
821
         
821
         
822
         if((activeline==line) )
822
         if((activeline==line) )
826
             linechanging=!linechanging;
826
             linechanging=!linechanging;
827
             if(linechanging)
827
             if(linechanging)
828
             {
828
             {
829
-               encoderpos=(int)Kd/5;
829
+               encoderpos=(int)(Kd/5./PID_dT);
830
             }
830
             }
831
             else
831
             else
832
             {
832
             {
833
-              Kd= encoderpos*5;
833
+              Kd= encoderpos;
834
               encoderpos=activeline*lcdslow;
834
               encoderpos=activeline*lcdslow;
835
                 
835
                 
836
             }
836
             }
840
           if(linechanging)
840
           if(linechanging)
841
           {
841
           {
842
             if(encoderpos<0) encoderpos=0;
842
             if(encoderpos<0) encoderpos=0;
843
-            if(encoderpos>9990/5) encoderpos=9990/5;
844
-            lcd.setCursor(13,line);lcd.print(itostr4(encoderpos*5));
843
+            if(encoderpos>9990) encoderpos=9990;
844
+            lcd.setCursor(13,line);lcd.print(itostr4(encoderpos));
845
           }
845
           }
846
         }
846
         }
847
       }break;   
847
       }break;   

Loading…
Cancel
Save