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

📄 performance.c.bak

📁 单片机程序代码,经过很详细的测试.呵呵,硬件相关.
💻 BAK
📖 第 1 页 / 共 5 页
字号:
        REI_2M[num][2] += temp;                                         
        REI_2M_15min[num][2] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_3H,Rei_Arx_count_3L,num + 1);                                   
        REI_2M[num][3] += temp;                                         
        REI_2M_15min[num][3] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_4H,Rei_Arx_count_4L,num + 1);           
        REI_2M[num][4] += temp;                                         
        REI_2M_15min[num][4] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_5H,Rei_Arx_count_5L,num + 1);
        REI_2M[num][5] += temp;                                         
        REI_2M_15min[num][5] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_6H,Rei_Arx_count_6L,num + 1);     
        REI_2M[num][6] += temp;                                         
        REI_2M_15min[num][6] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_7H,Rei_Arx_count_7L,num + 1);
        REI_2M[num][7] += temp;                                         
        REI_2M_15min[num][7] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_8H,Rei_Arx_count_8L,num + 1);                                   
        REI_2M[num][8] += temp;                                         
        REI_2M_15min[num][8] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_9H,Rei_Arx_count_9L,num + 1);           
        REI_2M[num][9] += temp;                                         
        REI_2M_15min[num][9] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_10H,Rei_Arx_count_10L,num + 1);           
        REI_2M[num][10] += temp;                                         
        REI_2M_15min[num][10] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_11H,Rei_Arx_count_11L,num + 1);          
        REI_2M[num][11] += temp;                                         
        REI_2M_15min[num][11] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_12H,Rei_Arx_count_12L,num + 1);          
        REI_2M[num][12] += temp;                                         
        REI_2M_15min[num][12] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_13H,Rei_Arx_count_13L,num + 1);          
        REI_2M[num][13] += temp;                                         
        REI_2M_15min[num][13] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_14H,Rei_Arx_count_14L,num + 1);          
        REI_2M[num][14] += temp;                                         
        REI_2M_15min[num][14] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_15H,Rei_Arx_count_15L,num + 1);          
        REI_2M[num][15] += temp;                                         
        REI_2M_15min[num][15] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_16H,Rei_Arx_count_16L,num + 1);          
        REI_2M[num][16] += temp;                                         
        REI_2M_15min[num][16] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_17H,Rei_Arx_count_17L,num + 1);          
        REI_2M[num][17] += temp;                                         
        REI_2M_15min[num][17] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_18H,Rei_Arx_count_18L,num + 1);          
        REI_2M[num][18] += temp;                                         
        REI_2M_15min[num][18] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_19H,Rei_Arx_count_19L,num + 1);          
        REI_2M[num][19] += temp;                                         
        REI_2M_15min[num][19] += temp;
		temp = se0111_reg_rd(Rei_Arx_count_20H,Rei_Arx_count_20L,num + 1);          
        REI_2M[num][20] += temp;                                         
        REI_2M_15min[num][20] += temp;
        temp = se0111_reg_rd(Pj_Arx_count_0H,Pj_Arx_count_0L,num + 1);			//得到支路1的指针调整计数值          
        NJC_2M[num][0] += temp & 0x000F;                                                                    
        NJC_2M_15min[num][0] += temp & 0x000F;
		PJC_2M[num][0] += temp >> 4;                                                                        
        PJC_2M_15min[num][0] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_1H,Pj_Arx_count_1L,num + 1);                                            
        NJC_2M[num][1] += temp & 0x000F;                           
        NJC_2M_15min[num][1] += temp & 0x000F;
        PJC_2M[num][1] += temp >> 4;                               
        PJC_2M_15min[num][1] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_2H,Pj_Arx_count_2L,num + 1);                         
        NJC_2M[num][2] += temp & 0x000F;                              
        NJC_2M_15min[num][2] += temp & 0x000F;
        PJC_2M[num][2] += temp >> 4;                                  
        PJC_2M_15min[num][2] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_3H,Pj_Arx_count_3L,num + 1);           
        NJC_2M[num][3] += temp & 0x000F;                              
        NJC_2M_15min[num][3] += temp & 0x000F;
		PJC_2M[num][3] += temp >> 4;                                  
        PJC_2M_15min[num][3] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_4H,Pj_Arx_count_4L,num + 1);           
        NJC_2M[num][4] += temp & 0x000F;                              
        NJC_2M_15min[num][4] += temp & 0x000F;
		PJC_2M[num][4] += temp >> 4;                                  
        PJC_2M_15min[num][4] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_5H,Pj_Arx_count_5L,num + 1);           
        NJC_2M[num][5] += temp & 0x000F;                              
        NJC_2M_15min[num][5] += temp & 0x000F;
		PJC_2M[num][5] += temp >> 4;                                  
        PJC_2M_15min[num][5] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_6H,Pj_Arx_count_6L,num + 1);           
        NJC_2M[num][6] += temp & 0x000F;                              
        NJC_2M_15min[num][6] += temp & 0x000F;
		PJC_2M[num][6] += temp >> 4;                                  
        PJC_2M_15min[num][6] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_7H,Pj_Arx_count_7L,num + 1);           
        NJC_2M[num][7] += temp & 0x000F;                              
        NJC_2M_15min[num][7] += temp & 0x000F;
		PJC_2M[num][7] += temp >> 4;                                  
        PJC_2M_15min[num][7] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_8H,Pj_Arx_count_8L,num + 1);           
        NJC_2M[num][8] += temp & 0x000F;                              
        NJC_2M_15min[num][8] += temp & 0x000F;
		PJC_2M[num][8] += temp >> 4;                                  
        PJC_2M_15min[num][8] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_9H,Pj_Arx_count_9L,num + 1);           
        NJC_2M[num][9] += temp & 0x000F;                              
        NJC_2M_15min[num][9] += temp & 0x000F;
		PJC_2M[num][9] += temp >> 4;                                  
        PJC_2M_15min[num][9] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_10H,Pj_Arx_count_10L,num + 1);           
        NJC_2M[num][10] += temp & 0x000F;                              
        NJC_2M_15min[num][10] += temp & 0x000F;
		PJC_2M[num][10] += temp >> 4;                                  
        PJC_2M_15min[num][10] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_11H,Pj_Arx_count_11L,num + 1);          
        NJC_2M[num][11] += temp & 0x000F;                              
        NJC_2M_15min[num][11] += temp & 0x000F;
		PJC_2M[num][11] += temp >> 4;                                  
        PJC_2M_15min[num][11] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_12H,Pj_Arx_count_12L,num + 1);          
        NJC_2M[num][12] += temp & 0x000F;                              
        NJC_2M_15min[num][12] += temp & 0x000F;
		PJC_2M[num][12] += temp >> 4;                                  
        PJC_2M_15min[num][12] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_13H,Pj_Arx_count_13L,num + 1);          
        NJC_2M[num][13] += temp & 0x000F;                              
        NJC_2M_15min[num][13] += temp & 0x000F;
		PJC_2M[num][13] += temp >> 4;                                  
        PJC_2M_15min[num][13] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_14H,Pj_Arx_count_14L,num + 1);          
        NJC_2M[num][14] += temp & 0x000F;                              
        NJC_2M_15min[num][14] += temp & 0x000F;
		PJC_2M[num][14] += temp >> 4;                                  
        PJC_2M_15min[num][14] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_15H,Pj_Arx_count_15L,num + 1);          
        NJC_2M[num][15] += temp & 0x000F;                              
        NJC_2M_15min[num][15] += temp & 0x000F;
		PJC_2M[num][15] += temp >> 4;                                  
        PJC_2M_15min[num][15] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_16H,Pj_Arx_count_16L,num + 1);          
        NJC_2M[num][16] += temp & 0x000F;                              
        NJC_2M_15min[num][16] += temp & 0x000F;
		PJC_2M[num][16] += temp >> 4;                                  
        PJC_2M_15min[num][16] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_17H,Pj_Arx_count_17L,num + 1);          
        NJC_2M[num][17] += temp & 0x000F;                              
        NJC_2M_15min[num][17] += temp & 0x000F;
		PJC_2M[num][17] += temp >> 4;                                  
        PJC_2M_15min[num][17] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_18H,Pj_Arx_count_18L,num + 1);          
        NJC_2M[num][18] += temp & 0x000F;                              
        NJC_2M_15min[num][18] += temp & 0x000F;
		PJC_2M[num][18] += temp >> 4;                                  
        PJC_2M_15min[num][18] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_19H,Pj_Arx_count_19L,num + 1);          
        NJC_2M[num][19] += temp & 0x000F;                              
        NJC_2M_15min[num][19] += temp & 0x000F;
		PJC_2M[num][19] += temp >> 4;                                  
        PJC_2M_15min[num][19] += temp >> 4;
		temp = se0111_reg_rd(Pj_Arx_count_20H,Pj_Arx_count_20L,num + 1);          
        NJC_2M[num][20] += temp & 0x000F;                              
        NJC_2M_15min[num][20] += temp & 0x000F;
		PJC_2M[num][20] += temp >> 4;                                  
        PJC_2M_15min[num][20] += temp >> 4;
		for (portnum = 0; portnum <= 20; portnum++){							//设置21个支路的循环体
			if (check_alarm_2M[num][portnum][0] & 0xD0){						//查看支路是否有缺陷告警
				default_2M[num][portnum] = 1;
			}
			else default_2M[num][portnum] = 0;
			check_alarm_2M[num][portnum][1] &= 0xBF;							//复位MS-REI告警
 		   	if (REI_2M_15min[num][portnum] > REI_2M_MAX[num][portnum]){			//判断是否过限
				check_alarm_2M[num][portnum][1] |= 0x40;						//写告警
			}
			check_alarm_2M[num][portnum][1] &= 0xEF;							//复位NJC告警
			if (NJC_2M_15min[num][portnum] > NJC_2M_MAX[num][portnum]){			//判断是否过限
				check_alarm_2M[num][portnum][1] |= 0x10;						//写告警
			}
			check_alarm_2M[num][portnum][1] &= 0xDF;							//复位PJC告警
			if (PJC_2M_15min[num][portnum] > PJC_2M_MAX[num][portnum]){
			check_alarm_2M[num][portnum][1] |= 0x20;
			}
		}
		}
	}
	if (!GetResRdyTbl(18))    						//设置每秒钟向MCP发送性能事件表
		SetResRdyTbl(18);
}

unsigned char clear_all_performance(void){                           
//P00清除MCU中的所有性能值
unsigned char xdata temp;                 

⌨️ 快捷键说明

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