Browse Source

电压采样断线和无效不再监控,由宋鹏飞开发模块执行

Eric412V 2 năm trước cách đây
mục cha
commit
6f4fa5cf55
1 tập tin đã thay đổi với 43 bổ sung43 xóa
  1. 43 43
      LIB/MIDDLE/SaftyCenter/DataDiag_Static/SC_SamplingSafty.py

+ 43 - 43
LIB/MIDDLE/SaftyCenter/DataDiag_Static/SC_SamplingSafty.py

@@ -65,49 +65,49 @@ class SamplingSafty:
             AvgVol=CellVoltage.mean()
         #—————————————————————————————电压无效和断线判断———————————————————————
         if len(InVMaxBatNo):
-            if len(InVMinBatNo):
-                QuitErrCount[10]=0
-                if not 'C310' in df_Diag_Ram['code'].values.tolist():#如果故障发生当前故障中没有该故障,则压入该故障
-                    df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,'C310',3,'电池电压采样断线,最高电压为{:.2f}V,电池编号为{},最低电压为{:.2f}V,电池编号为{}'.format(MaxVolt,InVMaxBatNo.values,MinVolt,InVMinBatNo.values),'返厂维修']
-                    ErrorFlg=1  
-                else:#如果故障发生当前故障中有该故障,则不进行操作
-                    pass                 
-            else:#如果没有故障,并且当前故障表中有该故障,则判断故障是否结束
-                QuitErrCount[50]=0
-                if 'C310' in df_Diag_Ram['code'].values.tolist():
-                    QuitErrCount[10]=QuitErrCount[10]+1
-                    if QuitErrCount[10]>3:
-                        QuitErrCount[10]=4
-                        end_time=datetime.datetime.now()
-                        end_time=end_time.strftime('%Y-%m-%d %H:%M:%S')
-                        df_Diag_Ram.loc[df_Diag_Ram[df_Diag_Ram['code']=='C310'].index,['end_time']]=end_time
-                    else:
-                        pass
-                else:
-                    pass
-                if not 'C350' in df_Diag_Ram['code'].values.tolist():
-                    df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,'C350',3,str(InVMaxBatNo.values)+'号电压大于{:.2f}V,采样无效'.format(param.CellOVlmt),'返厂维修']
-                    ErrorFlg=1
-                else:
-                    pass
-        elif len(InVMinBatNo):
-            QuitErrCount[50]=0
-            if not 'C350' in df_Diag_Ram['code'].values.tolist():
-                df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,'C350',3,str(InVMinBatNo.values)+'号电压小于{:.2f}V,采样无效'.format(param.CellUVlmt),'返厂维修']
-                ErrorFlg=1
-            else:
-                pass
-        else:
-            if 'C350' in df_Diag_Ram['code'].values.tolist():
-                QuitErrCount[50]=QuitErrCount[50]+1
-                if QuitErrCount[50]>3:
-                    QuitErrCount[50]=4
-                    end_time=datetime.datetime.now()
-                    end_time=end_time.strftime('%Y-%m-%d %H:%M:%S')
-                    df_Diag_Ram.loc[df_Diag_Ram[df_Diag_Ram['code']==50].index,['end_time']]=end_time                   
-                else:
-                    pass
-            else:
+        #     if len(InVMinBatNo):
+        #         QuitErrCount[10]=0
+        #         if not 'C310' in df_Diag_Ram['code'].values.tolist():#如果故障发生当前故障中没有该故障,则压入该故障
+        #             df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,'C310',3,'电池电压采样断线,最高电压为{:.2f}V,电池编号为{},最低电压为{:.2f}V,电池编号为{}'.format(MaxVolt,InVMaxBatNo.values,MinVolt,InVMinBatNo.values),'返厂维修']
+        #             ErrorFlg=1  
+        #         else:#如果故障发生当前故障中有该故障,则不进行操作
+        #             pass                 
+        #     else:#如果没有故障,并且当前故障表中有该故障,则判断故障是否结束
+        #         QuitErrCount[50]=0
+        #         if 'C310' in df_Diag_Ram['code'].values.tolist():
+        #             QuitErrCount[10]=QuitErrCount[10]+1
+        #             if QuitErrCount[10]>3:
+        #                 QuitErrCount[10]=4
+        #                 end_time=datetime.datetime.now()
+        #                 end_time=end_time.strftime('%Y-%m-%d %H:%M:%S')
+        #                 df_Diag_Ram.loc[df_Diag_Ram[df_Diag_Ram['code']=='C310'].index,['end_time']]=end_time
+        #             else:
+        #                 pass
+        #         else:
+        #             pass
+        #         if not 'C350' in df_Diag_Ram['code'].values.tolist():
+        #             df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,'C350',3,str(InVMaxBatNo.values)+'号电压大于{:.2f}V,采样无效'.format(param.CellOVlmt),'返厂维修']
+        #             ErrorFlg=1
+        #         else:
+        #             pass
+        # elif len(InVMinBatNo):
+        #     QuitErrCount[50]=0
+        #     if not 'C350' in df_Diag_Ram['code'].values.tolist():
+        #         df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,'C350',3,str(InVMinBatNo.values)+'号电压小于{:.2f}V,采样无效'.format(param.CellUVlmt),'返厂维修']
+        #         ErrorFlg=1
+        #     else:
+        #         pass
+        # else:
+        #     if 'C350' in df_Diag_Ram['code'].values.tolist():
+        #         QuitErrCount[50]=QuitErrCount[50]+1
+        #         if QuitErrCount[50]>3:
+        #             QuitErrCount[50]=4
+        #             end_time=datetime.datetime.now()
+        #             end_time=end_time.strftime('%Y-%m-%d %H:%M:%S')
+        #             df_Diag_Ram.loc[df_Diag_Ram[df_Diag_Ram['code']==50].index,['end_time']]=end_time                   
+        #         else:
+        #             pass
+        #     else:
                 pass                                      
        #——————————————————————————————————电压卡滞和离群判断—————————————————————————
         if ErrorFlg==0: