浏览代码

异常告警问题

yidongFan 1 月之前
父节点
当前提交
a79662a20a

+ 2 - 2
BoardInterface/one_chip_git_inf.h

@@ -1,5 +1,5 @@
 #ifndef _ONE_CHIP_GITINF_H 
 #define _ONE_CHIP_GITINF_H 
-#define ONE_CHIP_GIT_SHA  "0b2374af299392e54a459e8407a7b94175d59c64"
-#define ONE_CHIP_GIT_SHA_SHORT  "0b2374af29"
+#define ONE_CHIP_GIT_SHA  "da5737eae4348411f3e87fbf82bca8ab41419ad1"
+#define ONE_CHIP_GIT_SHA_SHORT  "da5737eae4"
 #endif 

+ 1 - 1
DriverInterface/communication.c

@@ -832,7 +832,7 @@ int con_heat_action(uint8_t cmd, uint8_t *parg )
             *(float *)(data+16) = sysinf.lysis_Kp;	
             *(float *)(data+20) = sysinf.lysis_Ki;	
             *(float *)(data+24) = sysinf.lysis_Kd;		
-            *(float *)(data+28) = sysinf.lysis.pid.goal;	
+            *(float *)(data+28) = sysinf.lysis.lastgaol;	
             *(float *)(data+32) = sysinf.lysis.idletemp;	
             *(float *)(data+36) = sysinf.lysis.worktime/10;	
             pMsg->data = data;

+ 9 - 2
DriverInterface/rgb381.c

@@ -240,7 +240,8 @@ uint8_t SensorInit(ColorSensor *CS)
         {
             if(CS->RDR > CS_RDR_MIN)
                 return 0;
-            HAL_Delay(100);
+            HAL_Delay(100);	
+    		Refresh_IWDG();
             SensorGetRawData(CS);
         }
         return 1;
