|
@@ -1,4 +1,6 @@
|
|
|
#include "SFM.h"
|
|
|
+#define FltArrLen 200
|
|
|
+#define FltDispArrLen 20
|
|
|
|
|
|
DiagThrstruct DiagThr;
|
|
|
DiagTimestruct DiagTime;
|
|
@@ -10,72 +12,72 @@ void SFM_Init(void)
|
|
|
|
|
|
void SFM(void)
|
|
|
{
|
|
|
- boolean_T sfmd_flg_interComFlt;
|
|
|
- boolean_T sfmd_flg_authFlt;
|
|
|
- boolean_T sfmd_flg_HVILFlt;
|
|
|
- boolean_T sfmd_flg_chrgMosClosFlt;
|
|
|
- boolean_T sfmd_flg_disChrgMosClosFlt;
|
|
|
-
|
|
|
- static uint16_T Time0Cntl;
|
|
|
+ static uint8_T sfmn_num_Cnt;
|
|
|
+ boolean_T sfmn_flg_interComFlt;
|
|
|
+ boolean_T sfmn_flg_authFlt;
|
|
|
+ boolean_T sfmn_flg_HVILFlt;
|
|
|
+ boolean_T sfmn_flg_chrgMosClosFlt;
|
|
|
+ boolean_T sfmn_flg_disChrgMosClosFlt;
|
|
|
+
|
|
|
+ static uint16_T Time0Cnt;
|
|
|
static uint16_T modTMaxArr[10];
|
|
|
static uint16_T SumT0;
|
|
|
- static uint16_T Time1Cntl;
|
|
|
+ static uint16_T Time1Cnt;
|
|
|
static uint16_T heatT1Arr[10];
|
|
|
static uint16_T SumT1;
|
|
|
- static uint16_T Time2Cntl;
|
|
|
+ static uint16_T Time2Cnt;
|
|
|
static uint16_T heatT2Arr[10];
|
|
|
static uint16_T SumT2;
|
|
|
- boolean_T deltaTEn1;
|
|
|
- boolean_T deltaTEn2;
|
|
|
|
|
|
- static uint8_T Cntl;
|
|
|
- static uint16_T CellUArry[4][cmnc_num_cellUNumMax];
|
|
|
- static uint8_T ErrNr[cmnc_num_cellUNumMax];
|
|
|
- static uint8_T RecNr[cmnc_num_cellUNumMax];
|
|
|
+
|
|
|
+ static uint16_T CellUArry[4][cmnc_num_cellUNumMax];
|
|
|
+ static uint8_T ErrNr[cmnc_num_cellUNumMax];
|
|
|
+ static uint8_T RecNr[cmnc_num_cellUNumMax];
|
|
|
static boolean_T sfmv_flg_cellUOpenFlt[cmnc_num_cellUNumMax];
|
|
|
static boolean_T ErrUFlg[cmnc_num_cellUNumMax];
|
|
|
- uint32_T SumU;
|
|
|
- uint16_T UNum;
|
|
|
+ uint32_T SumU;
|
|
|
+ uint16_T UNum;
|
|
|
boolean_T sfmd_flg_volFlt;
|
|
|
boolean_T Enable1;
|
|
|
boolean_T Enable2;
|
|
|
|
|
|
static uint8_T modTOpenNr[cmnc_num_modTNumMax];
|
|
|
- static uint8_T modTRationNr[cmnc_num_modTNumMax];
|
|
|
boolean_T sfmd_flg_modTOpenFlt;
|
|
|
boolean_T sfmv_flg_modTOpenFlt[cmnc_num_modTNumMax];
|
|
|
boolean_T sfmd_flg_chrgMosTOpenFlt;
|
|
|
boolean_T sfmd_flg_DCPlugTOpenFlt;
|
|
|
boolean_T sfmd_flg_ACPlugTOpenFlt;
|
|
|
- static boolean_T sfmd_flg_heatPanT1OpenFlt;
|
|
|
- static boolean_T sfmd_flg_heatPanT2OpenFlt;
|
|
|
- boolean_T sfmd_flg_modTRationFlt;
|
|
|
- boolean_T sfmv_flg_modTRationFlt[cmnc_num_modTNumMax];
|
|
|
+ boolean_T sfmd_flg_heatPanT1OpenFlt;
|
|
|
+ boolean_T sfmd_flg_heatPanT2OpenFlt;
|
|
|
|
|
|
static uint16_T modTArr[cmnc_num_modTNumMax];
|
|
|
uint16_T Tnum;
|
|
|
uint32_T SumT;
|
|
|
- boolean_T sfmd_flg_chrgMosTRationFlt;
|
|
|
- boolean_T sfmd_flg_DCPlugTRationFlt;
|
|
|
- boolean_T sfmd_flg_ACPlugTRationFlt;
|
|
|
- static boolean_T sfmd_flg_heatPanT1RationFlt;
|
|
|
- static boolean_T sfmd_flg_heatPanT2RationFlt;
|
|
|
- boolean_T sfmd_flg_chrgMosTRationFltOnce;
|
|
|
- boolean_T sfmd_flg_DCPlugTRationFltOnce;
|
|
|
- boolean_T sfmd_flg_ACPlugTRationFltOnce;
|
|
|
- boolean_T sfmd_flg_heatPanT1RationFltOnce;
|
|
|
- boolean_T sfmd_flg_heatPanT2RationFltOnce;
|
|
|
- static uint16_T ihd_T_mosT_Delay;
|
|
|
- static uint16_T ihd_T_DCPlugT_Delay;
|
|
|
- static uint16_T ihd_T_ACPlugT_Delay;
|
|
|
- static uint16_T ihd_T_heatPanT1_Delay;
|
|
|
- static uint16_T ihd_T_heatPanT2_Delay;
|
|
|
- static uint16_T ihd_T_heatPanT1_Delay1;
|
|
|
- static uint16_T ihd_T_heatPanT2_Delay1;
|
|
|
+
|
|
|
+ static uint8_T modTRatNr[cmnc_num_modTNumMax];
|
|
|
+ boolean_T sfmd_flg_modTRatFlt;
|
|
|
+ boolean_T sfmv_flg_modTRatFlt[cmnc_num_modTNumMax];
|
|
|
+ boolean_T sfmd_flg_chrgMosTRatFlt;
|
|
|
+ boolean_T sfmd_flg_DCPlugTRatFlt;
|
|
|
+ boolean_T sfmd_flg_ACPlugTRatFlt;
|
|
|
+ boolean_T sfmd_flg_heatPanT1RatFlt;
|
|
|
+ boolean_T sfmd_flg_heatPanT2RatFlt;
|
|
|
+ boolean_T sfmn_flg_chrgMosTRatFltOnce;
|
|
|
+ boolean_T sfmn_flg_DCPlugTRatFltOnce;
|
|
|
+ boolean_T sfmn_flg_ACPlugTRatFltOnce;
|
|
|
+ boolean_T sfmn_flg_heatPanT1RatFltOnce;
|
|
|
+ boolean_T sfmn_flg_heatPanT2RatFltOnce;
|
|
|
+ static uint16_T sfmn_T_mosT_Delay;
|
|
|
+ static uint16_T sfmn_T_DCPlugT_Delay;
|
|
|
+ static uint16_T sfmn_T_ACPlugT_Delay;
|
|
|
+ static uint16_T sfmn_T_heatPanT1_Delay;
|
|
|
+ static uint16_T sfmn_T_heatPanT2_Delay;
|
|
|
+ static uint16_T sfmn_T_heatPanT1_Delay1;
|
|
|
+ static uint16_T sfmn_T_heatPanT2_Delay1;
|
|
|
boolean_T sfmd_flg_modTAllFlt;
|
|
|
boolean_T sfmd_flg_heatPanTAllFlt;
|
|
|
boolean_T sfmd_flg_currOpenFlt;
|
|
|
- uint16_T sfmd_I_currAbs;
|
|
|
+ uint16_T sfmn_I_currAbs;
|
|
|
static boolean_T sfmd_flg_cellUOverFlt2;
|
|
|
static boolean_T sfmd_flg_cellUOverFlt1;
|
|
|
static boolean_T sfmd_flg_cellULowFlt2;
|
|
@@ -86,6 +88,7 @@ void SFM(void)
|
|
|
static boolean_T sfmd_flg_battUOverFlt1;
|
|
|
static boolean_T sfmd_flg_battULowFlt2;
|
|
|
static boolean_T sfmd_flg_battULowFlt1;
|
|
|
+
|
|
|
boolean_T chrgFlg;
|
|
|
boolean_T disChrgFlg;
|
|
|
static boolean_T sfmd_flg_chrgModTOverFlt2;
|
|
@@ -111,9 +114,10 @@ void SFM(void)
|
|
|
boolean_T sfmd_flg_heatPanTOverFlt2;
|
|
|
static boolean_T sfmd_flg_heatPanTOverFlt1_1;
|
|
|
static boolean_T sfmd_flg_heatPanTOverFlt1_2;
|
|
|
- static boolean_T sfmd_flg_heatPanTOverFlt1;
|
|
|
+ boolean_T sfmd_flg_heatPanTOverFlt1;
|
|
|
static boolean_T sfmd_flg_chrgCurrOverFlt;
|
|
|
static boolean_T sfmd_flg_disChrgCurrOverFlt;
|
|
|
+
|
|
|
boolean_T sfmd_flg_chrgCurrOverMisFlt;
|
|
|
boolean_T sfmd_flg_disChrgCurrOverMisFlt;
|
|
|
boolean_T sfmd_flg_battULowMisFlt;
|
|
@@ -130,46 +134,46 @@ void SFM(void)
|
|
|
boolean_T sfmd_flg_sohMisFlt;
|
|
|
boolean_T sfmd_flg_socJumpFlt;
|
|
|
boolean_T sfmd_flg_EEsaveFlt;
|
|
|
- static uint16_T socd_pct_bcuSoc_Delay;
|
|
|
+ static uint16_T sfmn_pct_bcuSoc_Delay;
|
|
|
|
|
|
static uint16_T noDisChrgCnt;
|
|
|
static int16_T sfmd_I_curr_Delay;
|
|
|
- static boolean_T sfmd_flg_Udrop;
|
|
|
+ static boolean_T sfmn_flg_Udrop;
|
|
|
static boolean_T sfmd_flg_heatclear;
|
|
|
- static boolean_T sfmd_flg_volFlt_keep;
|
|
|
+ static boolean_T sfmn_flg_volFlt_keep;
|
|
|
static uint16_T CntA;
|
|
|
static uint16_T ModTStor[4][cmnc_num_modTNumMax];
|
|
|
- static boolean_T sfmd_flg_Tup;
|
|
|
- static boolean_T sfmd_flg_modTOpenFlt_keep;
|
|
|
+ static boolean_T sfmn_flg_Tup;
|
|
|
+ static boolean_T sfmn_flg_modTOpenFlt_keep;
|
|
|
static uint16_T CntB;
|
|
|
- static boolean_T ihd_flg_urtRecFlt_Delay = false;
|
|
|
+ static boolean_T sfmn_flg_urtRecFlt_Delay = false;
|
|
|
|
|
|
int32_T SumR;
|
|
|
int32_T SumRR;
|
|
|
boolean_T sfmd_flg_deltRFlt;
|
|
|
static uint8_T deltRFltNr[cmnc_num_cellUNumMax];
|
|
|
- boolean_T FltFlg[200];
|
|
|
- uint16_T FltLevel[200];
|
|
|
- uint8_T FltAct[200];
|
|
|
- uint16_T FltCodeArr[20];
|
|
|
- uint16_T FltLevelArr[20];
|
|
|
- uint8_T FltActArr[20];
|
|
|
+
|
|
|
+ boolean_T FltFlg[FltArrLen];
|
|
|
+ uint16_T FltLevel[FltArrLen];
|
|
|
+ uint8_T FltAct[FltArrLen];
|
|
|
+ uint16_T FltCodeArr[FltDispArrLen];
|
|
|
+ uint16_T FltLevelArr[FltDispArrLen];
|
|
|
+ uint8_T FltActArr[FltDispArrLen];
|
|
|
uint16_T i;
|
|
|
uint16_T j;
|
|
|
uint16_T k;
|
|
|
|
|
|
- if (ihd_flg_urtRecFlt_Delay)
|
|
|
+ if (sfmn_flg_urtRecFlt_Delay)
|
|
|
{
|
|
|
sfmd_flg_firstRun = true;
|
|
|
}
|
|
|
- ihd_flg_urtRecFlt_Delay = ihd_flg_urtRecFlt;
|
|
|
+ sfmn_flg_urtRecFlt_Delay = ihd_flg_urtRecFlt;
|
|
|
//初值
|
|
|
if (sfmd_flg_firstRun)
|
|
|
{
|
|
|
-
|
|
|
+ sfmn_num_Cnt = 10;
|
|
|
memset(&DiagThr, 0, sizeof(DiagThr));
|
|
|
memset(&DiagTime, 0, sizeof(DiagTime));
|
|
|
- Cntl = 10;
|
|
|
memset(heatT1Arr, 0, sizeof(heatT1Arr));
|
|
|
memset(heatT2Arr, 0, sizeof(heatT2Arr));
|
|
|
memset(ErrNr, 0, sizeof(ErrNr));
|
|
@@ -177,7 +181,7 @@ void SFM(void)
|
|
|
memset(ErrUFlg, 0, sizeof(ErrUFlg));
|
|
|
memset(RecNr, 0, sizeof(RecNr));
|
|
|
memset(modTOpenNr, 0, sizeof(modTOpenNr));
|
|
|
- memset(modTRationNr, 0, sizeof(modTRationNr));
|
|
|
+ memset(modTRatNr, 0, sizeof(modTRatNr));
|
|
|
memset(deltRFltNr, 0, sizeof(deltRFltNr));
|
|
|
sfmd_flg_cellUOverFlt2 = false;
|
|
|
sfmd_flg_cellUOverFlt1 = false;
|
|
@@ -216,22 +220,22 @@ void SFM(void)
|
|
|
|
|
|
noDisChrgCnt = 0;
|
|
|
sfmd_I_curr_Delay = ihd_I_curr;
|
|
|
- sfmd_flg_Udrop = false;
|
|
|
+ sfmn_flg_Udrop = false;
|
|
|
sfmd_flg_heatclear = false;
|
|
|
- sfmd_flg_volFlt_keep = false;
|
|
|
+ sfmn_flg_volFlt_keep = false;
|
|
|
CntA = 10;
|
|
|
- sfmd_flg_Tup = false;
|
|
|
- sfmd_flg_modTOpenFlt_keep = false;
|
|
|
+ sfmn_flg_Tup = false;
|
|
|
+ sfmn_flg_modTOpenFlt_keep = false;
|
|
|
CntB = 0;
|
|
|
|
|
|
- ihd_T_mosT_Delay = ihd_T_mosT;
|
|
|
- ihd_T_DCPlugT_Delay = ihd_T_DCPlugT;
|
|
|
- ihd_T_ACPlugT_Delay = ihd_T_ACPlugT;
|
|
|
- ihd_T_heatPanT1_Delay = ihd_T_heatPanT1;
|
|
|
- ihd_T_heatPanT2_Delay = ihd_T_heatPanT2;
|
|
|
- ihd_T_heatPanT1_Delay1 = ihd_T_heatPanT1;
|
|
|
- ihd_T_heatPanT2_Delay1 = ihd_T_heatPanT2;
|
|
|
- socd_pct_bcuSoc_Delay = socd_pct_bcuSoc;
|
|
|
+ sfmn_T_mosT_Delay = ihd_T_mosT;
|
|
|
+ sfmn_T_DCPlugT_Delay = ihd_T_DCPlugT;
|
|
|
+ sfmn_T_ACPlugT_Delay = ihd_T_ACPlugT;
|
|
|
+ sfmn_T_heatPanT1_Delay = ihd_T_heatPanT1;
|
|
|
+ sfmn_T_heatPanT2_Delay = ihd_T_heatPanT2;
|
|
|
+ sfmn_T_heatPanT1_Delay1 = ihd_T_heatPanT1;
|
|
|
+ sfmn_T_heatPanT2_Delay1 = ihd_T_heatPanT2;
|
|
|
+ sfmn_pct_bcuSoc_Delay = socd_pct_bcuSoc;
|
|
|
}
|
|
|
|
|
|
// 故障清楚指令
|
|
@@ -256,42 +260,42 @@ void SFM(void)
|
|
|
// 1 内网通信故障
|
|
|
if (ihd_flg_urtRecFlt)
|
|
|
{
|
|
|
- sfmd_flg_interComFlt = true;
|
|
|
+ sfmn_flg_interComFlt = true;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- sfmd_flg_interComFlt = false;
|
|
|
+ sfmn_flg_interComFlt = false;
|
|
|
}
|
|
|
|
|
|
// 5 认证失败故障
|
|
|
- sfmd_flg_authFlt = (ihd_st_authFaild == 1) && (!sfmd_flg_interComFlt);
|
|
|
+ sfmn_flg_authFlt = (ihd_st_authFaild == 1) && (!sfmn_flg_interComFlt);
|
|
|
|
|
|
// 11 高压互锁故障
|
|
|
if (ihd_flg_HVILFlt)
|
|
|
{
|
|
|
- sfmd_flg_HVILFlt = true;
|
|
|
+ sfmn_flg_HVILFlt = true;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- sfmd_flg_HVILFlt = false;
|
|
|
+ sfmn_flg_HVILFlt = false;
|
|
|
}
|
|
|
// 16
|
|
|
sfmd_flg_iscFltEo = iscd_flg_flt || sfmd_flg_iscFltEi || sfmd_flg_iscFltEo;
|
|
|
|
|
|
// 22 充电Mos失效故障
|
|
|
- sfmd_flg_chrgMosClosFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, ihd_flg_chrgMosClosFlt, &DiagTime.N22, 2);
|
|
|
+ sfmn_flg_chrgMosClosFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, ihd_flg_chrgMosClosFlt, &DiagTime.N22, 2);
|
|
|
|
|
|
// 24 放电Mos失效故障
|
|
|
- sfmd_flg_disChrgMosClosFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, ihd_flg_disChrgMosClosFlt, &DiagTime.N24, 2);
|
|
|
+ sfmn_flg_disChrgMosClosFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, ihd_flg_disChrgMosClosFlt, &DiagTime.N24, 2);
|
|
|
|
|
|
// 34 主回路常闭故障 //(充电MOS及放电MOS,主继电器断开 使能)
|
|
|
sfmd_flg_mainCirClosFltEo = JudgeTimeSystem(!ihd_st_chrgMosControl && !ihd_st_disChrgMosControl && !ihd_st_relayControl, sfmd_I_curr > 5 || sfmd_I_curr < -5, &DiagTime.N34, 5) || sfmd_flg_mainCirClosFltEo || sfmd_flg_mainCirClosFltEi;
|
|
|
|
|
|
// 52 电压开路故障
|
|
|
- Cntl = Cntl + 1;
|
|
|
- if (!sfmd_flg_interComFlt && Cntl >= 0)
|
|
|
+ sfmn_num_Cnt = sfmn_num_Cnt + 1;
|
|
|
+ if (!sfmn_flg_interComFlt && sfmn_num_Cnt >= 0)
|
|
|
{
|
|
|
- Cntl = 0;
|
|
|
+ sfmn_num_Cnt = 0;
|
|
|
// 矩阵更新
|
|
|
for (j = 0; j < 4 && sfmd_flg_firstRun; j++)
|
|
|
{
|
|
@@ -342,7 +346,7 @@ void SFM(void)
|
|
|
}
|
|
|
}
|
|
|
//
|
|
|
- if (!sfmd_flg_interComFlt)
|
|
|
+ if (!sfmn_flg_interComFlt)
|
|
|
{
|
|
|
sfmd_V_cellUMax = 0;
|
|
|
sfmd_V_cellUMin = 10000;
|
|
@@ -413,7 +417,7 @@ void SFM(void)
|
|
|
sfmd_flg_volFlt = false;
|
|
|
for (i = 0; i < cmnc_num_cellUNum; i++)
|
|
|
{
|
|
|
- if (ErrUFlg[i] && !sfmd_flg_interComFlt)
|
|
|
+ if (ErrUFlg[i] && !sfmn_flg_interComFlt)
|
|
|
{
|
|
|
sfmv_V_cellU[i] = sfmd_V_cellUAvrg;
|
|
|
}
|
|
@@ -431,7 +435,7 @@ void SFM(void)
|
|
|
sfmd_flg_modTOpenFlt = false;
|
|
|
for (i = 0; i < cmnc_num_modTNum; i++)
|
|
|
{
|
|
|
- if (ihv_T_modT[i] == 10 && !sfmd_flg_interComFlt) //-30℃
|
|
|
+ if (ihv_T_modT[i] == 10 && !sfmn_flg_interComFlt) //-30℃
|
|
|
{
|
|
|
modTOpenNr[i] = (modTOpenNr[i] + 1) > 200 ? 200 : (modTOpenNr[i] + 1);
|
|
|
}
|
|
@@ -452,92 +456,92 @@ void SFM(void)
|
|
|
}
|
|
|
|
|
|
// 54 Mos温度开路故障
|
|
|
- sfmd_flg_chrgMosTOpenFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, ihd_T_mosT == 10, &DiagTime.N54, 2);
|
|
|
+ sfmd_flg_chrgMosTOpenFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, ihd_T_mosT == 10, &DiagTime.N54, 2);
|
|
|
|
|
|
// 56 快充插头温度开路故障
|
|
|
- sfmd_flg_DCPlugTOpenFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, ihd_T_DCPlugT == 0, &DiagTime.N56, 2);
|
|
|
+ sfmd_flg_DCPlugTOpenFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, ihd_T_DCPlugT == 0, &DiagTime.N56, 2);
|
|
|
// 57 慢充插头温度开路故障
|
|
|
- sfmd_flg_ACPlugTOpenFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, ihd_T_ACPlugT == 0, &DiagTime.N57, 2);
|
|
|
+ sfmd_flg_ACPlugTOpenFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, ihd_T_ACPlugT == 0, &DiagTime.N57, 2);
|
|
|
// 58 加热板#1温度开路故障
|
|
|
- sfmd_flg_heatPanT1OpenFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, ihd_T_heatPanT1 == 0, &DiagTime.N58, 2);
|
|
|
+ sfmd_flg_heatPanT1OpenFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, ihd_T_heatPanT1 == 0, &DiagTime.N58, 2);
|
|
|
// 59 加热板#2温度开路故障
|
|
|
- sfmd_flg_heatPanT2OpenFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, ihd_T_heatPanT2 == 0, &DiagTime.N59, 2);
|
|
|
+ sfmd_flg_heatPanT2OpenFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, ihd_T_heatPanT2 == 0, &DiagTime.N59, 2);
|
|
|
|
|
|
// 61 模组温度合理性故障
|
|
|
- sfmd_flg_modTRationFlt = false;
|
|
|
+ sfmd_flg_modTRatFlt = false;
|
|
|
for (i = 0; i < cmnc_num_modTNum && sfmd_flg_firstRun; i++)
|
|
|
{
|
|
|
modTArr[i] = ihv_T_modT[i];
|
|
|
}
|
|
|
for (i = 0; i < cmnc_num_modTNum; i++)
|
|
|
{
|
|
|
- if (!sfmv_flg_modTOpenFlt[i] && ((int16_T)(modTArr[i] - ihv_T_modT[i]) > 10 || (int16_T)(modTArr[i] - ihv_T_modT[i]) < -20) && !sfmd_flg_interComFlt)
|
|
|
+ if (!sfmv_flg_modTOpenFlt[i] && ((int16_T)(modTArr[i] - ihv_T_modT[i]) > 10 || (int16_T)(modTArr[i] - ihv_T_modT[i]) < -20) && !sfmn_flg_interComFlt)
|
|
|
{
|
|
|
- modTRationNr[i] = (modTRationNr[i] + 1) > 200 ? 200 : (modTRationNr[i] + 1);
|
|
|
+ modTRatNr[i] = (modTRatNr[i] + 1) > 200 ? 200 : (modTRatNr[i] + 1);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- modTRationNr[i] = 0;
|
|
|
+ modTRatNr[i] = 0;
|
|
|
modTArr[i] = ihv_T_modT[i];
|
|
|
}
|
|
|
- if (modTRationNr[i] >= 2)
|
|
|
+ if (modTRatNr[i] >= 2)
|
|
|
{
|
|
|
- sfmv_flg_modTRationFlt[i] = true;
|
|
|
+ sfmv_flg_modTRatFlt[i] = true;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- sfmv_flg_modTRationFlt[i] = false;
|
|
|
+ sfmv_flg_modTRatFlt[i] = false;
|
|
|
}
|
|
|
|
|
|
- sfmd_flg_modTRationFlt = sfmd_flg_modTRationFlt || sfmv_flg_modTRationFlt[i];
|
|
|
+ sfmd_flg_modTRatFlt = sfmd_flg_modTRatFlt || sfmv_flg_modTRatFlt[i];
|
|
|
}
|
|
|
|
|
|
- // printf("%d,%d,%d,%d\n",ihd_T_mosT_Delay,ihd_T_mosT,FirstRun_SFM,ihd_flg_urtRecFlt);
|
|
|
+ // printf("%d,%d,%d,%d\n",sfmn_T_mosT_Delay,ihd_T_mosT,FirstRun_SFM,ihd_flg_urtRecFlt);
|
|
|
// 62 充电Mos 温度合理性故障
|
|
|
- sfmd_flg_chrgMosTRationFltOnce = !sfmd_flg_interComFlt && !sfmd_flg_chrgMosTOpenFlt && ((int16_T)(ihd_T_mosT - ihd_T_mosT_Delay) < -10 || (int16_T)(ihd_T_mosT - ihd_T_mosT_Delay) > 20);
|
|
|
- if (!sfmd_flg_chrgMosTRationFltOnce)
|
|
|
+ sfmn_flg_chrgMosTRatFltOnce = !sfmn_flg_interComFlt && !sfmd_flg_chrgMosTOpenFlt && ((int16_T)(ihd_T_mosT - sfmn_T_mosT_Delay) < -10 || (int16_T)(ihd_T_mosT - sfmn_T_mosT_Delay) > 20);
|
|
|
+ if (!sfmn_flg_chrgMosTRatFltOnce)
|
|
|
{
|
|
|
- ihd_T_mosT_Delay = ihd_T_mosT;
|
|
|
+ sfmn_T_mosT_Delay = ihd_T_mosT;
|
|
|
}
|
|
|
- sfmd_flg_chrgMosTRationFlt = JudgeTimeSystem(1, sfmd_flg_chrgMosTRationFltOnce, &DiagTime.N62, 2);
|
|
|
+ sfmd_flg_chrgMosTRatFlt = JudgeTimeSystem(1, sfmn_flg_chrgMosTRatFltOnce, &DiagTime.N62, 2);
|
|
|
|
|
|
// 64 快充插头温度合理性故障
|
|
|
- sfmd_flg_DCPlugTRationFltOnce = !sfmd_flg_interComFlt && !sfmd_flg_DCPlugTOpenFlt && ((int16_T)(ihd_T_DCPlugT - ihd_T_DCPlugT_Delay) < -10 || (int16_T)(ihd_T_DCPlugT - ihd_T_DCPlugT_Delay) > 20);
|
|
|
- if (!sfmd_flg_DCPlugTRationFltOnce)
|
|
|
+ sfmn_flg_DCPlugTRatFltOnce = !sfmn_flg_interComFlt && !sfmd_flg_DCPlugTOpenFlt && ((int16_T)(ihd_T_DCPlugT - sfmn_T_DCPlugT_Delay) < -10 || (int16_T)(ihd_T_DCPlugT - sfmn_T_DCPlugT_Delay) > 20);
|
|
|
+ if (!sfmn_flg_chrgMosTRatFltOnce)
|
|
|
{
|
|
|
- ihd_T_DCPlugT_Delay = ihd_T_DCPlugT;
|
|
|
+ sfmn_T_DCPlugT_Delay = ihd_T_DCPlugT;
|
|
|
}
|
|
|
- sfmd_flg_DCPlugTRationFlt = JudgeTimeSystem(1, sfmd_flg_DCPlugTRationFltOnce, &DiagTime.N64, 2);
|
|
|
+ sfmd_flg_DCPlugTRatFlt = JudgeTimeSystem(1, sfmn_flg_DCPlugTRatFltOnce, &DiagTime.N64, 2);
|
|
|
|
|
|
// 65 慢插头温度合理性故障
|
|
|
- sfmd_flg_ACPlugTRationFltOnce = !sfmd_flg_interComFlt && !sfmd_flg_ACPlugTOpenFlt && ((int16_T)(ihd_T_ACPlugT - ihd_T_ACPlugT_Delay) < -10 || (int16_T)(ihd_T_ACPlugT - ihd_T_ACPlugT_Delay) > 20);
|
|
|
- if (!sfmd_flg_ACPlugTRationFltOnce)
|
|
|
+ sfmn_flg_ACPlugTRatFltOnce = !sfmn_flg_interComFlt && !sfmd_flg_ACPlugTOpenFlt && ((int16_T)(ihd_T_ACPlugT - sfmn_T_ACPlugT_Delay) < -10 || (int16_T)(ihd_T_ACPlugT - sfmn_T_ACPlugT_Delay) > 20);
|
|
|
+ if (!sfmn_flg_ACPlugTRatFltOnce)
|
|
|
{
|
|
|
- ihd_T_ACPlugT_Delay = ihd_T_ACPlugT;
|
|
|
+ sfmn_T_ACPlugT_Delay = ihd_T_ACPlugT;
|
|
|
}
|
|
|
- sfmd_flg_ACPlugTRationFlt = JudgeTimeSystem(1, sfmd_flg_ACPlugTRationFltOnce, &DiagTime.N65, 2);
|
|
|
+ sfmd_flg_ACPlugTRatFlt = JudgeTimeSystem(1, sfmn_flg_ACPlugTRatFltOnce, &DiagTime.N65, 2);
|
|
|
|
|
|
// 66 加热板#1 温度合理性故障
|
|
|
- sfmd_flg_heatPanT1RationFltOnce = !sfmd_flg_interComFlt && !sfmd_flg_heatPanT1OpenFlt && ((int16_T)(ihd_T_heatPanT1 - ihd_T_heatPanT1_Delay) < -10 || (int16_T)(ihd_T_heatPanT1 - ihd_T_heatPanT1_Delay) > 20);
|
|
|
- if (!sfmd_flg_heatPanT1RationFltOnce)
|
|
|
+ sfmn_flg_heatPanT1RatFltOnce = !sfmn_flg_interComFlt && !sfmd_flg_heatPanT1OpenFlt && ((int16_T)(ihd_T_heatPanT1 - sfmn_T_heatPanT1_Delay) < -10 || (int16_T)(ihd_T_heatPanT1 - sfmn_T_heatPanT1_Delay) > 20);
|
|
|
+ if (!sfmn_flg_heatPanT1RatFltOnce)
|
|
|
{
|
|
|
- ihd_T_heatPanT1_Delay = ihd_T_heatPanT1;
|
|
|
+ sfmn_T_heatPanT1_Delay = ihd_T_heatPanT1;
|
|
|
}
|
|
|
- sfmd_flg_heatPanT1RationFlt = JudgeTimeSystem(1, sfmd_flg_heatPanT1RationFltOnce, &DiagTime.N66, 2);
|
|
|
+ sfmd_flg_heatPanT1RatFlt = JudgeTimeSystem(1, sfmn_flg_heatPanT1RatFltOnce, &DiagTime.N66, 2);
|
|
|
|
|
|
// 67 加热板#2 温度合理性故障
|
|
|
- sfmd_flg_heatPanT2RationFltOnce = !sfmd_flg_interComFlt && !sfmd_flg_heatPanT2OpenFlt && ((int16_T)(ihd_T_heatPanT2 - ihd_T_heatPanT2_Delay) < -10 || (int16_T)(ihd_T_heatPanT2 - ihd_T_heatPanT2_Delay) > 20);
|
|
|
- if (!sfmd_flg_heatPanT2RationFltOnce)
|
|
|
+ sfmn_flg_heatPanT2RatFltOnce = !sfmn_flg_interComFlt && !sfmd_flg_heatPanT2OpenFlt && ((int16_T)(ihd_T_heatPanT2 - sfmn_T_heatPanT2_Delay) < -10 || (int16_T)(ihd_T_heatPanT2 - sfmn_T_heatPanT2_Delay) > 20);
|
|
|
+ if (!sfmn_flg_heatPanT2RatFltOnce)
|
|
|
{
|
|
|
- ihd_T_heatPanT2_Delay = ihd_T_heatPanT2;
|
|
|
+ sfmn_T_heatPanT2_Delay = ihd_T_heatPanT2;
|
|
|
}
|
|
|
- sfmd_flg_heatPanT2RationFlt = JudgeTimeSystem(1, sfmd_flg_heatPanT2RationFltOnce, &DiagTime.N67, 2);
|
|
|
+ sfmd_flg_heatPanT2RatFlt = JudgeTimeSystem(1, sfmn_flg_heatPanT2RatFltOnce, &DiagTime.N67, 2);
|
|
|
|
|
|
// 68 模组温度全部不可用
|
|
|
sfmd_flg_modTAllFlt = true;
|
|
|
for (i = 0; i < cmnc_num_modTNum; i++)
|
|
|
{
|
|
|
- sfmd_flg_modTAllFlt = sfmd_flg_modTAllFlt && (sfmv_flg_modTOpenFlt[i] || sfmv_flg_modTRationFlt[i]);
|
|
|
+ sfmd_flg_modTAllFlt = sfmd_flg_modTAllFlt && (sfmv_flg_modTOpenFlt[i] || sfmv_flg_modTRatFlt[i]);
|
|
|
}
|
|
|
|
|
|
// 温度处理
|
|
@@ -549,7 +553,7 @@ void SFM(void)
|
|
|
{
|
|
|
for (i = 0; i < cmnc_num_modTNum; i++)
|
|
|
{
|
|
|
- if (!sfmv_flg_modTRationFlt[i] && !sfmv_flg_modTOpenFlt[i])
|
|
|
+ if (!sfmv_flg_modTRatFlt[i] && !sfmv_flg_modTOpenFlt[i])
|
|
|
{
|
|
|
SumT = SumT + ihv_T_modT[i];
|
|
|
Tnum = Tnum + 1;
|
|
@@ -567,7 +571,7 @@ void SFM(void)
|
|
|
}
|
|
|
for (i = 0; i < cmnc_num_modTNum; i++)
|
|
|
{
|
|
|
- if (!sfmv_flg_modTRationFlt[i] && !sfmv_flg_modTOpenFlt[i])
|
|
|
+ if (!sfmv_flg_modTRatFlt[i] && !sfmv_flg_modTOpenFlt[i])
|
|
|
{
|
|
|
sfmv_T_modT[i] = ihv_T_modT[i];
|
|
|
}
|
|
@@ -579,145 +583,148 @@ void SFM(void)
|
|
|
}
|
|
|
|
|
|
// 69 加热板温度全部开路故障
|
|
|
- sfmd_flg_heatPanTAllFlt = (sfmd_flg_heatPanT1OpenFlt || sfmd_flg_heatPanT1RationFlt) && (sfmd_flg_heatPanT2OpenFlt || sfmd_flg_heatPanT2RationFlt);
|
|
|
+ sfmd_flg_heatPanTAllFlt = (sfmd_flg_heatPanT1OpenFlt || sfmd_flg_heatPanT1RatFlt) && (sfmd_flg_heatPanT2OpenFlt || sfmd_flg_heatPanT2RatFlt);
|
|
|
|
|
|
// 71 电流传感器故障
|
|
|
sfmd_flg_currOpenFlt = false;
|
|
|
sfmd_I_curr = ihd_I_curr;
|
|
|
// 81 单体过压故障2级
|
|
|
- sfmd_flg_cellUOverFlt2 = DiagThrSystem1(1, !sfmd_flg_interComFlt, sfmd_V_cellUMax, sfmc_V_cellUOverThrFlt2, sfmc_V_cellUOverThrRec2, 2, 2, &DiagThr.fltNum81, &DiagThr.recNum81, &sfmd_flg_cellUOverFlt2);
|
|
|
+ sfmd_flg_cellUOverFlt2 = DiagThrSystem1(1, !sfmn_flg_interComFlt, sfmd_V_cellUMax, sfmc_V_cellUOverThrFlt2, sfmc_V_cellUOverThrRec2, 2, 2, &DiagThr.fltNum81, &DiagThr.recNum81, &sfmd_flg_cellUOverFlt2);
|
|
|
// 82 单体过压故障1级
|
|
|
- sfmd_flg_cellUOverFlt1 = DiagThrSystem1(0, !sfmd_flg_interComFlt, sfmd_V_cellUMax, sfmc_V_cellUOverThrFlt1, sfmc_V_cellUOverThrRec1, 2, 2, &DiagThr.fltNum82, &DiagThr.recNum82, &sfmd_flg_cellUOverFlt1) && !sfmd_flg_cellUOverFlt2;
|
|
|
+ sfmd_flg_cellUOverFlt1 = DiagThrSystem1(0, !sfmn_flg_interComFlt, sfmd_V_cellUMax, sfmc_V_cellUOverThrFlt1, sfmc_V_cellUOverThrRec1, 2, 2, &DiagThr.fltNum82, &DiagThr.recNum82, &sfmd_flg_cellUOverFlt1) && !sfmd_flg_cellUOverFlt2;
|
|
|
|
|
|
// 83 单体欠压故障2级
|
|
|
- sfmd_flg_cellULowFlt2 = DiagThrSystem2(1, !sfmd_flg_interComFlt, sfmd_V_cellUMin, sfmc_V_cellULowThrFlt2, sfmc_V_cellULowThrRec2, 2, 2, &DiagThr.fltNum83, &DiagThr.recNum83, &sfmd_flg_cellULowFlt2);
|
|
|
+ sfmd_flg_cellULowFlt2 = DiagThrSystem2(1, !sfmn_flg_interComFlt, sfmd_V_cellUMin, sfmc_V_cellULowThrFlt2, sfmc_V_cellULowThrRec2, 2, 2, &DiagThr.fltNum83, &DiagThr.recNum83, &sfmd_flg_cellULowFlt2);
|
|
|
// 84 单体欠压故障1级
|
|
|
- sfmd_flg_cellULowFlt1 = DiagThrSystem2(0, !sfmd_flg_interComFlt, sfmd_V_cellUMin, sfmc_V_cellULowThrFlt1, sfmc_V_cellULowThrRec1, 2, 2, &DiagThr.fltNum84, &DiagThr.recNum84, &sfmd_flg_cellULowFlt1) && !sfmd_flg_cellULowFlt2;
|
|
|
+ sfmd_flg_cellULowFlt1 = DiagThrSystem2(0, !sfmn_flg_interComFlt, sfmd_V_cellUMin, sfmc_V_cellULowThrFlt1, sfmc_V_cellULowThrRec1, 2, 2, &DiagThr.fltNum84, &DiagThr.recNum84, &sfmd_flg_cellULowFlt1) && !sfmd_flg_cellULowFlt2;
|
|
|
|
|
|
// 85 压差过大2级
|
|
|
- sfmd_flg_cellUDiffFlt2 = DiagThrSystem1(1, !sfmd_flg_interComFlt && socd_pct_battSoc > 200, sfmd_V_cellUMax - sfmd_V_cellUMin, sfmc_flg_cellUDiffThrFlt2, sfmc_flg_cellUDiffThrRec2, 2, 2, &DiagThr.fltNum85, &DiagThr.recNum85, &sfmd_flg_cellUDiffFlt2);
|
|
|
+ sfmd_flg_cellUDiffFlt2 = DiagThrSystem1(1, !sfmn_flg_interComFlt && socd_pct_battSoc > 200, sfmd_V_cellUMax - sfmd_V_cellUMin, sfmc_flg_cellUDiffThrFlt2, sfmc_flg_cellUDiffThrRec2, 2, 2, &DiagThr.fltNum85, &DiagThr.recNum85, &sfmd_flg_cellUDiffFlt2);
|
|
|
// 86 压差过大1级
|
|
|
- sfmd_flg_cellUDiffFlt1 = DiagThrSystem1(0, !sfmd_flg_interComFlt && socd_pct_battSoc > 200, sfmd_V_cellUMax - sfmd_V_cellUMin, sfmc_flg_cellUDiffThrFlt1, sfmc_flg_cellUDiffThrRec1, 2, 2, &DiagThr.fltNum86, &DiagThr.recNum86, &sfmd_flg_cellUDiffFlt1) && !sfmd_flg_cellUDiffFlt2;
|
|
|
+ sfmd_flg_cellUDiffFlt1 = DiagThrSystem1(0, !sfmn_flg_interComFlt && socd_pct_battSoc > 200, sfmd_V_cellUMax - sfmd_V_cellUMin, sfmc_flg_cellUDiffThrFlt1, sfmc_flg_cellUDiffThrRec1, 2, 2, &DiagThr.fltNum86, &DiagThr.recNum86, &sfmd_flg_cellUDiffFlt1) && !sfmd_flg_cellUDiffFlt2;
|
|
|
|
|
|
// 87 总压过压2级
|
|
|
- sfmd_flg_battUOverFlt2 = DiagThrSystem1(1, !sfmd_flg_interComFlt, sfmd_V_battU, sfmc_V_battUOverThrFlt2, sfmc_V_battUOverThrRec2, 2, 2, &DiagThr.fltNum87, &DiagThr.recNum87, &sfmd_flg_battUOverFlt2);
|
|
|
+ sfmd_flg_battUOverFlt2 = DiagThrSystem1(1, !sfmn_flg_interComFlt, sfmd_V_battU, sfmc_V_battUOverThrFlt2, sfmc_V_battUOverThrRec2, 2, 2, &DiagThr.fltNum87, &DiagThr.recNum87, &sfmd_flg_battUOverFlt2);
|
|
|
// 88 总压过压1级
|
|
|
- sfmd_flg_battUOverFlt1 = DiagThrSystem1(0, !sfmd_flg_interComFlt, sfmd_V_battU, sfmc_V_battUOverThrFlt1, sfmc_V_battUOverThrRec1, 2, 2, &DiagThr.fltNum88, &DiagThr.recNum88, &sfmd_flg_battUOverFlt1) && !sfmd_flg_battUOverFlt2;
|
|
|
+ sfmd_flg_battUOverFlt1 = DiagThrSystem1(0, !sfmn_flg_interComFlt, sfmd_V_battU, sfmc_V_battUOverThrFlt1, sfmc_V_battUOverThrRec1, 2, 2, &DiagThr.fltNum88, &DiagThr.recNum88, &sfmd_flg_battUOverFlt1) && !sfmd_flg_battUOverFlt2;
|
|
|
|
|
|
// 89 总压欠压2级
|
|
|
- sfmd_flg_battULowFlt2 = DiagThrSystem2(1, !sfmd_flg_interComFlt, sfmd_V_battU, sfmc_V_battULowThrFlt2, sfmc_V_battULowThrRec2, 2, 2, &DiagThr.fltNum89, &DiagThr.recNum89, &sfmd_flg_battULowFlt2);
|
|
|
+ sfmd_flg_battULowFlt2 = DiagThrSystem2(1, !sfmn_flg_interComFlt, sfmd_V_battU, sfmc_V_battULowThrFlt2, sfmc_V_battULowThrRec2, 2, 2, &DiagThr.fltNum89, &DiagThr.recNum89, &sfmd_flg_battULowFlt2);
|
|
|
// 90 总压欠压1级
|
|
|
- sfmd_flg_battULowFlt1 = DiagThrSystem2(0, !sfmd_flg_interComFlt, sfmd_V_battU, sfmc_V_battULowThrFlt1, sfmc_V_battULowThrRec1, 2, 2, &DiagThr.fltNum90, &DiagThr.recNum90, &sfmd_flg_battULowFlt1) && !sfmd_flg_battULowFlt2;
|
|
|
+ sfmd_flg_battULowFlt1 = DiagThrSystem2(0, !sfmn_flg_interComFlt, sfmd_V_battU, sfmc_V_battULowThrFlt1, sfmc_V_battULowThrRec1, 2, 2, &DiagThr.fltNum90, &DiagThr.recNum90, &sfmd_flg_battULowFlt1) && !sfmd_flg_battULowFlt2;
|
|
|
|
|
|
chrgFlg = ihd_st_workStat == 2;
|
|
|
disChrgFlg = ihd_st_workStat != 2;
|
|
|
|
|
|
// 97 模组充电温度过高2级故障
|
|
|
- sfmd_flg_chrgModTOverFlt2 = DiagThrSystem1(1, !sfmd_flg_interComFlt && chrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMax, sfmc_T_chrgModTOverThrFlt2, sfmc_T_chrgModTOverThrRec2, 3, 3, &DiagThr.fltNum97, &DiagThr.recNum97, &sfmd_flg_chrgModTOverFlt2);
|
|
|
+ sfmd_flg_chrgModTOverFlt2 = DiagThrSystem1(1, !sfmn_flg_interComFlt && chrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMax, sfmc_T_chrgModTOverThrFlt2, sfmc_T_chrgModTOverThrRec2, 3, 3, &DiagThr.fltNum97, &DiagThr.recNum97, &sfmd_flg_chrgModTOverFlt2);
|
|
|
// 98 模组充电温度过高1级故障
|
|
|
- sfmd_flg_chrgModTOverFlt1 = DiagThrSystem1(0, !sfmd_flg_interComFlt && chrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMax, sfmc_T_chrgModTOverThrFlt1, sfmc_T_chrgModTOverThrRec1, 3, 3, &DiagThr.fltNum98, &DiagThr.recNum98, &sfmd_flg_chrgModTOverFlt1) && !sfmd_flg_chrgModTOverFlt2;
|
|
|
+ sfmd_flg_chrgModTOverFlt1 = DiagThrSystem1(0, !sfmn_flg_interComFlt && chrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMax, sfmc_T_chrgModTOverThrFlt1, sfmc_T_chrgModTOverThrRec1, 3, 3, &DiagThr.fltNum98, &DiagThr.recNum98, &sfmd_flg_chrgModTOverFlt1) && !sfmd_flg_chrgModTOverFlt2;
|
|
|
// 99 模组充电温度过低2级故障
|
|
|
- sfmd_flg_chrgModTLowFlt2 = DiagThrSystem2(0, !sfmd_flg_interComFlt && chrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMin, sfmc_T_chrgModTLowThrFlt2, sfmc_T_chrgModTLowThrRec2, 3, 3, &DiagThr.fltNum99, &DiagThr.recNum99, &sfmd_flg_chrgModTLowFlt2);
|
|
|
+ sfmd_flg_chrgModTLowFlt2 = DiagThrSystem2(0, !sfmn_flg_interComFlt && chrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMin, sfmc_T_chrgModTLowThrFlt2, sfmc_T_chrgModTLowThrRec2, 3, 3, &DiagThr.fltNum99, &DiagThr.recNum99, &sfmd_flg_chrgModTLowFlt2);
|
|
|
// 100 模组充电温度过低1级故障
|
|
|
- sfmd_flg_chrgModTLowFlt1 = DiagThrSystem2(0, !sfmd_flg_interComFlt && chrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMin, sfmc_T_chrgModTLowThrFlt1, sfmc_T_chrgModTLowThrRec1, 3, 3, &DiagThr.fltNum100, &DiagThr.recNum100, &sfmd_flg_chrgModTLowFlt1) && !sfmd_flg_chrgModTLowFlt2;
|
|
|
+ sfmd_flg_chrgModTLowFlt1 = DiagThrSystem2(0, !sfmn_flg_interComFlt && chrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMin, sfmc_T_chrgModTLowThrFlt1, sfmc_T_chrgModTLowThrRec1, 3, 3, &DiagThr.fltNum100, &DiagThr.recNum100, &sfmd_flg_chrgModTLowFlt1) && !sfmd_flg_chrgModTLowFlt2;
|
|
|
|
|
|
// 101 模组放电温度过高2级故障
|
|
|
- sfmd_flg_disChrgModTOverFlt2 = DiagThrSystem1(1, !sfmd_flg_interComFlt && disChrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMax, sfmc_T_disChrgModTOverThrFlt2, sfmc_T_disChrgModTOverThrRec2, 3, 3, &DiagThr.fltNum101, &DiagThr.recNum101, &sfmd_flg_disChrgModTOverFlt2);
|
|
|
+ sfmd_flg_disChrgModTOverFlt2 = DiagThrSystem1(1, !sfmn_flg_interComFlt && disChrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMax, sfmc_T_disChrgModTOverThrFlt2, sfmc_T_disChrgModTOverThrRec2, 3, 3, &DiagThr.fltNum101, &DiagThr.recNum101, &sfmd_flg_disChrgModTOverFlt2);
|
|
|
// 102 模组放电温度过高1级故障
|
|
|
- sfmd_flg_disChrgModTOverFlt1 = DiagThrSystem1(0, !sfmd_flg_interComFlt && disChrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMax, sfmc_T_disChrgModTOverThrFlt1, sfmc_T_disChrgModTOverThrRec1, 3, 3, &DiagThr.fltNum102, &DiagThr.recNum102, &sfmd_flg_disChrgModTOverFlt1) && !sfmd_flg_disChrgModTOverFlt2;
|
|
|
+ sfmd_flg_disChrgModTOverFlt1 = DiagThrSystem1(0, !sfmn_flg_interComFlt && disChrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMax, sfmc_T_disChrgModTOverThrFlt1, sfmc_T_disChrgModTOverThrRec1, 3, 3, &DiagThr.fltNum102, &DiagThr.recNum102, &sfmd_flg_disChrgModTOverFlt1) && !sfmd_flg_disChrgModTOverFlt2;
|
|
|
// 103 模组放电温度过低2级故障
|
|
|
- sfmd_flg_disChrgModTLowFlt2 = DiagThrSystem2(0, !sfmd_flg_interComFlt && disChrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMin, sfmc_T_disChrgModTLowThrFlt2, sfmc_T_disChrgModTLowThrRec2, 3, 3, &DiagThr.fltNum103, &DiagThr.recNum103, &sfmd_flg_disChrgModTLowFlt2);
|
|
|
+ sfmd_flg_disChrgModTLowFlt2 = DiagThrSystem2(0, !sfmn_flg_interComFlt && disChrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMin, sfmc_T_disChrgModTLowThrFlt2, sfmc_T_disChrgModTLowThrRec2, 3, 3, &DiagThr.fltNum103, &DiagThr.recNum103, &sfmd_flg_disChrgModTLowFlt2);
|
|
|
// 104 模组放电温度过低1级故障
|
|
|
- sfmd_flg_disChrgModTLowFlt1 = DiagThrSystem2(0, !sfmd_flg_interComFlt && disChrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMin, sfmc_T_disChrgModTLowThrFlt1, sfmc_T_disChrgModTLowThrRec1, 3, 3, &DiagThr.fltNum104, &DiagThr.recNum104, &sfmd_flg_disChrgModTLowFlt1) && !sfmd_flg_disChrgModTLowFlt2;
|
|
|
+ sfmd_flg_disChrgModTLowFlt1 = DiagThrSystem2(0, !sfmn_flg_interComFlt && disChrgFlg && !sfmd_flg_modTAllFlt, sfmd_T_modTMin, sfmc_T_disChrgModTLowThrFlt1, sfmc_T_disChrgModTLowThrRec1, 3, 3, &DiagThr.fltNum104, &DiagThr.recNum104, &sfmd_flg_disChrgModTLowFlt1) && !sfmd_flg_disChrgModTLowFlt2;
|
|
|
|
|
|
//
|
|
|
// 105 模组温差2级故障
|
|
|
- sfmd_flg_modTDiffFlt2 = DiagThrSystem1(1, !sfmd_flg_interComFlt && !sfmd_flg_modTAllFlt, sfmd_T_modTMax - sfmd_T_modTMin, sfmc_T_modTDiffThrFlt2, sfmc_T_modTDiffThrRec2, 3, 3, &DiagThr.fltNum105, &DiagThr.recNum105, &sfmd_flg_modTDiffFlt2);
|
|
|
+ sfmd_flg_modTDiffFlt2 = DiagThrSystem1(1, !sfmn_flg_interComFlt && !sfmd_flg_modTAllFlt, sfmd_T_modTMax - sfmd_T_modTMin, sfmc_T_modTDiffThrFlt2, sfmc_T_modTDiffThrRec2, 3, 3, &DiagThr.fltNum105, &DiagThr.recNum105, &sfmd_flg_modTDiffFlt2);
|
|
|
// 106 模组温差1级故障
|
|
|
- sfmd_flg_modTDiffFlt1 = DiagThrSystem1(0, !sfmd_flg_interComFlt && !sfmd_flg_modTAllFlt, sfmd_T_modTMax - sfmd_T_modTMin, sfmc_T_modTDiffThrFlt1, sfmc_T_modTDiffThrRec1, 3, 3, &DiagThr.fltNum106, &DiagThr.recNum106, &sfmd_flg_modTDiffFlt1) && !sfmd_flg_modTDiffFlt2;
|
|
|
+ sfmd_flg_modTDiffFlt1 = DiagThrSystem1(0, !sfmn_flg_interComFlt && !sfmd_flg_modTAllFlt, sfmd_T_modTMax - sfmd_T_modTMin, sfmc_T_modTDiffThrFlt1, sfmc_T_modTDiffThrRec1, 3, 3, &DiagThr.fltNum106, &DiagThr.recNum106, &sfmd_flg_modTDiffFlt1) && !sfmd_flg_modTDiffFlt2;
|
|
|
|
|
|
// 107 充电Mos温度过高2级故障
|
|
|
- sfmd_flg_chrgMosTOverFlt2 = DiagThrSystem1(1, !sfmd_flg_interComFlt && chrgFlg && sfmd_flg_chrgMosTRationFlt && sfmd_flg_chrgMosTOpenFlt, ihd_T_mosT, sfmc_T_chrgMosTOverThrFlt2, sfmc_T_chrgMosTOverThrRec2, 3, 3, &DiagThr.fltNum107, &DiagThr.recNum107, &sfmd_flg_chrgMosTOverFlt2);
|
|
|
+ sfmd_flg_chrgMosTOverFlt2 = DiagThrSystem1(1, !sfmn_flg_interComFlt && chrgFlg && sfmd_flg_chrgMosTRatFlt && sfmd_flg_chrgMosTOpenFlt, ihd_T_mosT, sfmc_T_chrgMosTOverThrFlt2, sfmc_T_chrgMosTOverThrRec2, 3, 3, &DiagThr.fltNum107, &DiagThr.recNum107, &sfmd_flg_chrgMosTOverFlt2);
|
|
|
// 108 充电Mos温度过高1级故障
|
|
|
- sfmd_flg_chrgMosTOverFlt1 = DiagThrSystem1(0, !sfmd_flg_interComFlt && chrgFlg && sfmd_flg_chrgMosTRationFlt && sfmd_flg_chrgMosTOpenFlt, ihd_T_mosT, sfmc_T_chrgMosTOverThrFlt1, sfmc_T_chrgMosTOverThrRec1, 3, 3, &DiagThr.fltNum108, &DiagThr.recNum108, &sfmd_flg_chrgMosTOverFlt1) && !sfmd_flg_chrgMosTOverFlt2;
|
|
|
+ sfmd_flg_chrgMosTOverFlt1 = DiagThrSystem1(0, !sfmn_flg_interComFlt && chrgFlg && sfmd_flg_chrgMosTRatFlt && sfmd_flg_chrgMosTOpenFlt, ihd_T_mosT, sfmc_T_chrgMosTOverThrFlt1, sfmc_T_chrgMosTOverThrRec1, 3, 3, &DiagThr.fltNum108, &DiagThr.recNum108, &sfmd_flg_chrgMosTOverFlt1) && !sfmd_flg_chrgMosTOverFlt2;
|
|
|
// 109 放电Mos温度过高2级故障
|
|
|
- sfmd_flg_disChrgMosTOverFlt2 = DiagThrSystem1(1, !sfmd_flg_interComFlt && disChrgFlg && sfmd_flg_chrgMosTRationFlt && sfmd_flg_chrgMosTOpenFlt, ihd_T_mosT, sfmc_T_disChrgMosTOverThrFlt2, sfmc_T_disChrgMosTOverThrRec2, 3, 3, &DiagThr.fltNum109, &DiagThr.recNum109, &sfmd_flg_disChrgMosTOverFlt2);
|
|
|
+ sfmd_flg_disChrgMosTOverFlt2 = DiagThrSystem1(1, !sfmn_flg_interComFlt && disChrgFlg && sfmd_flg_chrgMosTRatFlt && sfmd_flg_chrgMosTOpenFlt, ihd_T_mosT, sfmc_T_disChrgMosTOverThrFlt2, sfmc_T_disChrgMosTOverThrRec2, 3, 3, &DiagThr.fltNum109, &DiagThr.recNum109, &sfmd_flg_disChrgMosTOverFlt2);
|
|
|
// 110 放电Mos温度过高1级故障
|
|
|
- sfmd_flg_disChrgMosTOverFlt1 = DiagThrSystem1(0, !sfmd_flg_interComFlt && disChrgFlg && sfmd_flg_chrgMosTRationFlt && sfmd_flg_chrgMosTOpenFlt, ihd_T_mosT, sfmc_T_disChrgMosTOverThrFlt1, sfmc_T_disChrgMosTOverThrRec1, 3, 3, &DiagThr.fltNum110, &DiagThr.recNum110, &sfmd_flg_disChrgMosTOverFlt1) && !sfmd_flg_disChrgMosTOverFlt2;
|
|
|
+ sfmd_flg_disChrgMosTOverFlt1 = DiagThrSystem1(0, !sfmn_flg_interComFlt && disChrgFlg && sfmd_flg_chrgMosTRatFlt && sfmd_flg_chrgMosTOpenFlt, ihd_T_mosT, sfmc_T_disChrgMosTOverThrFlt1, sfmc_T_disChrgMosTOverThrRec1, 3, 3, &DiagThr.fltNum110, &DiagThr.recNum110, &sfmd_flg_disChrgMosTOverFlt1) && !sfmd_flg_disChrgMosTOverFlt2;
|
|
|
|
|
|
// 111 快充插头温度过高2级故障
|
|
|
- sfmd_flg_DCPlugTOverFlt2 = DiagThrSystem1(1, !sfmd_flg_interComFlt && sfmd_flg_DCPlugTRationFlt && sfmd_flg_DCPlugTOpenFlt, ihd_T_DCPlugT, sfmc_T_DCPlugTOverThrFlt2, sfmc_T_DCPlugTOverThrRec2, 3, 3, &DiagThr.fltNum111, &DiagThr.recNum111, &sfmd_flg_DCPlugTOverFlt2);
|
|
|
+ sfmd_flg_DCPlugTOverFlt2 = DiagThrSystem1(1, !sfmn_flg_interComFlt && sfmd_flg_DCPlugTRatFlt && sfmd_flg_DCPlugTOpenFlt, ihd_T_DCPlugT, sfmc_T_DCPlugTOverThrFlt2, sfmc_T_DCPlugTOverThrRec2, 3, 3, &DiagThr.fltNum111, &DiagThr.recNum111, &sfmd_flg_DCPlugTOverFlt2);
|
|
|
// 112 快充插头温度过高1级故障
|
|
|
- sfmd_flg_DCPlugTOverFlt1 = DiagThrSystem1(0, !sfmd_flg_interComFlt && sfmd_flg_DCPlugTRationFlt && sfmd_flg_DCPlugTOpenFlt, ihd_T_DCPlugT, sfmc_T_DCPlugTOverThrFlt1, sfmc_T_DCPlugTOverThrRec1, 3, 3, &DiagThr.fltNum112, &DiagThr.recNum112, &sfmd_flg_DCPlugTOverFlt1) && !sfmd_flg_DCPlugTOverFlt2;
|
|
|
+ sfmd_flg_DCPlugTOverFlt1 = DiagThrSystem1(0, !sfmn_flg_interComFlt && sfmd_flg_DCPlugTRatFlt && sfmd_flg_DCPlugTOpenFlt, ihd_T_DCPlugT, sfmc_T_DCPlugTOverThrFlt1, sfmc_T_DCPlugTOverThrRec1, 3, 3, &DiagThr.fltNum112, &DiagThr.recNum112, &sfmd_flg_DCPlugTOverFlt1) && !sfmd_flg_DCPlugTOverFlt2;
|
|
|
// 113 慢充插头温度过高2级故障
|
|
|
- sfmd_flg_ACPlugTOverFlt2 = DiagThrSystem1(1, !sfmd_flg_interComFlt && sfmd_flg_ACPlugTRationFlt && sfmd_flg_ACPlugTOpenFlt, ihd_T_ACPlugT, sfmc_T_ACPlugTOverThrFlt2, sfmc_T_ACPlugTOverThrRec2, 3, 3, &DiagThr.fltNum113, &DiagThr.recNum113, &sfmd_flg_ACPlugTOverFlt2);
|
|
|
+ sfmd_flg_ACPlugTOverFlt2 = DiagThrSystem1(1, !sfmn_flg_interComFlt && sfmd_flg_ACPlugTRatFlt && sfmd_flg_ACPlugTOpenFlt, ihd_T_ACPlugT, sfmc_T_ACPlugTOverThrFlt2, sfmc_T_ACPlugTOverThrRec2, 3, 3, &DiagThr.fltNum113, &DiagThr.recNum113, &sfmd_flg_ACPlugTOverFlt2);
|
|
|
// 114 慢充插头温度过高1级故障
|
|
|
- sfmd_flg_ACPlugTOverFlt1 = DiagThrSystem1(0, !sfmd_flg_interComFlt && sfmd_flg_ACPlugTRationFlt && sfmd_flg_ACPlugTOpenFlt, ihd_T_ACPlugT, sfmc_T_ACPlugTOverThrFlt1, sfmc_T_ACPlugTOverThrRec1, 3, 3, &DiagThr.fltNum114, &DiagThr.recNum114, &sfmd_flg_ACPlugTOverFlt1) && !sfmd_flg_ACPlugTOverFlt2;
|
|
|
+ sfmd_flg_ACPlugTOverFlt1 = DiagThrSystem1(0, !sfmn_flg_interComFlt && sfmd_flg_ACPlugTRatFlt && sfmd_flg_ACPlugTOpenFlt, ihd_T_ACPlugT, sfmc_T_ACPlugTOverThrFlt1, sfmc_T_ACPlugTOverThrRec1, 3, 3, &DiagThr.fltNum114, &DiagThr.recNum114, &sfmd_flg_ACPlugTOverFlt1) && !sfmd_flg_ACPlugTOverFlt2;
|
|
|
|
|
|
// 115 加热板温度过高2级故障
|
|
|
- sfmd_flg_heatPanTOverFlt2_1 = DiagThrSystem1(1, !sfmd_flg_interComFlt && sfmd_flg_heatPanT1RationFlt && sfmd_flg_heatPanT1OpenFlt, ihd_T_heatPanT1, sfmc_T_heatPanTOverThrFlt2, sfmc_T_heatPanTOverThrRec2, 3, 3, &DiagThr.fltNum115_1, &DiagThr.recNum115_1, &sfmd_flg_heatPanTOverFlt2_1);
|
|
|
- sfmd_flg_heatPanTOverFlt2_2 = DiagThrSystem1(1, !sfmd_flg_interComFlt && sfmd_flg_heatPanT2RationFlt && sfmd_flg_heatPanT2OpenFlt, ihd_T_heatPanT2, sfmc_T_heatPanTOverThrFlt2, sfmc_T_heatPanTOverThrRec2, 3, 3, &DiagThr.fltNum115_2, &DiagThr.recNum115_2, &sfmd_flg_heatPanTOverFlt2_2);
|
|
|
+ sfmd_flg_heatPanTOverFlt2_1 = DiagThrSystem1(1, !sfmn_flg_interComFlt && sfmd_flg_heatPanT1RatFlt && sfmd_flg_heatPanT1OpenFlt, ihd_T_heatPanT1, sfmc_T_heatPanTOverThrFlt2, sfmc_T_heatPanTOverThrRec2, 3, 3, &DiagThr.fltNum115_1, &DiagThr.recNum115_1, &sfmd_flg_heatPanTOverFlt2_1);
|
|
|
+ sfmd_flg_heatPanTOverFlt2_2 = DiagThrSystem1(1, !sfmn_flg_interComFlt && sfmd_flg_heatPanT2RatFlt && sfmd_flg_heatPanT2OpenFlt, ihd_T_heatPanT2, sfmc_T_heatPanTOverThrFlt2, sfmc_T_heatPanTOverThrRec2, 3, 3, &DiagThr.fltNum115_2, &DiagThr.recNum115_2, &sfmd_flg_heatPanTOverFlt2_2);
|
|
|
sfmd_flg_heatPanTOverFlt2 = sfmd_flg_heatPanTOverFlt2_1 || sfmd_flg_heatPanTOverFlt2_2;
|
|
|
// 116 加热板温度过高1级故障
|
|
|
- sfmd_flg_heatPanTOverFlt1_1 = DiagThrSystem1(0, !sfmd_flg_interComFlt && sfmd_flg_heatPanT1RationFlt && sfmd_flg_heatPanT1OpenFlt, ihd_T_heatPanT1, sfmc_T_heatPanTOverThrFlt1, sfmc_T_heatPanTOverThrRec1, 3, 3, &DiagThr.fltNum116_1, &DiagThr.recNum116_1, &sfmd_flg_heatPanTOverFlt1_1) && !sfmd_flg_heatPanTOverFlt2;
|
|
|
- sfmd_flg_heatPanTOverFlt1_2 = DiagThrSystem1(0, !sfmd_flg_interComFlt && sfmd_flg_heatPanT2RationFlt && sfmd_flg_heatPanT2OpenFlt, ihd_T_heatPanT2, sfmc_T_heatPanTOverThrFlt1, sfmc_T_heatPanTOverThrRec1, 3, 3, &DiagThr.fltNum116_2, &DiagThr.recNum116_2, &sfmd_flg_heatPanTOverFlt1_2) && !sfmd_flg_heatPanTOverFlt2;
|
|
|
+ sfmd_flg_heatPanTOverFlt1_1 = DiagThrSystem1(0, !sfmn_flg_interComFlt && sfmd_flg_heatPanT1RatFlt && sfmd_flg_heatPanT1OpenFlt, ihd_T_heatPanT1, sfmc_T_heatPanTOverThrFlt1, sfmc_T_heatPanTOverThrRec1, 3, 3, &DiagThr.fltNum116_1, &DiagThr.recNum116_1, &sfmd_flg_heatPanTOverFlt1_1) && !sfmd_flg_heatPanTOverFlt2;
|
|
|
+ sfmd_flg_heatPanTOverFlt1_2 = DiagThrSystem1(0, !sfmn_flg_interComFlt && sfmd_flg_heatPanT2RatFlt && sfmd_flg_heatPanT2OpenFlt, ihd_T_heatPanT2, sfmc_T_heatPanTOverThrFlt1, sfmc_T_heatPanTOverThrRec1, 3, 3, &DiagThr.fltNum116_2, &DiagThr.recNum116_2, &sfmd_flg_heatPanTOverFlt1_2) && !sfmd_flg_heatPanTOverFlt2;
|
|
|
sfmd_flg_heatPanTOverFlt1 = sfmd_flg_heatPanTOverFlt1_1 || sfmd_flg_heatPanTOverFlt1_2;
|
|
|
|
|
|
sfmd_I_curr = ihd_I_curr;
|
|
|
- sfmd_I_currAbs = (uint16_T)(sfmd_I_curr > 0 ? sfmd_I_curr : -sfmd_I_curr);
|
|
|
+ sfmn_I_currAbs = (uint16_T)(sfmd_I_curr > 0 ? sfmd_I_curr : -sfmd_I_curr);
|
|
|
// 131 充电电流过高
|
|
|
- sfmd_flg_chrgCurrOverFlt = DiagThrSystem1(1, !sfmd_flg_interComFlt && chrgFlg && !sfmd_flg_currOpenFlt, sfmd_I_currAbs, sfmc_I_chrgCurrOverThr, sfmc_I_chrgCurrOverThr, 2, 2, &DiagThr.fltNum131, &DiagThr.recNum131, &sfmd_flg_chrgCurrOverFlt);
|
|
|
+ sfmd_flg_chrgCurrOverFlt = DiagThrSystem1(1, !sfmn_flg_interComFlt && chrgFlg && !sfmd_flg_currOpenFlt, sfmn_I_currAbs, sfmc_I_chrgCurrOverThr, sfmc_I_chrgCurrOverThr, 2, 2, &DiagThr.fltNum131, &DiagThr.recNum131, &sfmd_flg_chrgCurrOverFlt);
|
|
|
// 132 放电电流过高
|
|
|
- sfmd_flg_disChrgCurrOverFlt = DiagThrSystem1(1, !sfmd_flg_interComFlt && disChrgFlg && !sfmd_flg_currOpenFlt, sfmd_I_currAbs, sfmc_I_disChrgCurrOverThr, sfmc_I_disChrgCurrOverThr, 2, 2, &DiagThr.fltNum132, &DiagThr.recNum132, &sfmd_flg_disChrgCurrOverFlt);
|
|
|
+ sfmd_flg_disChrgCurrOverFlt = DiagThrSystem1(1, !sfmn_flg_interComFlt && disChrgFlg && !sfmd_flg_currOpenFlt, sfmn_I_currAbs, sfmc_I_disChrgCurrOverThr, sfmc_I_disChrgCurrOverThr, 2, 2, &DiagThr.fltNum132, &DiagThr.recNum132, &sfmd_flg_disChrgCurrOverFlt);
|
|
|
|
|
|
// 151 充电过流故障不匹配
|
|
|
- sfmd_flg_chrgCurrOverMisFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, sfmd_flg_chrgCurrOverFlt != ihd_flg_chrgCurrOverFlt, &DiagTime.N151, 2);
|
|
|
+ sfmd_flg_chrgCurrOverMisFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, sfmd_flg_chrgCurrOverFlt != ihd_flg_chrgCurrOverFlt, &DiagTime.N151, 2);
|
|
|
// 152 放电过流故障不匹配
|
|
|
- sfmd_flg_disChrgCurrOverMisFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, sfmd_flg_disChrgCurrOverFlt != ihd_flg_disChrgCurrOverFlt, &DiagTime.N152, 2);
|
|
|
+ sfmd_flg_disChrgCurrOverMisFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, sfmd_flg_disChrgCurrOverFlt != ihd_flg_disChrgCurrOverFlt, &DiagTime.N152, 2);
|
|
|
// 153 总压欠压不匹配
|
|
|
- sfmd_flg_battULowMisFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, sfmd_flg_battULowFlt2 != ihd_flg_battULowFlt, &DiagTime.N153, 2);
|
|
|
+ sfmd_flg_battULowMisFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, sfmd_flg_battULowFlt2 != ihd_flg_battULowFlt, &DiagTime.N153, 2);
|
|
|
// 154 总压过压不匹配
|
|
|
- sfmd_flg_battUOverMisFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, sfmd_flg_battUOverFlt2 != ihd_flg_battUOverFlt, &DiagTime.N154, 2);
|
|
|
+ sfmd_flg_battUOverMisFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, sfmd_flg_battUOverFlt2 != ihd_flg_battUOverFlt, &DiagTime.N154, 2);
|
|
|
|
|
|
// 155 单体欠压故障不匹配
|
|
|
- sfmd_flg_cellULowMisFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, sfmd_flg_cellULowFlt2 != ihd_flg_cellULowFlt, &DiagTime.N155, 2);
|
|
|
+ sfmd_flg_cellULowMisFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, sfmd_flg_cellULowFlt2 != ihd_flg_cellULowFlt, &DiagTime.N155, 2);
|
|
|
// 156 单体过压故障不匹配
|
|
|
- sfmd_flg_cellUOverMisFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, sfmd_flg_cellUOverFlt2 != ihd_flg_cellUOverFlt, &DiagTime.N156, 2);
|
|
|
+ sfmd_flg_cellUOverMisFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, sfmd_flg_cellUOverFlt2 != ihd_flg_cellUOverFlt, &DiagTime.N156, 2);
|
|
|
|
|
|
// 157 充电模组过温故障不匹配
|
|
|
- sfmd_flg_chrgModTOverMisFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, sfmd_flg_chrgModTOverFlt2 != ihd_flg_chrgModTOverFlt, &DiagTime.N157, 2);
|
|
|
+ sfmd_flg_chrgModTOverMisFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, sfmd_flg_chrgModTOverFlt2 != ihd_flg_chrgModTOverFlt, &DiagTime.N157, 2);
|
|
|
// 158 充电模组低温故障不匹配
|
|
|
- sfmd_flg_chrgModTLowMisFlt = JudgeTimeSystem(0 && !sfmd_flg_interComFlt, sfmd_flg_chrgModTLowFlt2 != ihd_flg_chrgModTLowFlt, &DiagTime.N158, 2);
|
|
|
+ sfmd_flg_chrgModTLowMisFlt = JudgeTimeSystem(0 && !sfmn_flg_interComFlt, sfmd_flg_chrgModTLowFlt2 != ihd_flg_chrgModTLowFlt, &DiagTime.N158, 2);
|
|
|
// 159 放电模组过温故障不匹配
|
|
|
- sfmd_flg_disChrgModTOverMisFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, sfmd_flg_disChrgModTOverFlt2 != ihd_flg_disChrgModTOverFlt, &DiagTime.N159, 2);
|
|
|
+ sfmd_flg_disChrgModTOverMisFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, sfmd_flg_disChrgModTOverFlt2 != ihd_flg_disChrgModTOverFlt, &DiagTime.N159, 2);
|
|
|
// 160 放电模组低温故障不匹配
|
|
|
- sfmd_flg_disChrgModTLowMisFlt = JudgeTimeSystem(0 && !sfmd_flg_interComFlt, sfmd_flg_disChrgModTLowFlt2 != ihd_flg_disChrgModTLowFlt, &DiagTime.N160, 2);
|
|
|
+ sfmd_flg_disChrgModTLowMisFlt = JudgeTimeSystem(0 && !sfmn_flg_interComFlt, sfmd_flg_disChrgModTLowFlt2 != ihd_flg_disChrgModTLowFlt, &DiagTime.N160, 2);
|
|
|
|
|
|
// 161 充电Mos过温故障不匹配
|
|
|
- sfmd_flg_chrgMosTOverMisFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, sfmd_flg_chrgMosTOverFlt2 != ihd_flg_chrgMosTOverFlt, &DiagTime.N161, 2);
|
|
|
+ sfmd_flg_chrgMosTOverMisFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, sfmd_flg_chrgMosTOverFlt2 != ihd_flg_chrgMosTOverFlt, &DiagTime.N161, 2);
|
|
|
// 162 放电Mos过温故障不匹配
|
|
|
- sfmd_flg_disChrgMosTOverMisFlt = JudgeTimeSystem(!sfmd_flg_interComFlt, sfmd_flg_disChrgMosTOverFlt2 != ihd_flg_disChrgMosTOverFlt, &DiagTime.N162, 2);
|
|
|
+ sfmd_flg_disChrgMosTOverMisFlt = JudgeTimeSystem(!sfmn_flg_interComFlt, sfmd_flg_disChrgMosTOverFlt2 != ihd_flg_disChrgMosTOverFlt, &DiagTime.N162, 2);
|
|
|
|
|
|
// 163 soc不匹配
|
|
|
- sfmd_flg_socMisFlt = 0 && !sfmd_flg_firstRun && (!sfmd_flg_interComFlt) && ((int16_T)(socd_pct_vcuSoc - ihd_pct_soc) > 100 || (int16_T)(socd_pct_vcuSoc - ihd_pct_soc) < -100);
|
|
|
+ sfmd_flg_socMisFlt = 0 && !sfmd_flg_firstRun && (!sfmn_flg_interComFlt) && ((int16_T)(socd_pct_vcuSoc - ihd_pct_soc) > 100 || (int16_T)(socd_pct_vcuSoc - ihd_pct_soc) < -100);
|
|
|
// 164 SOH 不匹配
|
|
|
- sfmd_flg_sohMisFlt = !sfmd_flg_firstRun && (!sfmd_flg_interComFlt) && ((int16_T)(sohd_pct_bcuSoh - ihd_pct_soh) > 50 || (int16_T)(sohd_pct_bcuSoh - ihd_pct_soh) < -50);
|
|
|
+ sfmd_flg_sohMisFlt = !sfmd_flg_firstRun && (!sfmn_flg_interComFlt) && ((int16_T)(sohd_pct_bcuSoh - ihd_pct_soh) > 50 || (int16_T)(sohd_pct_bcuSoh - ihd_pct_soh) < -50);
|
|
|
|
|
|
// 178
|
|
|
sfmd_flg_deltRFlt = false;
|
|
|
- if (!cdmd_flg_deltOCVDisable && !sfmd_flg_interComFlt)
|
|
|
+ if (!sfmn_flg_interComFlt)
|
|
|
{
|
|
|
SumR = 0;
|
|
|
SumRR = 0;
|
|
|
for (i = 0; i < cmnc_num_cellUNum; i++)
|
|
|
{
|
|
|
- SumR = SumR + cdmv_ohm_deltR[i];
|
|
|
- SumRR = SumRR + cdmv_ohm_deltR[i] * cdmv_ohm_deltR[i];
|
|
|
+ if(!cdmv_flg_inval[i])
|
|
|
+ {
|
|
|
+ SumR = SumR + cdmv_R_deltOhm[i];
|
|
|
+ SumRR = SumRR + cdmv_R_deltOhm[i] * cdmv_R_deltOhm[i];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
for (i = 0; i < cmnc_num_cellUNum; i++)
|
|
|
{
|
|
|
- if ((cdmv_ohm_deltR[i] - SumR / cmnc_num_cellUNum) / (sqrt(SumRR / cmnc_num_cellUNum)) > 3 && (cdmv_ohm_deltR[i] - SumR / cmnc_num_cellUNum) > 500)
|
|
|
+ if (!cdmv_flg_inval[i] && (cdmv_R_deltOhm[i] - SumR / cmnc_num_cellUNum) / (sqrt(SumRR / cmnc_num_cellUNum)) > 3 && (cdmv_R_deltOhm[i] - SumR / cmnc_num_cellUNum) > 500)
|
|
|
{
|
|
|
deltRFltNr[i] = (deltRFltNr[i] + 1) > 200 ? 200 : (deltRFltNr[i] + 1);
|
|
|
}
|
|
@@ -726,6 +733,7 @@ void SFM(void)
|
|
|
deltRFltNr[i] = 0;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
for (i = 0; i < cmnc_num_cellUNum; i++)
|
|
|
{
|
|
|
if (deltRFltNr[i] > 60)
|
|
@@ -736,8 +744,8 @@ void SFM(void)
|
|
|
}
|
|
|
|
|
|
// 179 soc跳变
|
|
|
- sfmd_flg_socJumpFlt = ((int16_T)(socd_pct_bcuSoc - socd_pct_bcuSoc_Delay) > 50 || (int16_T)(socd_pct_bcuSoc - socd_pct_bcuSoc_Delay) < -50) && JudgeTimeSystem(1, 1, &DiagTime.N179, 2);
|
|
|
- socd_pct_bcuSoc_Delay = socd_pct_bcuSoc;
|
|
|
+ sfmd_flg_socJumpFlt = ((int16_T)(socd_pct_bcuSoc - sfmn_pct_bcuSoc_Delay) > 50 || (int16_T)(socd_pct_bcuSoc - sfmn_pct_bcuSoc_Delay) < -50) && JudgeTimeSystem(1, 1, &DiagTime.N179, 2);
|
|
|
+ sfmn_pct_bcuSoc_Delay = socd_pct_bcuSoc;
|
|
|
// 180 EE失效
|
|
|
sfmd_flg_EEsaveFlt = ihd_flg_EESaveFlt;
|
|
|
|
|
@@ -758,22 +766,22 @@ void SFM(void)
|
|
|
{
|
|
|
if ((int16_T)(CellUArry[3][i] - CellUArry[0][i]) < -100)
|
|
|
{
|
|
|
- sfmd_flg_Udrop = true;
|
|
|
+ sfmn_flg_Udrop = true;
|
|
|
}
|
|
|
}
|
|
|
if (sfmd_flg_heatclear)
|
|
|
{
|
|
|
- sfmd_flg_Udrop = false;
|
|
|
+ sfmn_flg_Udrop = false;
|
|
|
}
|
|
|
}
|
|
|
////
|
|
|
if (sfmd_flg_volFlt)
|
|
|
{
|
|
|
- sfmd_flg_volFlt_keep = true;
|
|
|
+ sfmn_flg_volFlt_keep = true;
|
|
|
}
|
|
|
if (sfmd_flg_heatclear)
|
|
|
{
|
|
|
- sfmd_flg_volFlt_keep = false;
|
|
|
+ sfmn_flg_volFlt_keep = false;
|
|
|
}
|
|
|
//
|
|
|
CntA = CntA + 1;
|
|
@@ -802,30 +810,30 @@ void SFM(void)
|
|
|
{
|
|
|
if ((int16_T)(ModTStor[3][i] - ModTStor[2][i]) > 2 && (int16_T)(ModTStor[2][i] - ModTStor[1][i]) > 2 && (int16_T)(ModTStor[1][i] - ModTStor[0][i]) > 2)
|
|
|
{
|
|
|
- sfmd_flg_Tup = true;
|
|
|
+ sfmn_flg_Tup = true;
|
|
|
}
|
|
|
}
|
|
|
if (sfmd_flg_heatclear)
|
|
|
{
|
|
|
- sfmd_flg_Tup = false;
|
|
|
+ sfmn_flg_Tup = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//
|
|
|
if (sfmd_flg_modTOpenFlt)
|
|
|
{
|
|
|
- sfmd_flg_modTOpenFlt_keep = true;
|
|
|
+ sfmn_flg_modTOpenFlt_keep = true;
|
|
|
}
|
|
|
if (sfmd_flg_heatclear)
|
|
|
{
|
|
|
- sfmd_flg_modTOpenFlt_keep = false;
|
|
|
+ sfmn_flg_modTOpenFlt_keep = false;
|
|
|
}
|
|
|
//////
|
|
|
- if (sfmd_flg_Udrop || sfmd_flg_volFlt_keep || sfmd_flg_Tup || sfmd_flg_modTOpenFlt_keep)
|
|
|
+ if (sfmn_flg_Udrop || sfmn_flg_volFlt_keep || sfmn_flg_Tup || sfmn_flg_modTOpenFlt_keep)
|
|
|
{
|
|
|
CntB = (CntB + 1) > 200 ? 200 : (CntB + 1);
|
|
|
}
|
|
|
- if ((((sfmd_flg_Udrop && sfmd_flg_Tup) || (sfmd_flg_Udrop && sfmd_flg_modTOpenFlt_keep) || (sfmd_flg_volFlt_keep && sfmd_flg_Tup)) && CntB <= 180) || sfmd_flg_heatRunFltEi)
|
|
|
+ if ((((sfmn_flg_Udrop && sfmn_flg_Tup) || (sfmn_flg_Udrop && sfmn_flg_modTOpenFlt_keep) || (sfmn_flg_volFlt_keep && sfmn_flg_Tup)) && CntB <= 180) || sfmd_flg_heatRunFltEi)
|
|
|
{
|
|
|
sfmd_flg_heatRunFltEo = true;
|
|
|
}
|
|
@@ -848,24 +856,24 @@ void SFM(void)
|
|
|
{
|
|
|
modTMaxArr[i] = sfmd_T_modTMax;
|
|
|
}
|
|
|
- Time0Cntl = 0;
|
|
|
+ Time0Cnt = 0;
|
|
|
SumT0 = 0;
|
|
|
}
|
|
|
- Time0Cntl++;
|
|
|
+ Time0Cnt++;
|
|
|
SumT0 = SumT0 + sfmd_T_modTMax;
|
|
|
- if (Time0Cntl >= 60)
|
|
|
+ if (Time0Cnt >= 60)
|
|
|
{
|
|
|
for (i = 0; i < 9; i++)
|
|
|
{
|
|
|
modTMaxArr[i] = modTMaxArr[i + 1];
|
|
|
}
|
|
|
- modTMaxArr[9] = SumT0 / Time0Cntl;
|
|
|
- Time0Cntl = 0;
|
|
|
+ modTMaxArr[9] = SumT0 / Time0Cnt;
|
|
|
+ Time0Cnt = 0;
|
|
|
SumT0 = 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (!sfmd_flg_heatPanT1OpenFlt && !sfmd_flg_heatPanT1RationFlt && (int16_T)(ihd_T_heatPanT1 - ihd_T_heatPanT1_Delay1) > -10 && (int16_T)(ihd_T_heatPanT1 - ihd_T_heatPanT1_Delay1) < 20)
|
|
|
+ if (!sfmd_flg_heatPanT1OpenFlt && !sfmd_flg_heatPanT1RatFlt && (int16_T)(ihd_T_heatPanT1 - sfmn_T_heatPanT1_Delay1) > -10 && (int16_T)(ihd_T_heatPanT1 - sfmn_T_heatPanT1_Delay1) < 20)
|
|
|
{
|
|
|
if (sfmd_flg_firstRun)
|
|
|
{
|
|
@@ -873,25 +881,25 @@ void SFM(void)
|
|
|
{
|
|
|
heatT1Arr[i] = ihd_T_heatPanT1;
|
|
|
}
|
|
|
- Time1Cntl = 0;
|
|
|
+ Time1Cnt = 0;
|
|
|
SumT1 = 0;
|
|
|
}
|
|
|
- Time1Cntl++;
|
|
|
+ Time1Cnt++;
|
|
|
SumT1 = SumT1 + ihd_T_heatPanT1;
|
|
|
- if (Time1Cntl >= 60)
|
|
|
+ if (Time1Cnt >= 60)
|
|
|
{
|
|
|
for (i = 0; i < 9; i++)
|
|
|
{
|
|
|
heatT1Arr[i] = heatT1Arr[i + 1];
|
|
|
}
|
|
|
- heatT1Arr[9] = SumT1 / Time1Cntl;
|
|
|
- Time1Cntl = 0;
|
|
|
+ heatT1Arr[9] = SumT1 / Time1Cnt;
|
|
|
+ Time1Cnt = 0;
|
|
|
SumT1 = 0;
|
|
|
}
|
|
|
}
|
|
|
- ihd_T_heatPanT1_Delay1 = ihd_T_heatPanT1;
|
|
|
+ sfmn_T_heatPanT1_Delay1 = ihd_T_heatPanT1;
|
|
|
|
|
|
- if (!sfmd_flg_heatPanT2OpenFlt && !sfmd_flg_heatPanT2RationFlt && (int16_T)(ihd_T_heatPanT2 - ihd_T_heatPanT2_Delay1) > -10 && (int16_T)(ihd_T_heatPanT2 - ihd_T_heatPanT2_Delay1) < 20)
|
|
|
+ if (!sfmd_flg_heatPanT2OpenFlt && !sfmd_flg_heatPanT2RatFlt && (int16_T)(ihd_T_heatPanT2 - sfmn_T_heatPanT2_Delay1) > -10 && (int16_T)(ihd_T_heatPanT2 - sfmn_T_heatPanT2_Delay1) < 20)
|
|
|
{
|
|
|
if (sfmd_flg_firstRun)
|
|
|
{
|
|
@@ -899,27 +907,25 @@ void SFM(void)
|
|
|
{
|
|
|
heatT2Arr[i] = ihd_T_heatPanT2;
|
|
|
}
|
|
|
- Time2Cntl = 0;
|
|
|
+ Time2Cnt = 0;
|
|
|
SumT2 = 0;
|
|
|
}
|
|
|
- Time2Cntl++;
|
|
|
+ Time2Cnt++;
|
|
|
SumT2 = SumT2 + ihd_T_heatPanT2;
|
|
|
- if (Time2Cntl >= 60)
|
|
|
+ if (Time2Cnt >= 60)
|
|
|
{
|
|
|
for (i = 0; i < 9; i++)
|
|
|
{
|
|
|
heatT2Arr[i] = heatT2Arr[i + 1];
|
|
|
}
|
|
|
- heatT2Arr[9] = SumT2 / Time2Cntl;
|
|
|
- Time2Cntl = 0;
|
|
|
+ heatT2Arr[9] = SumT2 / Time2Cnt;
|
|
|
+ Time2Cnt = 0;
|
|
|
SumT2 = 0;
|
|
|
}
|
|
|
}
|
|
|
- ihd_T_heatPanT2_Delay1 = ihd_T_heatPanT2;
|
|
|
+ sfmn_T_heatPanT2_Delay1 = ihd_T_heatPanT2;
|
|
|
|
|
|
// 32 加热回路常闭故障
|
|
|
- // deltaTEn1 = !sfmd_flg_heatPanT1OpenFlt && !sfmd_flg_heatPanT1RationFlt && !sfmd_flg_ACPlugTOpenFlt &&!sfmd_flg_ACPlugTRationFlt && !sfmd_flg_DCPlugTOpenFlt &&!sfmd_flg_DCPlugTRationFlt && ((ihd_T_heatPanT1 > ihd_T_ACPlugT + 5) && (ihd_T_heatPanT1 > ihd_T_DCPlugT + 5));
|
|
|
- // deltaTEn2 = !sfmd_flg_heatPanT2OpenFlt && !sfmd_flg_heatPanT2RationFlt && !sfmd_flg_ACPlugTOpenFlt &&!sfmd_flg_ACPlugTRationFlt && !sfmd_flg_DCPlugTOpenFlt &&!sfmd_flg_DCPlugTRationFlt && ((ihd_T_heatPanT2 > ihd_T_ACPlugT + 5) && (ihd_T_heatPanT2 > ihd_T_DCPlugT + 5));
|
|
|
Enable1 = JudgeTimeSystem(1, tmsd_st_heatAct == 0, &DiagTime.N32, 600);
|
|
|
sfmd_flg_heatCirClosFltEo = (((int16_T)(heatT2Arr[9] - heatT2Arr[0]) > 5 || (int16_T)(heatT1Arr[9] - heatT1Arr[0]) > 5) && (modTMaxArr[9] > modTMaxArr[0] + 4) && Enable1) || sfmd_flg_heatCirClosFltEo || sfmd_flg_heatCirClosFltEi;
|
|
|
|
|
@@ -935,7 +941,7 @@ void SFM(void)
|
|
|
memset(FltLevel, 0, sizeof(FltLevel));
|
|
|
memset(FltAct, 0, sizeof(FltAct));
|
|
|
|
|
|
- FltFlg[0] = sfmd_flg_interComFlt;
|
|
|
+ FltFlg[0] = sfmn_flg_interComFlt;
|
|
|
FltLevel[0] = 2;
|
|
|
FltAct[0] = 2; // 1 内网通讯故障
|
|
|
|
|
@@ -951,7 +957,7 @@ void SFM(void)
|
|
|
FltLevel[3] = 0;
|
|
|
FltAct[3] = 0; // 4 通讯天线故障
|
|
|
|
|
|
- FltFlg[4] = sfmd_flg_authFlt;
|
|
|
+ FltFlg[4] = sfmn_flg_authFlt;
|
|
|
FltLevel[4] = 4;
|
|
|
FltAct[4] = 34; // 5 认证失败
|
|
|
|
|
@@ -975,7 +981,7 @@ void SFM(void)
|
|
|
FltLevel[9] = 0;
|
|
|
FltAct[9] = 0; // 10 预留#1
|
|
|
|
|
|
- FltFlg[10] = sfmd_flg_HVILFlt;
|
|
|
+ FltFlg[10] = sfmn_flg_HVILFlt;
|
|
|
FltLevel[10] = 0;
|
|
|
FltAct[10] = 0; // 11 高压互锁
|
|
|
|
|
@@ -1019,7 +1025,7 @@ void SFM(void)
|
|
|
FltLevel[20] = 5;
|
|
|
FltAct[20] = 255; // 21 热失控;
|
|
|
|
|
|
- FltFlg[21] = sfmd_flg_chrgMosClosFlt;
|
|
|
+ FltFlg[21] = sfmn_flg_chrgMosClosFlt;
|
|
|
FltLevel[21] = 4;
|
|
|
FltAct[21] = 106; // 22充电MOS常闭故障
|
|
|
|
|
@@ -1027,7 +1033,7 @@ void SFM(void)
|
|
|
FltLevel[22] = 0;
|
|
|
FltAct[22] = 0; // 23充电MOS常开故障
|
|
|
|
|
|
- FltFlg[23] = sfmd_flg_disChrgMosClosFlt;
|
|
|
+ FltFlg[23] = sfmn_flg_disChrgMosClosFlt;
|
|
|
FltLevel[23] = 4;
|
|
|
FltAct[23] = 106; // 24 放电Mos常闭故障
|
|
|
|
|
@@ -1175,11 +1181,11 @@ void SFM(void)
|
|
|
FltLevel[59] = 0;
|
|
|
FltAct[59] = 0;
|
|
|
|
|
|
- FltFlg[60] = sfmd_flg_modTRationFlt;
|
|
|
+ FltFlg[60] = sfmd_flg_modTRatFlt;
|
|
|
FltLevel[60] = 2;
|
|
|
FltAct[60] = 2; // 61模组温度合理性故障
|
|
|
|
|
|
- FltFlg[61] = sfmd_flg_chrgMosTRationFlt;
|
|
|
+ FltFlg[61] = sfmd_flg_chrgMosTRatFlt;
|
|
|
FltLevel[61] = 2;
|
|
|
FltAct[61] = 130; // 62mos温度合理性故障
|
|
|
|
|
@@ -1187,19 +1193,19 @@ void SFM(void)
|
|
|
FltLevel[62] = 0;
|
|
|
FltAct[62] = 0;
|
|
|
|
|
|
- FltFlg[63] = sfmd_flg_DCPlugTRationFlt;
|
|
|
+ FltFlg[63] = sfmd_flg_DCPlugTRatFlt;
|
|
|
FltLevel[63] = 2;
|
|
|
FltAct[63] = 2; // 64快充插头温度合理性故障
|
|
|
|
|
|
- FltFlg[64] = sfmd_flg_ACPlugTRationFlt;
|
|
|
+ FltFlg[64] = sfmd_flg_ACPlugTRatFlt;
|
|
|
FltLevel[64] = 2;
|
|
|
FltAct[64] = 2; // 65慢充插头温度合理性故障
|
|
|
|
|
|
- FltFlg[65] = sfmd_flg_heatPanT1RationFlt;
|
|
|
+ FltFlg[65] = sfmd_flg_heatPanT1RatFlt;
|
|
|
FltLevel[65] = 2;
|
|
|
FltAct[65] = 2; // 66加热板#1温度合理性故障
|
|
|
|
|
|
- FltFlg[66] = sfmd_flg_heatPanT2RationFlt;
|
|
|
+ FltFlg[66] = sfmd_flg_heatPanT2RatFlt;
|
|
|
FltLevel[66] = 2;
|
|
|
FltAct[66] = 2; // 67加热板#2温度合理性故障
|
|
|
|
|
@@ -1661,7 +1667,7 @@ void SFM(void)
|
|
|
memset(FltActArr, 0, sizeof(FltActArr));
|
|
|
sfmd_num_fltNum = 0;
|
|
|
|
|
|
- for (i = 0; i < 200 && sfmd_num_fltNum < 20; i++)
|
|
|
+ for (i = 0; i < FltArrLen && sfmd_num_fltNum < FltDispArrLen; i++)
|
|
|
{
|
|
|
if (FltFlg[i])
|
|
|
{
|
|
@@ -1712,7 +1718,7 @@ void SFM(void)
|
|
|
{
|
|
|
for (j = 0; j < cmnc_num_modTNum; j++)
|
|
|
{
|
|
|
- if (sfmv_flg_modTRationFlt[j])
|
|
|
+ if (sfmv_flg_modTRatFlt[j])
|
|
|
{
|
|
|
FltCodeArr[sfmd_num_fltNum] = 3201 + j;
|
|
|
FltLevelArr[sfmd_num_fltNum] = FltLevel[i];
|
|
@@ -1749,9 +1755,9 @@ void SFM(void)
|
|
|
///=====================================================================
|
|
|
//======================================================================
|
|
|
|
|
|
- sfmd_flg_cellUDisable = sfmd_flg_interComFlt || sfmd_flg_volFlt;
|
|
|
- sfmd_flg_currDisable = sfmd_flg_interComFlt || sfmd_flg_currOpenFlt;
|
|
|
- sfmd_flg_modTDisable = sfmd_flg_interComFlt || sfmd_flg_modTOpenFlt || sfmd_flg_modTRationFlt;
|
|
|
+ sfmd_flg_cellUInval = sfmn_flg_interComFlt || sfmd_flg_volFlt;
|
|
|
+ sfmd_flg_currInval = sfmn_flg_interComFlt || sfmd_flg_currOpenFlt;
|
|
|
+ sfmd_flg_modTInval = sfmn_flg_interComFlt || sfmd_flg_modTOpenFlt || sfmd_flg_modTRatFlt;
|
|
|
sfmd_flg_firstRun = false;
|
|
|
}
|
|
|
|