if(set_temper>temper) { if(set_temper-temper>1) { high_time=100 ; //大于1°不进行PID运算 low_time=0 ; } else { //在1°范围内进行PID运算 for(i=0;i<10;i++) { //get_temper(); rin=s; // Read Input rout=PIDCalc(&spid,rin); //执行PID运算 // Perform PID Interation } if(high_time<=100) //限制最大值 high_time=(unsigned char)(rout/800);\\为什么除以800 else high_time=100; low_time=(100-high_time);
|