123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- #include "rtwtypes.h"
- #include "BCUCal.h"
- extern uint16_T appv_V_cellU[cmnc_num_cellUNumMax]; /* 静态电压 */
- extern uint8_T appd_st_preCyc;
- extern boolean_T spmd_flg_firstRun;
- extern boolean_T socd_flg_firstRun;
- extern boolean_T sohd_flg_firstRun;
- extern boolean_T blcd_flg_firstRun;
- extern boolean_T sord_flg_firstRun;
- extern boolean_T soed_flg_firstRun;
- extern boolean_T iscd_flg_firstRun;
- extern boolean_T pimd_flg_firstRun;
- extern boolean_T sfmd_flg_firstRun;
- extern boolean_T tmsd_flg_firstRun;
- extern boolean_T cdmd_flg_firstRun;
- extern boolean_T csmd_flg_firstRun;
- extern boolean_T sopd_flg_firstRun;
- extern uint16_T blcv_Q_reqCpEi[cmnc_num_cellUNumMax]; /*均衡需求容量 读取量(数组); */
- extern uint16_T blcv_Q_reqCpEo[cmnc_num_cellUNumMax]; /*均衡需求容量 写入量(数组); */
- extern uint32_T blcv_Q_totalCpEi[cmnc_num_cellUNumMax]; /*累计均衡容量 读取量(数组); */
- extern uint32_T blcv_Q_totalCpEo[cmnc_num_cellUNumMax]; /*累计均衡容量 写入量(数组); */
- extern boolean_T blcv_flg_excute[cmnc_num_cellUNumMax]; /*均衡执行请求标志位 (数组); */
- extern boolean_T ihd_flg_HVILFlt; /* 保护板上传的高压互锁故障 */
- extern boolean_T ihd_flg_DTCClear; /* 上位机发送的故障清楚指令;*/
- extern uint8_T ihd_st_authFaild; /* 底层诊断的认证失败故障;*/
- extern int16_T ihd_I_curr; /*电池包电流; */
- extern uint8_T ihd_st_chrgConnect; /*充电器连接状态; */
- extern uint16_T ihd_P_gas; /*气体浓度 */
- extern uint16_T ihd_T_ACPlugT; /*慢充插头温度 +40 */
- extern uint16_T ihd_T_DCPlugT; /*快充插头温度+40 */
- extern uint16_T ihd_T_bdtemp; /*板子温度 */
- extern uint16_T ihd_T_heatPanT1; /*加热板温度1+40 */
- extern uint16_T ihd_T_heatPanT2; /*加热板温度2 +40 */
- extern uint16_T ihd_T_mosT; /*Mos温度+40 */
- extern boolean_T ihd_flg_EESaveFlt; /*EE存储故障 */
- extern boolean_T ihd_flg_battULowFlt; /*保护板上传的总压欠压故障; */
- extern boolean_T ihd_flg_battUOverFlt; /*保护板上传的总压过压故障; */
- extern boolean_T ihd_flg_cellULowFlt; /*保护板上传的单体欠压故障; */
- extern boolean_T ihd_flg_cellUOverFlt; /*保护板上传的单体过压故障; */
- extern boolean_T ihd_flg_chrgCurrOverFlt; /*保护板上传的充电过流故障; */
- extern boolean_T ihd_flg_chrgModTLowFlt; /*保护板上传的充电模组温度过低故障; */
- extern boolean_T ihd_flg_chrgModTOverFlt; /*保护板上传的充电模组温度过高故障; */
- extern boolean_T ihd_flg_chrgMosClosFlt; /*充电Mos失效 */
- extern boolean_T ihd_flg_chrgMosTOverFlt; /*保护板上传的充电Mos温度过高故障; */
- extern boolean_T ihd_flg_currOpenFlt; /*保护板上传的电流开路故障 */
- extern boolean_T ihd_flg_disChrgCurrOverFlt; /*保护板上传的放电过流故障; */
- extern boolean_T ihd_flg_disChrgModTLowFlt; /*保护板上传的放电模组温度过低故障; */
- extern boolean_T ihd_flg_disChrgModTOverFlt; /*保护板上传的放电模组温度过高故障; */
- extern boolean_T ihd_flg_disChrgMosClosFlt; /*放电Mos失效 */
- extern boolean_T ihd_flg_disChrgMosTOverFlt; /*保护板上传的放电Mos温度过高故障; */
- extern boolean_T ihd_flg_urtRecFlt; /*内网通讯故障 */
- extern uint16_T ihd_pct_soc; /*保护板SOC */
- extern uint16_T ihd_pct_soh; /*保护板SOH */
- extern uint8_T ihd_st_workStat; /*电池工作状态 */
- extern uint16_T ihd_tm_parkTime; /*驻车时间; */
- extern uint16_T ihv_T_modT[cmnc_num_modTNumMax]; /*模组温度(数组)+40 */
- extern uint16_T ihv_V_cellU[cmnc_num_cellUNumMax]; /*电池单体电压(数组); */
- extern boolean_T ihd_st_chrgMosControl;
- extern boolean_T ihd_st_disChrgMosControl;
- extern boolean_T ihd_st_relayControl;
- extern uint8_T ihd_st_heatForceControl;
- extern uint8_T ihd_st_EOLState;
- extern boolean_T ihd_flg_urtRecFlg;
- extern uint8_T ihd_st_reSet;
- extern int16_T sfmd_I_curr; /*处理后整包电流 */
- extern uint16_T sfmd_T_modTMax; /*处理后模组温度最小 */
- extern uint16_T sfmd_T_modTMin; /*处理后模组温度最大 */
- extern uint16_T sfmd_idx_modTMax; /*处理后模组温度最小 */
- extern uint16_T sfmd_idx_modTMin; /*处理后模组温度最大 */
- extern uint16_T sfmd_V_cellUAvrg; /*处理后单体电压平均 */
- extern uint16_T sfmd_V_cellUMax; /*处理后单体电压最大 */
- extern uint16_T sfmd_V_cellUMin; /*处理后单体电压最小 */
- extern uint16_T sfmd_idx_cellUMin;
- extern uint16_T sfmd_idx_cellUMax;
- extern boolean_T sfmd_flg_cellUInval; /*单体电压有效标志位 ; 0为有效;1为无效 */
- extern boolean_T sfmd_flg_currInval; /*电流有效标志位 ; 0为有效;1为无效 */
- extern boolean_T sfmd_flg_modTInval; /*模组温度有效标志位 ; 0为有效;1为无效 */
- extern uint16_T sfmd_num_fltNum; /*故障数量 */
- extern uint8_T sfmd_st_fltAct; /*故障禁止指令 */
- extern uint8_T sfmd_st_fltLevel; /*故障等级 */
- extern uint16_T sfmv_T_modT[cmnc_num_modTNumMax]; /*处理后模组温度 */
- extern uint16_T sfmv_V_cellU[cmnc_num_cellUNumMax]; /*处理后单体电压 */
- extern uint16_T sfmv_idx_fltCode[20]; /*诊断故障码(数组) */
- extern uint16_T sfmd_V_battU; /* 处理过后的总电压 */
- extern boolean_T sfmd_flg_mainCirClosFltEi; /*主回路常闭故障读取量 */
- extern boolean_T sfmd_flg_mainCirClosFltEo; /*主回路常闭故障写入量 */
- extern boolean_T sfmd_flg_heatCirClosFltEi; /*加热回路常闭故障读取量 */
- extern boolean_T sfmd_flg_heatCirClosFltEo; /*加热回路常闭故障写入量 */
- extern boolean_T sfmd_flg_heatCirOpenFltEi; /*加热回路常开故障读取量 */
- extern boolean_T sfmd_flg_heatCirOpenFltEo; /*加热回路常开故障写入量 */
- extern boolean_T sfmd_flg_heatRunFltEi;
- extern boolean_T sfmd_flg_heatRunFltEo;
- extern boolean_T sfmd_flg_iscFltEi;
- extern boolean_T sfmd_flg_iscFltEo;
- extern uint16_T socd_pct_vcuSoc; /*vcuSOC; */
- extern uint16_T socd_pct_ahSoc; /*安时SOC; */
- extern uint16_T socd_pct_estSoc; /*估算SOC;*/
- extern uint16_T socd_flg_EEsave; /*实时存储标志位;*/
- extern uint16_T socd_pct_ekfSoc; /*EKFSOC;*/
- extern uint16_T socd_pct_battSoc; /*电池真实SOC; */
- extern uint16_T socd_pct_battSocEi; /*电池真实SOC 读取量; */
- extern uint16_T socd_pct_battSocEo; /*电池真实SOC 写入量; */
- extern uint16_T socd_pct_bcuSoc; /*电池显示SOC; */
- extern uint16_T socd_pct_bcuSocEi; /*电池显示SOC读取量; */
- extern uint16_T socd_pct_bcuSocEo; /*电池显示SOC写入量; */
- extern uint16_T socv_pct_cellSoc[cmnc_num_cellUNumMax];
- extern uint16_T socd_pct_cellBattSoc;
- extern boolean_T socd_flg_cellSocDisable;
- extern uint16_T sohd_Q_chrgEi; /*充入容量读取量; */
- extern uint16_T sohd_Q_chrgEo; /*充入容量写入量; */
- extern boolean_T sohd_flg_chrgEndEi; /*充电结束标志位读取量; */
- extern boolean_T sohd_flg_chrgEndEo; /*充电结束标志位写入量; */
- extern uint16_T sohd_pct_bcuSoh; /*电池SOH; */
- extern uint16_T sohd_tm_chrgStartStatEi; /*充电前静置时间读取量; */
- extern uint16_T sohd_tm_chrgStartStatEo; /*充电前静置时间写入量; */
- extern uint16_T sohv_Q_cellCap[cmnc_num_cellUNumMax]; /*单体容量 */
- extern uint16_T sohv_Q_cellCapArrEi[cmnc_num_cellUNumMax]; /*单体容量(数组) 读取量 */
- extern uint16_T sohv_Q_cellCapArrEo[cmnc_num_cellUNumMax]; /*单体容量(数组) 写入量 */
- extern uint16_T sohv_Q_packCapArrEi[10]; /*10次整包容量(数组)读取量; */
- extern uint16_T sohv_Q_packCapArrEo[10]; /*10次整包容量(数组)写入量; */
- extern uint16_T sohv_V_chrgStartStatEi[cmnc_num_cellUNumMax]; /*充电开始时刻的单体电压(数组)读取量; */
- extern uint16_T sohv_V_chrgStartStatEo[cmnc_num_cellUNumMax]; /*充电开始时刻的单体电压(数组)写入量; */
- extern uint16_T soed_E_nowEng;
- extern uint16_T soed_pct_nowStat;
- extern uint16_T soed_E_fullEng;
- extern uint16_T sopd_P_chrgPMax;
- extern uint16_T sopd_P_disChrgPMax;
- extern int16_T sopd_I_chrgCurrMax;
- extern int16_T sopd_I_disChrgCurrMax;
- extern uint16_T sorv_R_cellEi[cmnc_num_cellUNumMax];
- extern uint16_T sorv_R_cellEo[cmnc_num_cellUNumMax];
- extern uint16_T sorv_R_cell[cmnc_num_cellUNumMax];
- extern boolean_T iscd_flg_flt;
- extern uint16_T iscv_Q_remainCpEi[cmnc_num_cellUNumMax];
- extern uint32_T iscd_tm_totalEi;
- extern uint16_T iscv_Q_remainCpEo[cmnc_num_cellUNumMax];
- extern uint32_T iscd_tm_totalEo;
- extern uint8_T tmsd_st_heatAct; /*热管理请求状态; */
- extern uint8_T csmd_st_chrgMod; /* 充电模式 */
- extern uint8_T csmd_st_chrgSt; /* 充电状态 */
- extern int16_T csmd_I_chrgCurrReq; /* 充电需求电流 */
- extern uint8_T csmd_idx_chrgEndReason; /* 充电结束原因 */
- extern uint16_T cand_idx_cellNr; /*循环发送的单体编号; */
- extern uint16_T cand_Q_cellCap; /*循环发送的单体容量; */
- extern uint16_T cand_V_chrgStartStat; /*循环发送的充电前单体电压; */
- extern uint16_T cand_Q_blcReqCp; /*循环发送的单体需求均衡容量; */
- extern uint16_T cand_Q_blcTotalCp; /*循环发送的单体累计均衡容量; */
- extern int16_T cdmv_V_deltOCV[cmnc_num_cellUNumMax];
- extern int16_T cdmv_R_deltOhm[cmnc_num_cellUNumMax];
- extern boolean_T cdmv_flg_inval[cmnc_num_cellUNumMax];
- extern uint16_T pimd_V_ocv;
- extern uint16_T pimd_R_ohm;
- extern uint16_T pimd_R_polar;
- extern uint16_T pimd_F_polar;
- extern uint16_T pimv_V_cellOcv[cmnc_num_cellUNumMax];
- extern uint16_T pimv_R_cellOhm[cmnc_num_cellUNumMax];
- extern uint16_T pimd_pct_battSoc;
- extern uint16_T pimv_pct_cellSoc[cmnc_num_cellUNumMax];
- extern boolean_T pimv_flg_inval[cmnc_num_cellUNumMax];
- extern uint16_T test_cellCap[cmnc_num_cellUNumMax];
- extern uint16_T test_countEn;
- extern int16_T test_deltU;
|