@@ -290,7 +291,9 @@ void SensorInitial(void)
 }
 int Returntozero(ColorSensor *CS)                                     //lxx-add-2022.12.26
 {
-	//lxx-add-2023.03.27
+	
+	
+    Refresh_IWDG();
 	SensorGetRawData(CS);
 	CS->CDR = (float)CS->RDR;
 	if(CS->RDR < CARD_NO_MIN){
@@ -349,6 +352,8 @@ void Get_STD(ColorSensor *CS)
 }
 void Get_GAIN(ColorSensor *CS)        //lxx_add_2023.07.27
 {
+	
+     Refresh_IWDG();
 	SensorGetRawData(CS);
 	CS->RDC = (float)CS->RDR;
 	if(CS->RDC < CS_RDR_MIN)
@@ -396,6 +401,8 @@ void sample_calibrate_calc(uint32_t times)
 {
 	for (int i = 0; i < CS_MAX; i++)
 	{
+	
+    	Refresh_IWDG();
 		SensorGetRawData(&CS[i]); // get the original data every 1S
 		if(CS->RDR == 0){
 			// if(!(g_cfg.skip_CheckOrRun & SKIP_CHECK_CARDINSERT)){				

+ 6 - 8
DriverInterface/state_mini.h

@@ -77,17 +77,15 @@ enum ERROR_CODE
 {
     ERROR_HEAT_INSERT_CARD = 101,      //温度稳定前插卡
     ERROR_NO_QRCODE = 102,             //未扫码就插卡
-    ERROR_SAMP_MOVE_CARD = 103,        //检测中拔卡
+    ERROR_SAMP_MOVE_CARD = 103,        //检测过程中拔卡
     ERROR_SENSOR_SELF_CHECK= 104,      //光电自检失败
-    ERROR_HEAT_SELF_CHECK= 105,        //加热自检失败
+    ERROR_HEAT_SELF_CHECK= 105,        //扩增温度传感器异常
     ERROR_MCU_LINK_TIMEOUT = 106,             //mcut通讯超时
     ERROR_PRE_HEAT_TIMEOUT = 107,             //预热超时
-    ERROR_HEAT_TIMEOUT = 108,                 //加热超时
-    ERROR_MOTOR_FIALED = 109,                 //电机
-    ERROR_TUPE_MOVE = 110,                 //检测过程中拔试管
-    ERROR_TUPE_EXIST = 111,                 //检测过程中拔试管
-    ERROR_HEATFUC_EER = 112,               //加热模块无反应
-    ERROR_TEMPSENSOR_EER = 113,            //温度传感器异常
+    ERROR_HEAT_TIMEOUT = 108,                 //扩增加热模块异常
+    ERROR_MOTOR_FIALED = 109,                 //电机模块异常
+    ERROR_HEATFUC_EER = 112,               //裂解加热模块异常
+    ERROR_TEMPSENSOR_EER = 113,            //裂解温度传感器异常
 };
 
 typedef struct inner_action_flags_t

+ 2 - 2
DriverInterface/user_heater.c

@@ -91,7 +91,7 @@ void heater_work(heat_ctrl_def *heater)
             }else{
                 PIDRealize(&heater->pid);
                 com_pwm_Set(heater->pwdId,heater->pid.variate);                
-                if(heater->timenum>=60*10)//system led turn red while the temperature could not heat up to PresetTemp over 10min
+                if(heater->timenum>=60*100)//system led turn red while the temperature could not heat up to PresetTemp over 10min
                 {
                     if((heater->pid.realtemp<heater->HoldTemp))
                     {
@@ -134,7 +134,7 @@ void heater_work(heat_ctrl_def *heater)
                 heater->pid.integral = 0;
                 heater->pid.goal = heater->PresetTempVal;
             }
-            if(heater->timenum>=60*10)//system led turn red while the temperature could not heat up to PresetTemp over 10min
+            if(heater->timenum>=60*100)//system led turn red while the temperature could not heat up to PresetTemp over 10min
             {
                 if((heater->pid.realtemp<heater->PresetTempVal))
                 {

+ 6 - 3
DriverInterface/usr_lysis.c

@@ -26,6 +26,7 @@
 #define EER_NOEXIST_TIME_GAP  500 
 #define HEAT_ARRIVE_EDGE 0.5 
 #define GOTO_IDLE_GAP  3000 
+#define HEATCHECK_OUT  85 
 
 
 
@@ -88,6 +89,7 @@ uint32_t Therm_Check(void) {
  */
 void set_lysis(float goal) {
    sysinf.lysis.pid.goal = goal;
+   sysinf.lysis.lastgaol = goal;
    if(goal > (sysinf.lysis.overHeat + sysinf.lysis.pid.realtemp )){
 		sysinf.lysis.pid_st = PID_OVERHEAT;
 		sysinf.lysis.pid.goal += sysinf.lysis.overHeat;
@@ -195,11 +197,12 @@ uint32_t lysis_work(void) {
 			firstTemp = getADC_Chanel_value(1);
 			set_lysis(95);				
    			ptherm->pid.goal = 95;	
-    		ptherm->worktime = 3000;
+    		ptherm->worktime = 3000;	
+    		ptherm->lastgaol = 95;
 			last10ms = sysinf.conter10ms;			
 		}else{
 			float heattemp = getADC_Chanel_value(1); 
-			if((heattemp - firstTemp) > HEAT_WORK_THD){
+			if((heattemp - firstTemp) > HEAT_WORK_THD || heattemp >HEATCHECK_OUT){
 					ptherm->thermostat_st = THERMOSTAT_WARM;
 					ptherm->firstin = true;
 					ptherm->pid_st = PID_IDLE;
@@ -275,7 +278,7 @@ uint32_t lysis_work(void) {
 				ptherm->firstin = true;	
 			}
 			if(((ptherm->pid.realtemp - firstTemp) < HEAT_WORK_THD)&&
-				((sysinf.conter10ms-last10ms)> HEAT_TEST_TIME)&&((ptherm->pid.goal - firstTemp)>10)){
+				((sysinf.conter10ms-last10ms)> HEAT_TEST_TIME)&&(firstTemp<HEATCHECK_OUT)){
 					/*目标温差大于10,加热启动30s之内没升温2.5° 超时判断*/
 					ptherm->thermostat_st = THERMOSTAT_ERROR;
 					updateLysisState(SYS_STATE_ERROR_HW);

+ 2 - 1
DriverInterface/usr_lysis.h

@@ -76,7 +76,8 @@ typedef struct
     float overCool;       
     float overCoolTime;       
     float idletemp;  	      
-    float worktime;  		     
+    float worktime;  	      
+    float lastgaol;  		     
     pid_def  pid;	
 	unsigned int pwdId;
     float cabinTem;    

文件差异内容过多而无法显示
+ 4 - 4
MDK-ARM/mini7_V2.uvguix.Administrator


+ 36 - 4
MDK-ARM/mini7_V2.uvoptx

@@ -75,7 +75,7 @@
       <OPTFL>
         <tvExp>1</tvExp>
         <tvExpOptDlg>0</tvExpOptDlg>
-        <IsCurrentTarget>0</IsCurrentTarget>
+        <IsCurrentTarget>1</IsCurrentTarget>
       </OPTFL>
       <CpuCode>18</CpuCode>
       <DebugOpt>
@@ -365,7 +365,7 @@
       <OPTFL>
         <tvExp>1</tvExp>
         <tvExpOptDlg>0</tvExpOptDlg>
-        <IsCurrentTarget>1</IsCurrentTarget>
+        <IsCurrentTarget>0</IsCurrentTarget>
       </OPTFL>
       <CpuCode>18</CpuCode>
       <DebugOpt>
@@ -444,7 +444,7 @@
           <Type>0</Type>
           <LineNumber>547</LineNumber>
           <EnabledFlag>1</EnabledFlag>
-          <Address>134255506</Address>
+          <Address>134321174</Address>
           <ByteObject>0</ByteObject>
           <HtxType>0</HtxType>
           <ManyObjects>0</ManyObjects>
@@ -460,7 +460,7 @@
           <Type>0</Type>
           <LineNumber>167</LineNumber>
           <EnabledFlag>1</EnabledFlag>
-          <Address>134275960</Address>
+          <Address>134341504</Address>
           <ByteObject>0</ByteObject>
           <HtxType>0</HtxType>
           <ManyObjects>0</ManyObjects>
@@ -471,6 +471,38 @@
           <ExecCommand></ExecCommand>
           <Expression>\\mini7_V2\../DriverInterface/van_BSP_Scanner.c\167</Expression>
         </Bp>
+        <Bp>
+          <Number>2</Number>
+          <Type>0</Type>
+          <LineNumber>151</LineNumber>
+          <EnabledFlag>1</EnabledFlag>
+          <Address>0</Address>
+          <ByteObject>0</ByteObject>
+          <HtxType>0</HtxType>
+          <ManyObjects>0</ManyObjects>
+          <SizeOfObject>0</SizeOfObject>
+          <BreakByAccess>0</BreakByAccess>
+          <BreakIfRCount>0</BreakIfRCount>
+          <Filename>../Core/Src/main.c</Filename>
+          <ExecCommand></ExecCommand>
+          <Expression></Expression>
+        </Bp>
+        <Bp>
+          <Number>3</Number>
+          <Type>0</Type>
+          <LineNumber>233</LineNumber>
+          <EnabledFlag>1</EnabledFlag>
+          <Address>0</Address>
+          <ByteObject>0</ByteObject>
+          <HtxType>0</HtxType>
+          <ManyObjects>0</ManyObjects>
+          <SizeOfObject>0</SizeOfObject>
+          <BreakByAccess>0</BreakByAccess>
+          <BreakIfRCount>0</BreakIfRCount>
+          <Filename>..\DriverInterface\ESP32_WROOM_32D.c</Filename>
+          <ExecCommand></ExecCommand>
+          <Expression></Expression>
+        </Bp>
       </Breakpoint>
       <WatchWindow1>
         <Ww>

+ 5 - 5
MDK-ARM/startup_stm32f103xe.lst

@@ -544,11 +544,11 @@ ARM Macro Assembler    Page 9
               00000000 
 Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw
 ork --depend=mini7_v2\startup_stm32f103xe.d -omini7_v2\startup_stm32f103xe.o -I
-.\RTE\_mini7_V2_debug -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.4.0\CMSIS\Core\Include 
--IC:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.4.1\Device\Include --predefine="__MI
-CROLIB SETA 1" --predefine="__UVISION_VERSION SETA 526" --predefine="_RTE_ SETA
- 1" --predefine="STM32F10X_HD SETA 1" --list=startup_stm32f103xe.lst startup_st
-m32f103xe.s
+.\RTE\_mini7_V2 -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.4.0\CMSIS\Core\Include -IC:\K
+eil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.4.1\Device\Include --predefine="__MICROLIB
+ SETA 1" --predefine="__UVISION_VERSION SETA 526" --predefine="_RTE_ SETA 1" --
+predefine="STM32F10X_HD SETA 1" --list=startup_stm32f103xe.lst startup_stm32f10
+3xe.s
 
 
 

部分文件因为文件数量过多而无法显示