⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testprog.lst

📁 电除尘行业中监控界面采用ACTIVE 控件的形式
💻 LST
📖 第 1 页 / 共 5 页
字号:
 400   2                              else if(m_int_count_rec ==3)
 401   2                              {
 402   3                                      m_tc += con_speed2;
 403   3                              }
 404   2                              else if(m_int_count_rec ==6)
 405   2                              {
 406   3                                      m_tc += con_speed4;
 407   3                              }
 408   2                              else                                                    //4,5   
 409   2                              {
 410   3                                      m_tc += con_speed3;
 411   3                              }
 412   2                      }
 413   1                      //工作方式6用不着列出,因为是上面5种工作方式之一
 414   1                      //-------------------------------------------------------------------20050713
 415   1      
 416   1                      if(m_tc > 2320) m_total_t0 = (m_tc - 2050)/290 ;        
 417   1                      else                    m_total_t0 = 1;
 418   1                      m_t0_c = 0;
 419   1                      
 420   1                      if(m_tc < 1600) return;
 421   1                      
 422   1                      if(m_get_gzfs ==1 )
 423   1                      {
 424   2                              if(m_tc > 8600) m_tc = 8600;       
 425   2                              if(m_pulse_count == 1)
 426   2                              {
 427   3                                      silent  = 44000 + m_tc*2;       //45536            
C51 COMPILER V7.00  TESTPROG                                                               11/18/2007 17:17:47 PAGE 8   

 428   3                              }
 429   2                              else if(m_pulse_count == 2)
 430   2                              {
 431   3                                      silent  = 44800 + m_tc*2;       //45536            
 432   3                              }
 433   2                              else    return;
 434   2      
 435   2                              TH0     = silent/256;
 436   2                              TL0     = silent%256;
 437   2                              ET0     = SET;
 438   2                              TR0     = SET;  
 439   2                              return;
 440   2                      }
 441   1                      else if( m_get_gzfs == 4 )
 442   1                      {
 443   2                              if(m_tc > m_left_fdb_tc )       m_tc = m_left_fdb_tc;           //第一步,     
 444   2      
 445   2                              silent  = 44200 + m_tc*2;                                       //44200    
 446   2                              //----------------------------------------------
 447   2                              if(m_pulse_count == 3 ||m_pulse_count== 4)
 448   2                              {
 449   3                                      silent  =  silent + m_fdb_tc*2;         //44200    
 450   3                              }
 451   2                              TH0     = silent/256;
 452   2                              TL0     = silent%256;
 453   2                              ET0     = SET;
 454   2                              TR0     = SET;  
 455   2                              return;
 456   2                      }
 457   1                      else
 458   1                      {
 459   2                              if(m_tc > 8900) m_tc = 8900;       
 460   2                              silent  = 44200 + m_tc*2;       //44200    
 461   2                              TH0     = silent/256;
 462   2                              TL0     = silent%256;
 463   2                              ET0     = SET;
 464   2                              TR0     = SET;  
 465   2                              return;
 466   2                      }
 467   1      }
 468          
 469          void t1_isr( void) interrupt 3                                  //timer 0 interrupt
 470          {
 471   1              TH1     = 0Xf8;
 472   1              TL1     = 0X30;
 473   1      
 474   1              m_ms_count++;
 475   1              m_send_ref++;                                                           //每个毫秒发送一个字节
 476   1      
 477   1              if(m_ms_count == 10)                                            //10  another half wave
 478   1              {
 479   2                      TR0     = CLEAR;                                                //关闭定时器0,
 480   2                      ET0     = CLEAR;
 481   2                      U_DRV   = SET;
 482   2      
 483   2                      m_int_count ++;
 484   2                      m_int_count_rec ++;
 485   2                      
 486   2                      //对工作方式1的特殊照顾
 487   2                      if(m_get_gzfs == 1 )                                    //对于间歇供电的处理
 488   2                      {
 489   3                              m_pulse_count ++;
C51 COMPILER V7.00  TESTPROG                                                               11/18/2007 17:17:47 PAGE 9   

 490   3                              if(m_pulse_count > m_get_zkb) m_pulse_count = 1;
 491   3                              if(m_pulse_count > 3) 
 492   3                              {
 493   4                                      m_vol2_old_01 = 0;
 494   4                                      m_vol2_old_10 = 0;
 495   4                              }
 496   3                      }
 497   2                      else if( m_get_gzfs == 4 )                              //对于脉冲供电方式的处理
 498   2                      {
 499   3                              m_pulse_count ++;
 500   3                              if(m_pulse_count > 4) m_pulse_count = 1;
 501   3                      }
 502   2                              
 503   2                      if(m_br_fs) goto NTTS;
 504   2      
 505   2                      m_vol2_new              =   channel(167);//channel(4);                  //首先检测二次电压
 506   2                      m_vol2_10       =   m_vol2_new;
 507   2      
 508   2                      if( m_get_gzfs == 4 && m_pulse_count == 2) goto next_1666;
 509   2                      if( m_get_gzfs == 4 && m_pulse_count == 4 )
 510   2                      {
 511   3                              if(m_dtj > 109 )
 512   3                              {                               //360          
 513   4                                      if(m_vol2_new + m_get_o36   <  m_vol2_old_10 )
 514   4                                      {
 515   5                                              goto next_166;  //340   
 516   5                                      }
 517   4                              }
 518   3                              else if(m_dtj > 72)
 519   3                              {                               //250           
 520   4                                      if( m_vol2_new + m_get_o36  <  m_vol2_old_10 )
 521   4                                      {
 522   5                                              goto next_166;          
 523   5                                      }
 524   4                              }
 525   3                              else
 526   3                              {                                       //250                     
 527   4                                      if( m_vol2_new + m_get_o36  <  m_vol2_old_10 )
 528   4                                      {
 529   5                                              if(m_cur2 > m_cur2_div6)        //div4; 240      &&       m_cur2_new > m_vol2_new + 100 
 530   5                                              {               
 531   6      next_166:                               TR0         = CLEAR;            //关闭定时器0,
 532   6                                                      ET0         = CLEAR;
 533   6                                                      U_DRV           = SET;                  //因为火花,关闭进一步的脉冲
 534   6                                                      m_br_fs         = TRUE;                                                 
 535   6                                                      m_vol2_old_10   = m_vol2_new;
 536   6                                                      return;
 537   6                                              }
 538   5                                      }
 539   4                              }       
 540   3                      }
 541   2                      else
 542   2                      {
 543   3                              if(m_dtj > 109 )
 544   3                              {                               //360          
 545   4                                      if(m_vol2_new + m_get_o109 <  m_vol2_old_10 )
 546   4                                      {
 547   5                                              goto next_16;   //340   
 548   5                                      }
 549   4                              }
 550   3                              else if(m_dtj > 72)
 551   3                              {                               //250           
C51 COMPILER V7.00  TESTPROG                                                               11/18/2007 17:17:47 PAGE 10  

 552   4                                      if( m_vol2_new + m_get_o72 <  m_vol2_old_10 )
 553   4                                      {
 554   5                                              goto next_16;           
 555   5                                      }
 556   4                              }
 557   3                              else
 558   3                              {                                       //250                     
 559   4                                      if( m_vol2_new + m_get_o36 <  m_vol2_old_10 )
 560   4                                      {
 561   5                                              if(m_cur2 > m_cur2_div6)        //div4; 240      &&       m_cur2_new > m_vol2_new + 100 
 562   5                                              {               
 563   6      next_16:                                TR0         = CLEAR;            //关闭定时器0,
 564   6                                                      ET0         = CLEAR;
 565   6                                                      U_DRV           = SET;                  //因为火花,关闭进一步的脉冲
 566   6                                                      m_br_fs         = TRUE;                                                 
 567   6                                                      m_vol2_old_10   = m_vol2_new;
 568   6                                                      return;
 569   6                                              }
 570   5                                      }
 571   4                              }       
 572   3                      }
 573   2      
 574   2      next_1666:
 575   2                      m_vol2_old_10   = m_vol2_new;   
 576   2      
 577   2                      if(m_br_fs)
 578   2                      {
 579   3      NTTS:           if(m_br_u2)     return;
 580   3                              U_DRV = SET;
 581   3                              //-----------------------
 582   3                              if(m_tc > 8900) m_tc = 8900;            //new adding
 583   3      
 584   3                              if(m_get_gzfs == 1)
 585   3                              {
 586   4                                      if(m_vol2 >8)   m_br_over8 = TRUE;
 587   4                                      m_cur2                  =       0;//<1>二次电流                 
 588   4                                      //-----------------------------------------------
 589   4                                      if(m_pulse_count == 4)
 590   4                                      {
 591   5                                              m_tc_max        =  m_tc;
 592   5                                              //0.70--0.76--0.82--0.88
 593   5                                              con_speed1      =  m_tc_max/50;
 594   5                                              m_tc            =  con_speed1 * 35;
 595   5                                              con_speed1      =  con_speed1 * 3;
 596   5                                              con_speed       =  3;
 597   5                                              m_br_fs                 = FALSE;
 598   5                                              m_int_count_rec = 0;
 599   5                                              m_hh_count ++;                                          // just for sparking rate
 600   5                                      }
 601   4                                      //-----------------------------------------------
 602   4                                      m_count_plc     = 0;                            //偏励磁次数清零
 603   4                                      m_vol2_old_10   = 0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -