|
@@ -306,12 +306,14 @@ class SamplingSafty:
|
|
minOtherTempt=91
|
|
minOtherTempt=91
|
|
ErrorFlg=0
|
|
ErrorFlg=0
|
|
TotalOtherTemp=0
|
|
TotalOtherTemp=0
|
|
|
|
+ MaxOtherBatNo=0
|
|
|
|
+ MinOtherBatNo=0
|
|
if param.OtherTempNums>0:
|
|
if param.OtherTempNums>0:
|
|
for t in range(0,param.OtherTempNums):
|
|
for t in range(0,param.OtherTempNums):
|
|
BatNo=['其他温度'+str(t+1)]
|
|
BatNo=['其他温度'+str(t+1)]
|
|
maxOtherTemp=max(maxOtherTempt,float(bms_infoN[BatNo]))
|
|
maxOtherTemp=max(maxOtherTempt,float(bms_infoN[BatNo]))
|
|
if maxOtherTemp>maxOtherTempt:
|
|
if maxOtherTemp>maxOtherTempt:
|
|
- MaxBatNo=t+1
|
|
|
|
|
|
+ MaxOtherBatNo=t+1
|
|
maxOtherTempt=maxOtherTemp
|
|
maxOtherTempt=maxOtherTemp
|
|
if float(bms_infoN[BatNo])>param.OtherOTlmt:
|
|
if float(bms_infoN[BatNo])>param.OtherOTlmt:
|
|
InVMaxOtherTempBatNo.append(t+1)
|
|
InVMaxOtherTempBatNo.append(t+1)
|
|
@@ -319,7 +321,7 @@ class SamplingSafty:
|
|
pass
|
|
pass
|
|
minOtherTemp=min(minOtherTempt,float(bms_infoN[BatNo]))
|
|
minOtherTemp=min(minOtherTempt,float(bms_infoN[BatNo]))
|
|
if minOtherTemp<minOtherTempt:
|
|
if minOtherTemp<minOtherTempt:
|
|
- MinBatNo=t+1
|
|
|
|
|
|
+ MinOtherBatNo=t+1
|
|
minOtherTempt=minOtherTemp
|
|
minOtherTempt=minOtherTemp
|
|
if float(bms_infoN[BatNo])<param.OtherUTlmt:
|
|
if float(bms_infoN[BatNo])<param.OtherUTlmt:
|
|
InVMinOtherTempBatNo.append(t+1)
|
|
InVMinOtherTempBatNo.append(t+1)
|
|
@@ -335,7 +337,7 @@ class SamplingSafty:
|
|
if minOtherTemp<param.OtherUTlmt:
|
|
if minOtherTemp<param.OtherUTlmt:
|
|
QuitErrCount[54]=0
|
|
QuitErrCount[54]=0
|
|
if not 54 in df_Diag_Ram['code'].values.tolist():#如果故障发生当前故障中没有该故障,则压入该故障
|
|
if not 54 in df_Diag_Ram['code'].values.tolist():#如果故障发生当前故障中没有该故障,则压入该故障
|
|
- df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,54,3,'其他温度采样断线,最高温度为{}℃,传感器编号为{},最低温度为{}℃,传感器编号为{}'.format(maxOtherTemp,MaxBatNo,minOtherTemp,MinBatNo),'返厂维修']
|
|
|
|
|
|
+ df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,54,3,'其他温度采样断线,最高温度为{}℃,传感器编号为{},最低温度为{}℃,传感器编号为{}'.format(maxOtherTemp,MaxOtherBatNo,minOtherTemp,MinOtherBatNo),'返厂维修']
|
|
|
|
|
|
ErrorFlg=1
|
|
ErrorFlg=1
|
|
else:#如果故障发生当前故障中有该故障,则不进行操作
|
|
else:#如果故障发生当前故障中有该故障,则不进行操作
|
|
@@ -354,7 +356,7 @@ class SamplingSafty:
|
|
else:
|
|
else:
|
|
pass
|
|
pass
|
|
if not 55 in df_Diag_Ram['code'].values.tolist():
|
|
if not 55 in df_Diag_Ram['code'].values.tolist():
|
|
- df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,55,3,str(InVMaxBatNo)+'号传感器温度大于{}℃,采样无效'.format(param.OtherOTlmt),'联系用户核实电池情况,并返厂维修']
|
|
|
|
|
|
+ df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,55,3,str(InVMaxOtherTempBatNo)+'号传感器温度大于{}℃,采样无效'.format(param.OtherOTlmt),'联系用户核实电池情况,并返厂维修']
|
|
|
|
|
|
ErrorFlg=1
|
|
ErrorFlg=1
|
|
else:
|
|
else:
|
|
@@ -362,7 +364,7 @@ class SamplingSafty:
|
|
elif minOtherTemp<param.OtherUTlmt:
|
|
elif minOtherTemp<param.OtherUTlmt:
|
|
QuitErrCount[55]=0
|
|
QuitErrCount[55]=0
|
|
if not 55 in df_Diag_Ram['code'].values.tolist():
|
|
if not 55 in df_Diag_Ram['code'].values.tolist():
|
|
- df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,55,3,str(InVMinBatNo)+'号传感器温度小于{}℃,采样无效'.format(param.OtherUTlmt),'返厂维修']
|
|
|
|
|
|
+ df_Diag_Ram.loc[len(df_Diag_Ram)]=[bms_infoN['时间戳'],'0000-00-00 00:00:00',sn,55,3,str(InVMinOtherTempBatNo)+'号传感器温度小于{}℃,采样无效'.format(param.OtherUTlmt),'返厂维修']
|
|
|
|
|
|
ErrorFlg=1
|
|
ErrorFlg=1
|
|
else:
|
|
else:
|