Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
DC360_1drap3_xiaoju_V1
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
丁雨邯
DC360_1drap3_xiaoju_V1
Commits
539128bd
提交
539128bd
authored
6月 23, 2020
作者:
wysheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
无有效电流检测;通过小桔测试
上级
72114aef
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
530 行增加
和
133 行删除
+530
-133
Drv_TCUComm.c
DcPillar/Src/Drivers/Drv_TCUComm.c
+83
-38
Drv_TCUComm.h
DcPillar/Src/Drivers/Drv_TCUComm.h
+19
-16
Global.h
DcPillar/Src/Global.h
+2
-0
ChgPro_B_ChgRun_SmartAllocation.c
...lar/Src/SmartAllocation/ChgPro_B_ChgRun_SmartAllocation.c
+27
-0
ChgPro_ChgRun_SmartAllocation.c
DcPillar/Src/SmartAllocation/ChgPro_ChgRun_SmartAllocation.c
+25
-0
Drv_DcModule_SmartAllocation.c
DcPillar/Src/SmartAllocation/Drv_DcModule_SmartAllocation.c
+1
-1
Drv_SmartAllocation.c
DcPillar/Src/SmartAllocation/Drv_SmartAllocation.c
+3
-73
ChgPro_ChgIdle.c
DcPillar/Src/Thread/Charge/ChgPro_ChgIdle.c
+15
-2
ChgPro_WaitPillarReady.c
DcPillar/Src/Thread/Charge/ChgPro_WaitPillarReady.c
+1
-1
ChgPro_B_ChgIdle.c
DcPillar/Src/Thread/Charge_B/ChgPro_B_ChgIdle.c
+17
-1
ChgPro_B_WaitPillarReady.c
DcPillar/Src/Thread/Charge_B/ChgPro_B_WaitPillarReady.c
+1
-1
Thd_Mult.c
DcPillar/Src/Thread/Thd_Mult.c
+336
-0
没有找到文件。
DcPillar/Src/Drivers/Drv_TCUComm.c
浏览文件 @
539128bd
...
@@ -724,7 +724,6 @@ void StartMeg(StructTCUSend * pPgnRecv)
...
@@ -724,7 +724,6 @@ void StartMeg(StructTCUSend * pPgnRecv)
13H:输入高压断路器故障
13H:输入高压断路器故障
18H:输出高压熔断器故障
18H:输出高压熔断器故障
1CH:辅助电源故障(仅直流桩使用)
1CH:辅助电源故障(仅直流桩使用)
20H:输出电压欠压故障
23H:无空余充电机模块可用(仅限具备功率分配功能的直流充电桩使用)
23H:无空余充电机模块可用(仅限具备功率分配功能的直流充电桩使用)
24H:预留
24H:预留
25H:门禁故障(充电机柜,仅直流桩使用)
25H:门禁故障(充电机柜,仅直流桩使用)
...
@@ -788,14 +787,18 @@ u8 AllowDTUStartCharge(u8 * Reason)
...
@@ -788,14 +787,18 @@ u8 AllowDTUStartCharge(u8 * Reason)
*
Reason
=
0x1A
;
//1AH:并联接触器粘连故障(仅直流桩使用)
*
Reason
=
0x1A
;
//1AH:并联接触器粘连故障(仅直流桩使用)
else
if
(
PillarError
.
Value
.
DCmodError
)
else
if
(
PillarError
.
Value
.
DCmodError
)
*
Reason
=
0x1D
;
//1DH:充电机模块故障
*
Reason
=
0x1D
;
//1DH:充电机模块故障
else
if
(
ChargeError
.
Value
.
DrainError
==
1
)
else
if
(
ChargeError
.
Value
.
DrainError
)
*
Reason
=
0x1B
;
//1BH:泄放回路故障
*
Reason
=
0x1B
;
//1BH:泄放回路故障
else
if
(
PillarError
.
Value
.
InVolt
)
else
if
(
PillarError
.
Value
.
InVolt
)
*
Reason
=
0x1E
;
//1EH:输入电源故障(交流输入电压过压故障、交流输入电压欠压故障、交流输入缺相故障、交流输入电流过流故障等)
*
Reason
=
0x1E
;
//1EH:输入电源故障(交流输入电压过压故障、交流输入电压欠压故障、交流输入缺相故障、交流输入电流过流故障等)
else
if
(
PillarError
.
Value
.
OutVolt
)
else
if
(
ChargeError
.
Value
.
VoltOutError
)
*
Reason
=
0x1F
;
//1FH:输出电压过压故障
*
Reason
=
0x1F
;
//1FH:输出电压过压故障
else
if
(
PillarError
.
Value
.
OutCurrt
)
else
if
(
ChargeError
.
Value
.
VoltOutLowError
)
*
Reason
=
0x20
;
//20H:输出电压欠压故障
else
if
(
ChargeError
.
Value
.
CurrtOutError
)
*
Reason
=
0x21
;
//21H:输出电流过流故障
*
Reason
=
0x21
;
//21H:输出电流过流故障
else
if
(
PillarError
.
Value
.
OutShort
)
*
Reason
=
0x22
;
//22H:输出短路故障
else
if
(
ChargeStopType
==
eChgStop_Imd_Short
)
else
if
(
ChargeStopType
==
eChgStop_Imd_Short
)
*
Reason
=
0x22
;
//22H:输出短路故障
*
Reason
=
0x22
;
//22H:输出短路故障
else
if
(
PillarError
.
Value
.
ImdDev
==
1
)
else
if
(
PillarError
.
Value
.
ImdDev
==
1
)
...
@@ -867,13 +870,17 @@ u8 AllowDTUStartCharge_B(u8 * Reason)
...
@@ -867,13 +870,17 @@ u8 AllowDTUStartCharge_B(u8 * Reason)
*
Reason
=
0x1B
;
//1BH:泄放回路故障
*
Reason
=
0x1B
;
//1BH:泄放回路故障
else
if
(
PillarError_B
.
Value
.
InVolt
)
else
if
(
PillarError_B
.
Value
.
InVolt
)
*
Reason
=
0x1E
;
//1EH:输入电源故障(交流输入电压过压故障、交流输入电压欠压故障、交流输入缺相故障、交流输入电流过流故障等)
*
Reason
=
0x1E
;
//1EH:输入电源故障(交流输入电压过压故障、交流输入电压欠压故障、交流输入缺相故障、交流输入电流过流故障等)
else
if
(
PillarError_B
.
Value
.
OutVolt
)
else
if
(
ChargeError_B
.
Value
.
VoltOutError
)
*
Reason
=
0x1F
;
//1FH:输出电压过压故障
*
Reason
=
0x1F
;
//1FH:输出电压过压故障
else
if
(
PillarError_B
.
Value
.
OutCurrt
)
else
if
(
ChargeError_B
.
Value
.
VoltOutLowError
)
*
Reason
=
0x20
;
//20H:输出电压欠压故障
else
if
(
ChargeError_B
.
Value
.
CurrtOutError
)
*
Reason
=
0x21
;
//21H:输出电流过流故障
*
Reason
=
0x21
;
//21H:输出电流过流故障
else
if
(
PillarError_B
.
Value
.
OutShort
)
*
Reason
=
0x22
;
//22H:输出短路故障
else
if
(
ChargeStopType_B
==
eChgStop_Imd_Short
)
else
if
(
ChargeStopType_B
==
eChgStop_Imd_Short
)
*
Reason
=
0x22
;
//22H:输出短路故障
*
Reason
=
0x22
;
//22H:输出短路故障
else
if
(
PillarError_B
.
Value
.
ImdDev
==
1
)
else
if
(
PillarError_B
.
Value
.
ImdDev
)
*
Reason
=
0x2B
;
//2BH:绝缘监测仪通信故障
*
Reason
=
0x2B
;
//2BH:绝缘监测仪通信故障
else
else
{
{
...
@@ -903,8 +910,8 @@ void StartMegAck_A(void)
...
@@ -903,8 +910,8 @@ void StartMegAck_A(void)
Data
[
2
]
=
0x01
;
Data
[
2
]
=
0x01
;
else
else
Data
[
2
]
=
0x00
;
Data
[
2
]
=
0x00
;
Data
[
3
]
=
Reason
;
Data
[
3
]
=
Reason
;
Data
[
4
]
=
StartMeg_A
.
LoadSswitch
;
Data
[
4
]
=
StartMeg_A
.
LoadSswitch
;
Data
[
5
]
=
StartMeg_A
.
StarChgType
;
Data
[
5
]
=
StartMeg_A
.
StarChgType
;
Data
[
6
]
=
StartMeg_A
.
AuxiliaryPower
;
Data
[
6
]
=
StartMeg_A
.
AuxiliaryPower
;
...
@@ -945,7 +952,6 @@ void StartMegAck_B(void)
...
@@ -945,7 +952,6 @@ void StartMegAck_B(void)
07H:交流输入断路器故障
07H:交流输入断路器故障
12H:直流输出熔断器故障
12H:直流输出熔断器故障
16H:辅助电源故障
16H:辅助电源故障
19H:直流母线输出电压欠压故障
23H:BRM 报文数据项异常(报文数据长度错误,BMS 通信协议版本号错误,其他数据错误)
23H:BRM 报文数据项异常(报文数据长度错误,BMS 通信协议版本号错误,其他数据错误)
25H:BCP 报文数据项异常(报文数据长度错误,电池当前电压越限,其他数据项错误)
25H:BCP 报文数据项异常(报文数据长度错误,电池当前电压越限,其他数据项错误)
26H:BRO 报文(0x00)接收超时
26H:BRO 报文(0x00)接收超时
...
@@ -1014,6 +1020,8 @@ u8 AllowDTUStartCompCharge(u8 * Reason)
...
@@ -1014,6 +1020,8 @@ u8 AllowDTUStartCompCharge(u8 * Reason)
*
Reason
=
0x17
;
//17H:充电机模块故障
*
Reason
=
0x17
;
//17H:充电机模块故障
else
if
(
PillarError
.
Value
.
OutVolt
)
else
if
(
PillarError
.
Value
.
OutVolt
)
*
Reason
=
0x18
;
//18H:直流母线输出电压过压故障
*
Reason
=
0x18
;
//18H:直流母线输出电压过压故障
else
if
(
ChargeError
.
Value
.
VoltOutLowError
)
*
Reason
=
0x19
;
//19H:直流母线输出电压欠压故障
else
if
(
PillarError
.
Value
.
OutCurrt
)
else
if
(
PillarError
.
Value
.
OutCurrt
)
*
Reason
=
0x1A
;
//1AH:直流母线输出电流过流故障
*
Reason
=
0x1A
;
//1AH:直流母线输出电流过流故障
else
if
(
PillarError
.
Value
.
OutShort
)
else
if
(
PillarError
.
Value
.
OutShort
)
...
@@ -1054,7 +1062,7 @@ u8 AllowDTUStartCompCharge(u8 * Reason)
...
@@ -1054,7 +1062,7 @@ u8 AllowDTUStartCompCharge(u8 * Reason)
*
Reason
=
0x3F
;
//3DH: 车辆验证确认帧超时
*
Reason
=
0x3F
;
//3DH: 车辆验证确认帧超时
else
if
(
TCUCommuStatus
.
ErrData
.
Value
.
verificationAck
==
1
)
else
if
(
TCUCommuStatus
.
ErrData
.
Value
.
verificationAck
==
1
)
*
Reason
=
0x3D
;
//3FH:车辆鉴权不通过
*
Reason
=
0x3D
;
//3FH:车辆鉴权不通过
else
if
(
TCUCurChgRecd
.
TCUStartCompresult
==
2
)
else
if
(
ChargeStopType
>=
eChgStop_Shake_CcOpen
&&
ChargeStopType
<=
eChgStop_ComBreak_CcOpen
)
*
Reason
=
0x01
;
//控制导引故障
*
Reason
=
0x01
;
//控制导引故障
else
else
*
Reason
=
0xFF
;
//其他故障
*
Reason
=
0xFF
;
//其他故障
...
@@ -1108,6 +1116,8 @@ u8 AllowDTUStartCompCharge_B(u8 * Reason)
...
@@ -1108,6 +1116,8 @@ u8 AllowDTUStartCompCharge_B(u8 * Reason)
*
Reason
=
0x17
;
//17H:充电机模块故障
*
Reason
=
0x17
;
//17H:充电机模块故障
else
if
(
PillarError_B
.
Value
.
OutVolt
)
else
if
(
PillarError_B
.
Value
.
OutVolt
)
*
Reason
=
0x18
;
//18H:直流母线输出电压过压故障
*
Reason
=
0x18
;
//18H:直流母线输出电压过压故障
else
if
(
ChargeError_B
.
Value
.
VoltOutLowError
)
*
Reason
=
0x19
;
//19H:直流母线输出电压欠压故障
else
if
(
PillarError_B
.
Value
.
OutCurrt
)
else
if
(
PillarError_B
.
Value
.
OutCurrt
)
*
Reason
=
0x1A
;
//1AH:直流母线输出电流过流故障
*
Reason
=
0x1A
;
//1AH:直流母线输出电流过流故障
else
if
(
PillarError_B
.
Value
.
OutShort
)
else
if
(
PillarError_B
.
Value
.
OutShort
)
...
@@ -1148,7 +1158,7 @@ u8 AllowDTUStartCompCharge_B(u8 * Reason)
...
@@ -1148,7 +1158,7 @@ u8 AllowDTUStartCompCharge_B(u8 * Reason)
*
Reason
=
0x3F
;
//3DH: 车辆验证确认帧超时
*
Reason
=
0x3F
;
//3DH: 车辆验证确认帧超时
else
if
(
TCUCommuStatus_B
.
ErrData
.
Value
.
verificationAck
==
1
)
else
if
(
TCUCommuStatus_B
.
ErrData
.
Value
.
verificationAck
==
1
)
*
Reason
=
0x3D
;
//3FH:车辆鉴权不通过
*
Reason
=
0x3D
;
//3FH:车辆鉴权不通过
else
if
(
TCUCurChgRecd_B
.
TCUStartCompresult
==
2
)
else
if
(
ChargeStopType_B
>=
eChgStop_Shake_CcOpen
&&
ChargeStopType_B
<=
eChgStop_ComBreak_CcOpen
)
*
Reason
=
0x01
;
//控制导引故障
*
Reason
=
0x01
;
//控制导引故障
else
else
*
Reason
=
0xFF
;
//其他故障
*
Reason
=
0xFF
;
//其他故障
...
@@ -1432,16 +1442,16 @@ void StopMegAck_B(void)
...
@@ -1432,16 +1442,16 @@ void StopMegAck_B(void)
/*
/*
07H:充电桩充电中暂停超时
0BH:烟感故障
0BH:烟感故障
0CH:交流输入断路器故障
0CH:交流输入断路器故障
15H:直流输出熔断器故障
15H:直流输出熔断器故障
19H:辅助电源故障
19H:辅助电源故障
1CH:直流母线输出电压欠压故障
2DH:预留
2DH:预留
2EH:无有效电流停止
2FH:环境监控板通信故障
2FH:环境监控板通信故障
30H:灯板通信故障
30H:灯板通信故障
31H: 电能表通信故障
31H: 电能表通信故障
...
@@ -1460,6 +1470,8 @@ void GetStopReason_A(u8 * stopReason)
...
@@ -1460,6 +1470,8 @@ void GetStopReason_A(u8 * stopReason)
*
stopReason
=
0x05
;
//05H:充电中控制导引故障//充电过程中充电导引枪连接
*
stopReason
=
0x05
;
//05H:充电中控制导引故障//充电过程中充电导引枪连接
else
if
(
TCUCommuStatus
.
ConnectFlag
==
CONNECT_TIMEOUT
)
else
if
(
TCUCommuStatus
.
ConnectFlag
==
CONNECT_TIMEOUT
)
*
stopReason
=
0x06
;
//06H:充电控制器与计费控制单元通讯超时
*
stopReason
=
0x06
;
//06H:充电控制器与计费控制单元通讯超时
else
if
(
ChargeStopType
==
eChgStop_Run_BmsPause
)
*
stopReason
=
0x07
;
//07H:充电桩充电中暂停超时
else
if
(
PillarError
.
Value
.
Emergency
)
else
if
(
PillarError
.
Value
.
Emergency
)
*
stopReason
=
0x08
;
//08H:急停按钮动作故障
*
stopReason
=
0x08
;
//08H:急停按钮动作故障
else
if
(
PillarError
.
Value
.
Door
)
else
if
(
PillarError
.
Value
.
Door
)
...
@@ -1490,9 +1502,11 @@ void GetStopReason_A(u8 * stopReason)
...
@@ -1490,9 +1502,11 @@ void GetStopReason_A(u8 * stopReason)
*
stopReason
=
0x18
;
//18H:泄放回路故障
*
stopReason
=
0x18
;
//18H:泄放回路故障
else
if
(
PillarError
.
Value
.
DCmodError
)
else
if
(
PillarError
.
Value
.
DCmodError
)
*
stopReason
=
0x1A
;
//1AH:充电机模块故障
*
stopReason
=
0x1A
;
//1AH:充电机模块故障
else
if
(
Charge
StopType
==
eChgStop_Run_VoltOutHighEr
r
)
else
if
(
Charge
Error
.
Value
.
VoltOutErro
r
)
*
stopReason
=
0x1B
;
//1BH:直流母线输出电压过压故障
*
stopReason
=
0x1B
;
//1BH:直流母线输出电压过压故障
else
if
(
ChargeStopType
==
eChgStop_Run_CurrtOutHighErr
)
else
if
(
ChargeError
.
Value
.
VoltOutLowError
)
*
stopReason
=
0x1C
;
// 1CH:直流母线输出电压欠压故障
else
if
(
ChargeError
.
Value
.
CurrtOutError
)
*
stopReason
=
0x1D
;
//1DH:直流母线输出电流过流故障
*
stopReason
=
0x1D
;
//1DH:直流母线输出电流过流故障
else
if
(
PillarError
.
Value
.
OutShort
)
else
if
(
PillarError
.
Value
.
OutShort
)
*
stopReason
=
0x1E
;
//1EH:直流母线输出短路故障
*
stopReason
=
0x1E
;
//1EH:直流母线输出短路故障
...
@@ -1527,6 +1541,8 @@ void GetStopReason_A(u8 * stopReason)
...
@@ -1527,6 +1541,8 @@ void GetStopReason_A(u8 * stopReason)
*
stopReason
=
0x2B
;
//2BH:BMS 异常终止充电
*
stopReason
=
0x2B
;
//2BH:BMS 异常终止充电
else
if
(
ChargeCtrl
.
CurProcess
==
eChgPro_ChgBreak
)
else
if
(
ChargeCtrl
.
CurProcess
==
eChgPro_ChgBreak
)
*
stopReason
=
0x2C
;
//2CH:充电桩判断BMS 其他异常终止
*
stopReason
=
0x2C
;
//2CH:充电桩判断BMS 其他异常终止
else
if
(
ChargeStopType
==
eChgStop_Run_NoCurr
)
*
stopReason
=
0x2E
;
//2EH:无有效电流停止
else
else
*
stopReason
=
0xff
;
//FFH:充电桩其他故障
*
stopReason
=
0xff
;
//FFH:充电桩其他故障
...
@@ -1549,6 +1565,8 @@ void GetStopReason_B(u8 * stopReason)
...
@@ -1549,6 +1565,8 @@ void GetStopReason_B(u8 * stopReason)
*
stopReason
=
0x05
;
//05H:充电中控制导引故障//充电过程中充电导引枪连接
*
stopReason
=
0x05
;
//05H:充电中控制导引故障//充电过程中充电导引枪连接
else
if
(
TCUCommuStatus_B
.
ConnectFlag
==
CONNECT_TIMEOUT
)
else
if
(
TCUCommuStatus_B
.
ConnectFlag
==
CONNECT_TIMEOUT
)
*
stopReason
=
0x06
;
//06H:充电控制器与计费控制单元通讯超时
*
stopReason
=
0x06
;
//06H:充电控制器与计费控制单元通讯超时
else
if
(
ChargeStopType_B
==
eChgStop_Run_BmsPause
)
*
stopReason
=
0x07
;
//07H:充电桩充电中暂停超时
else
if
(
PillarError_B
.
Value
.
Emergency
)
else
if
(
PillarError_B
.
Value
.
Emergency
)
*
stopReason
=
0x08
;
//08H:急停按钮动作故障
*
stopReason
=
0x08
;
//08H:急停按钮动作故障
else
if
(
PillarError_B
.
Value
.
Door
)
else
if
(
PillarError_B
.
Value
.
Door
)
...
@@ -1579,9 +1597,11 @@ void GetStopReason_B(u8 * stopReason)
...
@@ -1579,9 +1597,11 @@ void GetStopReason_B(u8 * stopReason)
*
stopReason
=
0x18
;
//18H:泄放回路故障
*
stopReason
=
0x18
;
//18H:泄放回路故障
else
if
(
PillarError_B
.
Value
.
DCmodError
)
else
if
(
PillarError_B
.
Value
.
DCmodError
)
*
stopReason
=
0x1A
;
//1AH:充电机模块故障
*
stopReason
=
0x1A
;
//1AH:充电机模块故障
else
if
(
Charge
StopType_B
==
eChgStop_Run_VoltOutHighEr
r
)
else
if
(
Charge
Error_B
.
Value
.
VoltOutErro
r
)
*
stopReason
=
0x1B
;
//1BH:直流母线输出电压过压故障
*
stopReason
=
0x1B
;
//1BH:直流母线输出电压过压故障
else
if
(
ChargeStopType_B
==
eChgStop_Run_CurrtOutHighErr
)
else
if
(
ChargeError_B
.
Value
.
VoltOutLowError
)
*
stopReason
=
0x1C
;
// 1CH:直流母线输出电压欠压故障
else
if
(
ChargeError_B
.
Value
.
CurrtOutError
)
*
stopReason
=
0x1D
;
//1DH:直流母线输出电流过流故障
*
stopReason
=
0x1D
;
//1DH:直流母线输出电流过流故障
else
if
(
PillarError_B
.
Value
.
OutShort
)
else
if
(
PillarError_B
.
Value
.
OutShort
)
*
stopReason
=
0x1E
;
//1EH:直流母线输出短路故障
*
stopReason
=
0x1E
;
//1EH:直流母线输出短路故障
...
@@ -1616,6 +1636,8 @@ void GetStopReason_B(u8 * stopReason)
...
@@ -1616,6 +1636,8 @@ void GetStopReason_B(u8 * stopReason)
*
stopReason
=
0x2B
;
//2BH:BMS 异常终止充电
*
stopReason
=
0x2B
;
//2BH:BMS 异常终止充电
else
if
(
ChargeCtrl_B
.
CurProcess
==
eChgPro_B_ChgBreak
)
else
if
(
ChargeCtrl_B
.
CurProcess
==
eChgPro_B_ChgBreak
)
*
stopReason
=
0x2C
;
//2CH:充电桩判断BMS 其他异常终止
*
stopReason
=
0x2C
;
//2CH:充电桩判断BMS 其他异常终止
else
if
(
ChargeStopType_B
==
eChgStop_Run_NoCurr
)
*
stopReason
=
0x2E
;
//2EH:无有效电流停止
else
else
*
stopReason
=
0xff
;
//FFH:充电桩其他故障
*
stopReason
=
0xff
;
//FFH:充电桩其他故障
...
@@ -2461,9 +2483,8 @@ void InformationReporting_22_A(void)
...
@@ -2461,9 +2483,8 @@ void InformationReporting_22_A(void)
InformainReport_A
.
InfRe
.
BattPola
=
0
;
InformainReport_A
.
InfRe
.
BattPola
=
0
;
InformainReport_A
.
InfRe
.
ContGuid
=
0
;
//控制导引
InformainReport_A
.
InfRe
.
ContGuid
=
0
;
//控制导引
/*if (eSwSta_On != CcStatusRead()
if
(
ChargeStopType
>=
eChgStop_Shake_CcOpen
&& (1 == TCUCurChgRecd.TCUChargeEnable) )*/
&&
ChargeStopType
<=
eChgStop_ComBreak_CcOpen
)
if
(
CstMsg
.
StopReason
.
Value
.
Manual
==
1
)
{
{
InformainReport_A
.
InfRe
.
ContGuid
=
1
;
InformainReport_A
.
InfRe
.
ContGuid
=
1
;
}
}
...
@@ -2478,7 +2499,7 @@ void InformationReporting_22_A(void)
...
@@ -2478,7 +2499,7 @@ void InformationReporting_22_A(void)
(
0
!=
BemMsg
.
Bem
.
Value
.
Cro
)
||
(
0
!=
BemMsg
.
Bem
.
Value
.
Ccs
)
||
(
0
!=
BemMsg
.
Bem
.
Value
.
Csd
)
||
(
0
!=
BemMsg
.
Bem
.
Value
.
Cro
)
||
(
0
!=
BemMsg
.
Bem
.
Value
.
Ccs
)
||
(
0
!=
BemMsg
.
Bem
.
Value
.
Csd
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Brm
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Bcp
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Bro
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Brm
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Bcp
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Bro
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Bcs
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Bcl
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Bst
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Bcs
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Bcl
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Bst
)
||
(
0
!=
CemMsg
.
Cem
.
Value
.
Bsd
))
&&
(
TCUCurChgRecd
.
TCUChargeEnable
==
1
)
)
(
0
!=
CemMsg
.
Cem
.
Value
.
Bsd
)))
InformainReport_A
.
InfRe
.
BMSComm
=
01
;
InformainReport_A
.
InfRe
.
BMSComm
=
01
;
else
else
InformainReport_A
.
InfRe
.
BMSComm
=
00
;
InformainReport_A
.
InfRe
.
BMSComm
=
00
;
...
@@ -2499,12 +2520,13 @@ void InformationReporting_22_A(void)
...
@@ -2499,12 +2520,13 @@ void InformationReporting_22_A(void)
}
}
}
}
if
((
ChargeStopType
==
eChgStop_Run_VoltOutHighErr
)
&&
(
TCUCurChgRecd
.
TCUChargeEnable
==
1
))
//if ((ChargeStopType == eChgStop_Run_VoltOutHighErr) )
if
(
ChargeError
.
Value
.
VoltOutError
==
1
)
InformainReport_A
.
InfRe
.
DcVolHi
=
01
;
InformainReport_A
.
InfRe
.
DcVolHi
=
01
;
else
else
InformainReport_A
.
InfRe
.
DcVolHi
=
0
;
InformainReport_A
.
InfRe
.
DcVolHi
=
0
;
if
(
(
ChargeStopType
==
eChgStop_Run_CurrtOutHighErr
)
&&
(
TCUCurChgRecd
.
TCUChargeEnable
==
1
)
)
if
(
ChargeError
.
Value
.
CurrtOutError
)
InformainReport_A
.
InfRe
.
DCCurrHi
=
01
;
InformainReport_A
.
InfRe
.
DCCurrHi
=
01
;
else
else
InformainReport_A
.
InfRe
.
DCCurrHi
=
0
;
InformainReport_A
.
InfRe
.
DCCurrHi
=
0
;
...
@@ -2589,13 +2611,14 @@ void InformationReporting_22_B(void)
...
@@ -2589,13 +2611,14 @@ void InformationReporting_22_B(void)
InformainReport_B
.
InfRe
.
SPD
=
PillarError_B
.
Value
.
SPD
;
InformainReport_B
.
InfRe
.
SPD
=
PillarError_B
.
Value
.
SPD
;
InformainReport_B
.
InfRe
.
ImdDev
=
PillarError_B
.
Value
.
Insulation
;
InformainReport_B
.
InfRe
.
ImdDev
=
PillarError_B
.
Value
.
Insulation
;
if
(
(
ChargeStopType_B
==
eChgStop_PillarReady_BatVoltError
)
&&
(
TCUCurChgRecd_B
.
TCUChargeEnable
==
1
)
)
if
(
ChargeStopType_B
==
eChgStop_PillarReady_BatVoltError
)
InformainReport_B
.
InfRe
.
BattPola
=
01
;
InformainReport_B
.
InfRe
.
BattPola
=
01
;
else
else
InformainReport_B
.
InfRe
.
BattPola
=
0
;
InformainReport_B
.
InfRe
.
BattPola
=
0
;
InformainReport_B
.
InfRe
.
ContGuid
=
0
;
//控制导引
InformainReport_B
.
InfRe
.
ContGuid
=
0
;
//控制导引
if
(
CstMsg_B
.
StopReason
.
Value
.
Manual
==
1
)
if
(
ChargeStopType_B
>=
eChgStop_Shake_CcOpen
&&
ChargeStopType_B
<=
eChgStop_ComBreak_CcOpen
)
{
{
InformainReport_B
.
InfRe
.
ContGuid
=
1
;
InformainReport_B
.
InfRe
.
ContGuid
=
1
;
}
}
...
@@ -2610,7 +2633,7 @@ void InformationReporting_22_B(void)
...
@@ -2610,7 +2633,7 @@ void InformationReporting_22_B(void)
(
0
!=
BemMsg_B
.
Bem
.
Value
.
Cro
)
||
(
0
!=
BemMsg_B
.
Bem
.
Value
.
Ccs
)
||
(
0
!=
BemMsg_B
.
Bem
.
Value
.
Csd
)
||
(
0
!=
BemMsg_B
.
Bem
.
Value
.
Cro
)
||
(
0
!=
BemMsg_B
.
Bem
.
Value
.
Ccs
)
||
(
0
!=
BemMsg_B
.
Bem
.
Value
.
Csd
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Brm
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bcp
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bro
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Brm
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bcp
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bro
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bcs
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bcl
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bst
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bcs
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bcl
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bst
)
||
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bsd
))
&&
(
TCUCurChgRecd_B
.
TCUChargeEnable
==
1
)
)
(
0
!=
CemMsg_B
.
Cem
.
Value
.
Bsd
)))
InformainReport_B
.
InfRe
.
BMSComm
=
01
;
InformainReport_B
.
InfRe
.
BMSComm
=
01
;
else
else
InformainReport_B
.
InfRe
.
BMSComm
=
00
;
InformainReport_B
.
InfRe
.
BMSComm
=
00
;
...
@@ -2631,12 +2654,12 @@ void InformationReporting_22_B(void)
...
@@ -2631,12 +2654,12 @@ void InformationReporting_22_B(void)
}
}
}
}
if
((
ChargeStopType_B
==
eChgStop_Run_VoltOutHighErr
)
&&
(
TCUCurChgRecd_B
.
TCUChargeEnable
==
1
)
)
if
(
ChargeError_B
.
Value
.
VoltOutError
==
1
)
InformainReport_B
.
InfRe
.
DcVolHi
=
01
;
InformainReport_B
.
InfRe
.
DcVolHi
=
01
;
else
else
InformainReport_B
.
InfRe
.
DcVolHi
=
0
;
InformainReport_B
.
InfRe
.
DcVolHi
=
0
;
if
(
(
ChargeStopType_B
==
eChgStop_Run_CurrtOutHighErr
)
&&
(
TCUCurChgRecd_B
.
TCUChargeEnable
==
1
)
)
if
(
ChargeError_B
.
Value
.
CurrtOutError
)
InformainReport_B
.
InfRe
.
DCCurrHi
=
01
;
InformainReport_B
.
InfRe
.
DCCurrHi
=
01
;
else
else
InformainReport_B
.
InfRe
.
DCCurrHi
=
0
;
InformainReport_B
.
InfRe
.
DCCurrHi
=
0
;
...
@@ -2644,8 +2667,8 @@ void InformationReporting_22_B(void)
...
@@ -2644,8 +2667,8 @@ void InformationReporting_22_B(void)
InformainReport_B
.
InfRe
.
DcModErr
=
PillarError_B
.
Value
.
DCmodError
;
InformainReport_B
.
InfRe
.
DcModErr
=
PillarError_B
.
Value
.
DCmodError
;
InformainReport_B
.
InfRe
.
DCModIn
=
DcModuleStatus_B
.
Value
.
accIn
;
InformainReport_B
.
InfRe
.
DCModIn
=
DcModuleStatus_B
.
Value
.
accIn
;
InformainReport_B
.
InfRe
.
DCModInHi
=
0
;
//
InformainReport_B.InfRe.DCModInHi = 0;
InformainReport_B
.
InfRe
.
DCModInLo
=
0
;
//
InformainReport_B.InfRe.DCModInLo = 0;
//InformainReport_B.InfRe.DCModPhas = 0;
//InformainReport_B.InfRe.DCModPhas = 0;
InformainReport_B
.
InfRe
.
DcOutShor
=
DcModuleStatus_B
.
Value
.
outShort
;
InformainReport_B
.
InfRe
.
DcOutShor
=
DcModuleStatus_B
.
Value
.
outShort
;
//InformainReport_B.InfRe.DCModOutCuHi = 0;
//InformainReport_B.InfRe.DCModOutCuHi = 0;
...
@@ -2653,11 +2676,11 @@ void InformationReporting_22_B(void)
...
@@ -2653,11 +2676,11 @@ void InformationReporting_22_B(void)
InformainReport_B
.
InfRe
.
DCModOutVoLo
=
DcModuleStatus_B
.
Value
.
outLow
;
InformainReport_B
.
InfRe
.
DCModOutVoLo
=
DcModuleStatus_B
.
Value
.
outLow
;
InformainReport_B
.
InfRe
.
DCModTempHi
=
DcModuleStatus_B
.
Value
.
tempOver
;
InformainReport_B
.
InfRe
.
DCModTempHi
=
DcModuleStatus_B
.
Value
.
tempOver
;
InformainReport_B
.
InfRe
.
DCModComm
=
PillarError_B
.
Value
.
NoDcmod
;
//
InformainReport_B.InfRe.DCModComm = PillarError_B.Value.NoDcmod;
InformainReport_B
.
InfRe
.
DCModFan
=
DcModuleStatus_B
.
Value
.
fan
;
InformainReport_B
.
InfRe
.
DCModFan
=
DcModuleStatus_B
.
Value
.
fan
;
InformainReport_B
.
InfRe
.
CCConnect
=
!
CcStatusRead_B
();
InformainReport_B
.
InfRe
.
CCConnect
=
!
CcStatusRead_B
();
InformainReport_B
.
InfRe
.
InsertGunSta
=
1
;
InformainReport_B
.
InfRe
.
InsertGunSta
=
1
;
if
(
!
CcStatusRead_B
()
&&
(
ChargeCtrl_B
.
CurProcess
==
eChgPro_ChgIdle
))
if
(
!
CcStatusRead_B
()
&&
(
ChargeCtrl_B
.
CurProcess
==
eChgPro_
B_
ChgIdle
))
InformainReport_B
.
InfRe
.
InsertGunSta
=
!
GunStatusGet_B
();
InformainReport_B
.
InfRe
.
InsertGunSta
=
!
GunStatusGet_B
();
InformainReport_B
.
InfRe
.
DcOutContSta
=
DcOutPosGetSet_B
();
InformainReport_B
.
InfRe
.
DcOutContSta
=
DcOutPosGetSet_B
();
InformainReport_B
.
InfRe
.
ElectLock
=
LockGet_B
();
InformainReport_B
.
InfRe
.
ElectLock
=
LockGet_B
();
...
@@ -2694,7 +2717,7 @@ void InformationReporting_23_A(void)
...
@@ -2694,7 +2717,7 @@ void InformationReporting_23_A(void)
InformainReport2_A
.
InfRe
.
Door
=
PillarError
.
Value
.
Door
;
InformainReport2_A
.
InfRe
.
Door
=
PillarError
.
Value
.
Door
;
InformainReport2_A
.
InfRe
.
DCOutConOn
=
PillarError
.
Value
.
Contactor2
;
InformainReport2_A
.
InfRe
.
DCOutConOn
=
PillarError
.
Value
.
Contactor2
;
if
(
(
ChargeError
.
Value
.
IsolateWarn
==
1
)
&&
(
TCUCurChgRecd
.
TCUChargeEnable
==
1
)
)
if
(
ChargeError
.
Value
.
IsolateWarn
==
1
)
InformainReport2_A
.
InfRe
.
ImdWarm
=
0x01
;
InformainReport2_A
.
InfRe
.
ImdWarm
=
0x01
;
else
else
InformainReport2_A
.
InfRe
.
ImdWarm
=
0x00
;
InformainReport2_A
.
InfRe
.
ImdWarm
=
0x00
;
...
@@ -2709,7 +2732,18 @@ void InformationReporting_23_A(void)
...
@@ -2709,7 +2732,18 @@ void InformationReporting_23_A(void)
InformainReport2_A
.
InfRe
.
UniContactorOn
=
PillarError
.
Value
.
UniContactor2
;
InformainReport2_A
.
InfRe
.
UniContactorOn
=
PillarError
.
Value
.
UniContactor2
;
InformainReport2_A
.
InfRe
.
ImdCon
=
PillarError
.
Value
.
ImdDev
;
InformainReport2_A
.
InfRe
.
ImdCon
=
PillarError
.
Value
.
ImdDev
;
memcpy
(
&
Data
[
1
],
&
InformainReport2_A
.
data
,
2
);
if
(
ChargeError
.
Value
.
Bcp
)
InformainReport2_A
.
InfRe
.
bms
=
1
;
else
InformainReport2_A
.
InfRe
.
bms
=
0
;
InformainReport2_A
.
InfRe
.
bmsSend
=
0
;
if
(
BsmMsg
.
BatSta
.
Mult
!=
0
||
BsmMsg
.
ChgSta
.
Mult
&
0x0f
!=
0
||
BstMsg
.
StopFault
.
Mult
&
0x0f
!=
0
||
BstMsg
.
StopTruble
.
Mult
!=
0
)
InformainReport2_A
.
InfRe
.
bmsSend
=
1
;
memcpy
(
&
Data
[
1
],
&
InformainReport2_A
.
data
,
4
);
TCUSinglePackSendMsg
(
Data
,
8
,
eCmd_DCConInfor2
,
4
,
ChargerCont1939Addr
);
TCUSinglePackSendMsg
(
Data
,
8
,
eCmd_DCConInfor2
,
4
,
ChargerCont1939Addr
);
}
}
...
@@ -2725,7 +2759,7 @@ void InformationReporting_23_B(void)
...
@@ -2725,7 +2759,7 @@ void InformationReporting_23_B(void)
InformainReport2_B
.
InfRe
.
Door
=
PillarError_B
.
Value
.
Door
;
InformainReport2_B
.
InfRe
.
Door
=
PillarError_B
.
Value
.
Door
;
InformainReport2_B
.
InfRe
.
DCOutConOn
=
PillarError_B
.
Value
.
Contactor2
;
InformainReport2_B
.
InfRe
.
DCOutConOn
=
PillarError_B
.
Value
.
Contactor2
;
if
(
(
ChargeError_B
.
Value
.
IsolateWarn
==
1
)
&&
(
TCUCurChgRecd_B
.
TCUChargeEnable
==
1
)
)
if
(
ChargeError_B
.
Value
.
IsolateWarn
==
1
)
InformainReport2_B
.
InfRe
.
ImdWarm
=
0x01
;
InformainReport2_B
.
InfRe
.
ImdWarm
=
0x01
;
else
else
InformainReport2_B
.
InfRe
.
ImdWarm
=
0x00
;
InformainReport2_B
.
InfRe
.
ImdWarm
=
0x00
;
...
@@ -2735,12 +2769,23 @@ void InformationReporting_23_B(void)
...
@@ -2735,12 +2769,23 @@ void InformationReporting_23_B(void)
InformainReport2_B
.
InfRe
.
gunTemp
=
ChargeError_B
.
Value
.
GunTempWarn
;
InformainReport2_B
.
InfRe
.
gunTemp
=
ChargeError_B
.
Value
.
GunTempWarn
;
InformainReport2_B
.
InfRe
.
AccContacON
=
PillarError_B
.
Value
.
ACContactor1
;
InformainReport2_B
.
InfRe
.
AccContacON
=
PillarError_B
.
Value
.
ACContactor1
;
InformainReport2_B
.
InfRe
.
AccContacOff
=
PillarError_B
.
Value
.
ACContactor2
;
InformainReport2_B
.
InfRe
.
AccContacOff
=
PillarError_B
.
Value
.
ACContactor2
;
InformainReport2_B
.
InfRe
.
Power
=
00
;
//
InformainReport2_B.InfRe.Power = 00;
InformainReport2_B
.
InfRe
.
UniContactorOff
=
PillarError_B
.
Value
.
UniContactor1
;
InformainReport2_B
.
InfRe
.
UniContactorOff
=
PillarError_B
.
Value
.
UniContactor1
;
InformainReport2_B
.
InfRe
.
UniContactorOn
=
PillarError_B
.
Value
.
UniContactor2
;
InformainReport2_B
.
InfRe
.
UniContactorOn
=
PillarError_B
.
Value
.
UniContactor2
;
InformainReport2_B
.
InfRe
.
ImdCon
=
PillarError_B
.
Value
.
ImdDev
;
InformainReport2_B
.
InfRe
.
ImdCon
=
PillarError_B
.
Value
.
ImdDev
;
memcpy
(
&
Data
[
1
],
&
InformainReport2_B
.
data
,
2
);
if
(
ChargeError_B
.
Value
.
Bcp
)
InformainReport2_B
.
InfRe
.
bms
=
1
;
else
InformainReport2_B
.
InfRe
.
bms
=
0
;
InformainReport2_B
.
InfRe
.
bmsSend
=
0
;
if
(
BsmMsg_B
.
BatSta
.
Mult
!=
0
||
BsmMsg_B
.
ChgSta
.
Mult
&
0x0f
!=
0
||
BstMsg_B
.
StopFault
.
Mult
&
0x0f
!=
0
||
BstMsg_B
.
StopTruble
.
Mult
!=
0
)
InformainReport2_B
.
InfRe
.
bmsSend
=
1
;
memcpy
(
&
Data
[
1
],
&
InformainReport2_B
.
data
,
4
);
TCUSinglePackSendMsg
(
Data
,
8
,
eCmd_DCConInfor2
,
4
,
ChargerCont1939Addr_B
);
TCUSinglePackSendMsg
(
Data
,
8
,
eCmd_DCConInfor2
,
4
,
ChargerCont1939Addr_B
);
}
}
...
...
DcPillar/Src/Drivers/Drv_TCUComm.h
浏览文件 @
539128bd
...
@@ -220,14 +220,14 @@ typedef union {
...
@@ -220,14 +220,14 @@ typedef union {
交流输入接触器拒动/误动故障
交流输入接触器拒动/误动故障
交流输入接触器粘连故障
交流输入接触器粘连故障
*/
*/
u
16
Door
:
1
;
//
u
32
Door
:
1
;
//
u
16
DCOutConOn
:
1
;
//母线接触器粘连故障
u
32
DCOutConOn
:
1
;
//母线接触器粘连故障
u
16
ImdWarm
:
1
;
u
32
ImdWarm
:
1
;
u
16
DrainResist
:
1
;
u
32
DrainResist
:
1
;
u
16
tempOver
:
1
;
u
32
tempOver
:
1
;
u
16
gunTemp
:
1
;
u
32
gunTemp
:
1
;
u
16
AccContacON
:
1
;
//交流数日接触器据动/误动故障
u
32
AccContacON
:
1
;
//交流数日接触器据动/误动故障
u
16
AccContacOff
:
1
;
//粘连故障
u
32
AccContacOff
:
1
;
//粘连故障
/*
/*
辅助电源故障
辅助电源故障
...
@@ -239,10 +239,10 @@ typedef union {
...
@@ -239,10 +239,10 @@ typedef union {
充电机柜门禁故障
充电机柜门禁故障
充电机柜水浸故障
充电机柜水浸故障
*/
*/
u
16
Power
:
1
;
//辅助电源
u
32
Power
:
1
;
//辅助电源
u
16
UniContactorOff
:
1
;
//接触器据动/误动故障
u
32
UniContactorOff
:
1
;
//接触器据动/误动故障
u
16
UniContactorOn
:
1
;
//并联接触器粘连故障
u
32
UniContactorOn
:
1
;
//并联接触器粘连故障
u
16
reserve1
:
5
;
u
32
reserve1
:
5
;
/*
/*
充电机柜烟感故障
充电机柜烟感故障
...
@@ -254,7 +254,7 @@ typedef union {
...
@@ -254,7 +254,7 @@ typedef union {
开关模块通信告警
开关模块通信告警
开关模块故障
开关模块故障
*/
*/
u
16
reserve2
:
8
;
u
32
reserve2
:
8
;
/*
/*
开关模块告警
开关模块告警
...
@@ -266,9 +266,12 @@ typedef union {
...
@@ -266,9 +266,12 @@ typedef union {
灯板通信故障
灯板通信故障
电能表通信故障
电能表通信故障
*/
*/
u16
reserve3
:
4
;
u32
reserve3
:
1
;
u16
ImdCon
:
1
;
u32
bms
:
1
;
u16
reserve4
:
3
;
u32
bmsSend
:
1
;
u32
DcModDrain
:
1
;
u32
ImdCon
:
1
;
u32
reserve4
:
3
;
}
InfRe
;
}
InfRe
;
...
...
DcPillar/Src/Global.h
浏览文件 @
539128bd
...
@@ -283,6 +283,7 @@ typedef enum
...
@@ -283,6 +283,7 @@ typedef enum
eChgStop_Conf_BatVoltLessPillarMinVolt
=
101
,
eChgStop_Conf_BatVoltLessPillarMinVolt
=
101
,
eChgStop_PillarReady_UniContactor
,
eChgStop_PillarReady_UniContactor
,
eChgStop_BatVoltOverBatMax
,
eChgStop_BatVoltOverBatMax
,
eChgStop_Run_NoCurr
,
}
EnumChgStopType
;
}
EnumChgStopType
;
...
@@ -382,6 +383,7 @@ typedef union
...
@@ -382,6 +383,7 @@ typedef union
u32
DCMoudleOnTimeOut
:
1
;
//充电模块开机超时
u32
DCMoudleOnTimeOut
:
1
;
//充电模块开机超时
u32
Bcp
:
1
;
//BCP 报文数据项异常
u32
Bcp
:
1
;
//BCP 报文数据项异常
u32
Bsm
:
1
;
//动力蓄电池状态信息(BSM)超时
u32
Bsm
:
1
;
//动力蓄电池状态信息(BSM)超时
u32
VoltOutLowError
:
1
;
//输出欠压
}
Value
;
}
Value
;
}
UnionChgError
;
}
UnionChgError
;
...
...
DcPillar/Src/SmartAllocation/ChgPro_B_ChgRun_SmartAllocation.c
浏览文件 @
539128bd
...
@@ -96,6 +96,9 @@ void ChgProChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -96,6 +96,9 @@ void ChgProChgRun_B(StructChargeCtrl_B *pChargeCtrl)
UniChgTick
=
0
;
UniChgTick
=
0
;
u32
NeedPower
=
0
;
u32
NeedPower
=
0
;
u32
NowPower
=
0
;
u32
NowPower
=
0
;
u32
NoCurrentCount
=
0
;
u32
NoCurrentTick
=
GetSystemTick
();
while
(
1
)
while
(
1
)
{
{
if
((
GetSystemTick
()
-
CCS_SendTick
)
>
50
)
if
((
GetSystemTick
()
-
CCS_SendTick
)
>
50
)
...
@@ -559,6 +562,30 @@ void ChgProChgRun_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -559,6 +562,30 @@ void ChgProChgRun_B(StructChargeCtrl_B *pChargeCtrl)
pChargeCtrl
->
CurProcess
=
eChgPro_B_ChgBreak
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_ChgBreak
;
pChargeCtrl
->
Param
=
0
;
pChargeCtrl
->
Param
=
0
;
}
}
if
(
GetSystemTick
()
-
NoCurrentTick
>
1000
)
{
NoCurrentTick
=
GetSystemTick
();
if
(
GetDcModuleCurrt_B
()
<
50
)
{
NoCurrentCount
++
;
if
(
NoCurrentCount
>=
600
)
{
CstMsg_B
.
StopReason
.
Value
.
Manual
=
1
;
CST_Send_B
(
&
CstMsg_B
);
DcModuleSet_B
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage_B
.
ValidNum
);
ChargeTimerSet_B
(
eSwSta_Off
);
ChargeStopType_B
=
eChgStop_Run_NoCurr
;
pChargeCtrl
->
CurProcess
=
eChgPro_B_ChgStop
;
pChargeCtrl
->
Param
=
0
;
}
}
else
{
NoCurrentCount
=
0
;
}
}
if
(
eChgPro_B_ChgRun
!=
pChargeCtrl
->
CurProcess
)
if
(
eChgPro_B_ChgRun
!=
pChargeCtrl
->
CurProcess
)
{
{
release_DcModule
(
2
);
release_DcModule
(
2
);
...
...
DcPillar/Src/SmartAllocation/ChgPro_ChgRun_SmartAllocation.c
浏览文件 @
539128bd
...
@@ -102,6 +102,8 @@ void ChgProChgRun(StructChargeCtrl * pChargeCtrl)
...
@@ -102,6 +102,8 @@ void ChgProChgRun(StructChargeCtrl * pChargeCtrl)
u32
NeedPower
=
0
;
u32
NeedPower
=
0
;
u32
NowPower
=
0
;
u32
NowPower
=
0
;
u32
NowMaxCurrt
=
0
;
u32
NowMaxCurrt
=
0
;
u32
NoCurrentCount
=
0
;
u32
NoCurrentTick
=
GetSystemTick
();
while
(
1
)
while
(
1
)
{
{
if
((
GetSystemTick
()
-
CCS_SendTick
)
>
50
)
if
((
GetSystemTick
()
-
CCS_SendTick
)
>
50
)
...
@@ -613,6 +615,29 @@ void ChgProChgRun(StructChargeCtrl * pChargeCtrl)
...
@@ -613,6 +615,29 @@ void ChgProChgRun(StructChargeCtrl * pChargeCtrl)
pChargeCtrl
->
Param
=
0
;
pChargeCtrl
->
Param
=
0
;
}
}
if
(
GetSystemTick
()
-
NoCurrentTick
>
1000
)
{
NoCurrentTick
=
GetSystemTick
();
if
(
GetDcModuleCurrt
()
<
50
)
{
NoCurrentCount
++
;
if
(
NoCurrentCount
>=
600
)
{
CstMsg
.
StopReason
.
Value
.
Manual
=
1
;
CST_Send
(
&
CstMsg
);
DcModuleSet
(
eSwSta_Off
,
DcModuleAbility
.
MinVolt
,
DcModuleAbility
.
MinCurrt
*
DcModuleManage
.
ValidNum
);
ChargeTimerSet
(
eSwSta_Off
);
ChargeStopType
=
eChgStop_Run_NoCurr
;
pChargeCtrl
->
CurProcess
=
eChgPro_ChgStop
;
pChargeCtrl
->
Param
=
0
;
}
}
else
{
NoCurrentCount
=
0
;
}
}
if
(
eChgPro_ChgRun
!=
pChargeCtrl
->
CurProcess
)
if
(
eChgPro_ChgRun
!=
pChargeCtrl
->
CurProcess
)
{
{
release_DcModule
(
1
);
release_DcModule
(
1
);
...
...
DcPillar/Src/SmartAllocation/Drv_DcModule_SmartAllocation.c
浏览文件 @
539128bd
...
@@ -691,7 +691,7 @@ s8 getDcMoudleVoltChkCnt(void)
...
@@ -691,7 +691,7 @@ s8 getDcMoudleVoltChkCnt(void)
void
setDcMoudleVoltChkCnt
(
s8
val
)
void
setDcMoudleVoltChkCnt
(
s8
val
)
{
{
DcModleVoltChkCnt
=
0
;
DcModleVoltChkCnt
=
val
;
}
}
void
DcModuleMsgReceive_ZhongXing
(
CanRxMsg
*
RxMsg
)
void
DcModuleMsgReceive_ZhongXing
(
CanRxMsg
*
RxMsg
)
...
...
DcPillar/Src/SmartAllocation/Drv_SmartAllocation.c
浏览文件 @
539128bd
...
@@ -1309,8 +1309,7 @@ void RelayStatusCheck(void)
...
@@ -1309,8 +1309,7 @@ void RelayStatusCheck(void)
{
{
static
u32
Tick
=
0
;
static
u32
Tick
=
0
;
static
u8
flag
=
0
;
static
u8
flag
=
0
;
static
u8
flag_A
=
0
;
static
u8
flag_B
=
0
;
if
((
GetSystemTick
()
-
Tick
)
<
100
)
if
((
GetSystemTick
()
-
Tick
)
<
100
)
{
{
return
;
return
;
...
@@ -1318,8 +1317,8 @@ void RelayStatusCheck(void)
...
@@ -1318,8 +1317,8 @@ void RelayStatusCheck(void)
Tick
=
GetSystemTick
();
Tick
=
GetSystemTick
();
if
((
GetDcModeleRelaySet
(
Relay_K5K6
)
!=
GetK5K6Status
())
if
((
GetDcModeleRelaySet
(
Relay_K5K6
)
!=
GetK5K6Status
())
/*
|| (GetDcModeleRelaySet(Relay_K1K2) != GetK1K2Status())
||
(
GetDcModeleRelaySet
(
Relay_K1K2
)
!=
GetK1K2Status
())
|| (GetDcModeleRelaySet(Relay_K7K8) != GetK7K8Status())
*/
)
||
(
GetDcModeleRelaySet
(
Relay_K7K8
)
!=
GetK7K8Status
()))
{
{
flag
++
;
flag
++
;
}
}
...
@@ -1338,88 +1337,19 @@ void RelayStatusCheck(void)
...
@@ -1338,88 +1337,19 @@ void RelayStatusCheck(void)
flag
=
0
;
flag
=
0
;
}
}
if
(
GetDcModeleRelaySet
(
Relay_K1K2
)
!=
GetK1K2Status
())
{
flag_A
++
;
}
else
{
flag_A
=
0
;
}
if
(
GetDcModeleRelaySet
(
Relay_K7K8
)
!=
GetK7K8Status
())
{
flag_B
++
;
}
else
{
flag_B
=
0
;
}
if
(
flag
>=
5
)
if
(
flag
>=
5
)
{
{
flag
=
5
;
flag
=
5
;
PillarError
.
Value
.
UniContactor
=
1
;
PillarError
.
Value
.
UniContactor
=
1
;
PillarError_B
.
Value
.
UniContactor
=
1
;
PillarError_B
.
Value
.
UniContactor
=
1
;
if
(
GetDcModeleRelaySet
(
Relay_K5K6
)
==
eSwSta_Off
)
{
PillarError
.
Value
.
UniContactor2
=
1
;
PillarError_B
.
Value
.
UniContactor2
=
1
;
}
else
{
PillarError
.
Value
.
UniContactor1
=
1
;
PillarError_B
.
Value
.
UniContactor1
=
1
;
}
}
}
else
else
{
{
PillarError
.
Value
.
UniContactor
=
0
;
PillarError
.
Value
.
UniContactor
=
0
;
PillarError_B
.
Value
.
UniContactor
=
0
;
PillarError_B
.
Value
.
UniContactor
=
0
;
PillarError
.
Value
.
UniContactor1
=
0
;
PillarError_B
.
Value
.
UniContactor1
=
0
;
PillarError
.
Value
.
UniContactor2
=
0
;
PillarError_B
.
Value
.
UniContactor2
=
0
;
}
}
if
(
flag_A
>=
5
)
{
flag_A
=
5
;
PillarError
.
Value
.
Contactor
=
1
;
if
(
GetDcModeleRelaySet
(
Relay_K1K2
)
==
eSwSta_Off
)
{
PillarError
.
Value
.
Contactor2
=
1
;
}
else
{
PillarError
.
Value
.
Contactor1
=
1
;
}
}
else
{
PillarError
.
Value
.
Contactor
=
0
;
PillarError
.
Value
.
Contactor1
=
0
;
PillarError
.
Value
.
Contactor2
=
0
;
}
if
(
flag_B
>=
5
)
{
flag_B
=
5
;
PillarError_B
.
Value
.
Contactor
=
1
;
if
(
GetDcModeleRelaySet
(
Relay_K7K8
)
==
eSwSta_Off
)
{
PillarError_B
.
Value
.
Contactor2
=
1
;
}
else
{
PillarError_B
.
Value
.
Contactor1
=
1
;
}
}
else
{
PillarError_B
.
Value
.
Contactor
=
0
;
PillarError_B
.
Value
.
Contactor1
=
0
;
PillarError_B
.
Value
.
Contactor2
=
0
;
}
}
}
...
...
DcPillar/Src/Thread/Charge/ChgPro_ChgIdle.c
浏览文件 @
539128bd
...
@@ -35,9 +35,20 @@ void ChgProChgIdle(StructChargeCtrl *pChargeCtrl)
...
@@ -35,9 +35,20 @@ void ChgProChgIdle(StructChargeCtrl *pChargeCtrl)
osDelay
(
20
);
osDelay
(
20
);
u32
ACContactorSetCount
=
0
;
u32
ACContactorSetCount
=
0
;
//TCUCurChgRecd.TCUChargeEnable = 1;
memset
(
&
BemMsg
,
0
,
sizeof
(
BemMsg
));
memset
(
&
CemMsg
,
0
,
sizeof
(
CemMsg
));
//memset(&BstMsg, 0, sizeof(BstMsg));
memset
(
&
CstMsg
,
0
,
sizeof
(
CstMsg
));
memset
(
&
BsdMsg
,
0
,
sizeof
(
BsdMsg
));
memset
(
&
CsdMsg
,
0
,
sizeof
(
CsdMsg
));
memset
(
&
BmvMsg
,
0xFF
,
sizeof
(
BmvMsg
));
memset
(
&
BmtMsg
,
0xFF
,
sizeof
(
BmtMsg
));
while
(
1
)
while
(
1
)
{
{
memset
(
&
BemMsg
,
0
,
sizeof
(
BemMsg
));
ChgPgnRecv
(
&
PgnRecv
);
ChgPgnRecv
(
&
PgnRecv
);
if
(
eSwSta_On
==
CcStatusRead
())
if
(
eSwSta_On
==
CcStatusRead
())
...
@@ -49,7 +60,7 @@ void ChgProChgIdle(StructChargeCtrl *pChargeCtrl)
...
@@ -49,7 +60,7 @@ void ChgProChgIdle(StructChargeCtrl *pChargeCtrl)
else
else
{
{
CcStatusChkTick
=
0
;
CcStatusChkTick
=
0
;
C
emMsg
.
Cem
.
Mult
=
0
;
C
hargeStopType
=
eChgStop_None
;
if
(
eSwSta_Off
==
CcStatusRead_B
())
if
(
eSwSta_Off
==
CcStatusRead_B
())
{
{
ACContactorSetCount
++
;
ACContactorSetCount
++
;
...
@@ -65,6 +76,8 @@ void ChgProChgIdle(StructChargeCtrl *pChargeCtrl)
...
@@ -65,6 +76,8 @@ void ChgProChgIdle(StructChargeCtrl *pChargeCtrl)
ACContactorSetCount
=
0
;
ACContactorSetCount
=
0
;
}
}
memset
(
&
BstMsg
,
0
,
sizeof
(
BstMsg
));
memset
(
&
BsmMsg
,
0
,
sizeof
(
BsmMsg
));
}
}
if
((
0
!=
CcStatusChkTick
)
&&
((
GetSystemTick
()
-
CcStatusChkTick
)
>
1500
))
if
((
0
!=
CcStatusChkTick
)
&&
((
GetSystemTick
()
-
CcStatusChkTick
)
>
1500
))
...
...
DcPillar/Src/Thread/Charge/ChgPro_WaitPillarReady.c
浏览文件 @
539128bd
...
@@ -28,7 +28,7 @@ s32 IsBatPnCorrect(void)
...
@@ -28,7 +28,7 @@ s32 IsBatPnCorrect(void)
{
{
if
(
0
==
ImdValue
.
Vaild
)
if
(
0
==
ImdValue
.
Vaild
)
return
0
;
return
0
;
if
((
0
==
ImdValue
.
PositVolt
)
&&
(
0
==
ImdValue
.
NegatVolt
)
&&
(
0
=
=
ImdValue
.
PnVolt
))
if
((
5
>=
ImdValue
.
PositVolt
)
&&
(
5
>=
ImdValue
.
NegatVolt
)
&&
(
5
>
=
ImdValue
.
PnVolt
))
return
-
1
;
return
-
1
;
return
1
;
return
1
;
}
}
...
...
DcPillar/Src/Thread/Charge_B/ChgPro_B_ChgIdle.c
浏览文件 @
539128bd
...
@@ -33,8 +33,20 @@ void ChgProChgIdle_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -33,8 +33,20 @@ void ChgProChgIdle_B(StructChargeCtrl_B *pChargeCtrl)
BmsCanInit_B
();
BmsCanInit_B
();
osDelay
(
20
);
osDelay
(
20
);
u32
ACContactorSetCount
=
0
;
u32
ACContactorSetCount
=
0
;
memset
(
&
BemMsg_B
,
0
,
sizeof
(
BemMsg
));
memset
(
&
CemMsg_B
,
0
,
sizeof
(
CemMsg
));
memset
(
&
BstMsg_B
,
0
,
sizeof
(
BstMsg
));
memset
(
&
CstMsg_B
,
0
,
sizeof
(
CstMsg
));
memset
(
&
BsdMsg_B
,
0
,
sizeof
(
BsdMsg
));
memset
(
&
CsdMsg_B
,
0
,
sizeof
(
CsdMsg
));
memset
(
&
BmvMsg_B
,
0xFF
,
sizeof
(
BmvMsg
));
memset
(
&
BmtMsg_B
,
0xFF
,
sizeof
(
BmtMsg
));
while
(
1
)
while
(
1
)
{
{
memset
(
&
BemMsg_B
,
0
,
sizeof
(
BemMsg
));
if
(
0
==
UserParam
.
ChgFun
.
Value
.
Num_B
)
if
(
0
==
UserParam
.
ChgFun
.
Value
.
Num_B
)
{
{
osDelay
(
1000
);
osDelay
(
1000
);
...
@@ -52,7 +64,9 @@ void ChgProChgIdle_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -52,7 +64,9 @@ void ChgProChgIdle_B(StructChargeCtrl_B *pChargeCtrl)
else
else
{
{
CcStatusChkTick
=
0
;
CcStatusChkTick
=
0
;
CemMsg_B
.
Cem
.
Mult
=
0
;
ChargeStopType_B
=
eChgStop_None
;
memset
(
&
BstMsg_B
,
0
,
sizeof
(
BstMsg
));
memset
(
&
BsmMsg_B
,
0
,
sizeof
(
BsmMsg
));
if
(
eSwSta_Off
==
CcStatusRead
())
if
(
eSwSta_Off
==
CcStatusRead
())
{
{
ACContactorSetCount
++
;
ACContactorSetCount
++
;
...
@@ -67,6 +81,8 @@ void ChgProChgIdle_B(StructChargeCtrl_B *pChargeCtrl)
...
@@ -67,6 +81,8 @@ void ChgProChgIdle_B(StructChargeCtrl_B *pChargeCtrl)
{
{
ACContactorSetCount
=
0
;
ACContactorSetCount
=
0
;
}
}
}
}
if
((
0
!=
CcStatusChkTick
)
&&
((
GetSystemTick
()
-
CcStatusChkTick
)
>
1500
))
if
((
0
!=
CcStatusChkTick
)
&&
((
GetSystemTick
()
-
CcStatusChkTick
)
>
1500
))
...
...
DcPillar/Src/Thread/Charge_B/ChgPro_B_WaitPillarReady.c
浏览文件 @
539128bd
...
@@ -28,7 +28,7 @@ s32 IsBatPnCorrect_B(void)
...
@@ -28,7 +28,7 @@ s32 IsBatPnCorrect_B(void)
{
{
if
(
0
==
ImdValue_B
.
Vaild
)
if
(
0
==
ImdValue_B
.
Vaild
)
return
0
;
return
0
;
if
((
0
==
ImdValue_B
.
PositVolt
)
&&
(
0
==
ImdValue_B
.
NegatVolt
)
&&
(
0
=
=
ImdValue_B
.
PnVolt
))
if
((
5
>=
ImdValue_B
.
PositVolt
)
&&
(
5
>=
ImdValue_B
.
NegatVolt
)
&&
(
5
>
=
ImdValue_B
.
PnVolt
))
return
-
1
;
return
-
1
;
return
1
;
return
1
;
}
}
...
...
DcPillar/Src/Thread/Thd_Mult.c
浏览文件 @
539128bd
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
#include "Drv_ImdJyc.h"
#include "Drv_ImdJyc.h"
#include "Drv_Dht12.h"
#include "Drv_Dht12.h"
#define XIAO_JU_TEST 0
void
ImdModeProcess
(
void
)
void
ImdModeProcess
(
void
)
{
{
static
EnumChargeProcess
ChgCurProcessLast
=
eChgPro_ChgIdle
;
static
EnumChargeProcess
ChgCurProcessLast
=
eChgPro_ChgIdle
;
...
@@ -704,6 +706,8 @@ void Thd_Mult(void const *parameter)
...
@@ -704,6 +706,8 @@ void Thd_Mult(void const *parameter)
{
{
PillarError_B
.
Value
.
SPD
=
1
;
PillarError_B
.
Value
.
SPD
=
1
;
PillarError
.
Value
.
SPD
=
1
;
PillarError
.
Value
.
SPD
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
}
/*网络故障判断 可禁用*/
/*网络故障判断 可禁用*/
if
((
0
==
CommuStatus
.
ConnectFlag
)
&&
(
1
==
UserParam
.
HadSigned
))
if
((
0
==
CommuStatus
.
ConnectFlag
)
&&
(
1
==
UserParam
.
HadSigned
))
...
@@ -1101,6 +1105,11 @@ void Thd_Mult(void const *parameter)
...
@@ -1101,6 +1105,11 @@ void Thd_Mult(void const *parameter)
extern
void
OnesCheckTcikHandle
(
void
);
extern
void
OnesCheckTcikHandle
(
void
);
OnesCheckTcikHandle
();
OnesCheckTcikHandle
();
}
}
#if XIAO_JU_TEST
extern
void
Test_XiaoJu
(
void
);
Test_XiaoJu
();
#endif
osDelay
(
25
);
osDelay
(
25
);
}
}
}
}
...
@@ -1146,3 +1155,330 @@ void OnesCheckTcikHandle(void)
...
@@ -1146,3 +1155,330 @@ void OnesCheckTcikHandle(void)
}
}
}
}
#if XIAO_JU_TEST
typedef
struct
{
u8
Temp
;
//桩内温度
u8
GunTemp
;
//枪温度
u8
GunTemp_B
;
//枪温度
u8
accIn
;
//输入电压
u8
Bcp
;
//
u8
Bcp_B
;
//
u8
Bsm
;
//
u8
Bsm_B
;
//
u8
DCModPhas
;
//模块缺相
u8
DCModPhas_B
;
//模块缺相
u8
DCModOutCuHi
;
//模块输出电流高
u8
DCModOutCuHi_B
;
//模块输出电流高
u8
DCModError
;
//
u8
DCModError_B
;
//
u8
DrainError
;
//泄放回路故障
u8
DrainError_B
;
//泄放回路故障
u8
DCMoudleOnTimeOut
;
//充电模块开机超时
u8
DCMoudleOnTimeOut_B
;
//充电模块开机超时
u8
DcVol
;
//输出过压
u8
DcVol_B
;
u8
OutShort
;
//输出短路
u8
OutShort_B
;
u8
Contactor
;
u8
Contactor_B
;
u8
UniContactor
;
u8
UniContactor_B
;
}
StructTestXiaoJu
;
StructTestXiaoJu
TestXiaoJu
=
{
0
};
u8
Test_XiaoJu_flag
=
0
;
void
Test_XiaoJu
(
void
)
{
static
u32
tick
=
0
;
if
((
GetSystemTick
()
-
tick
)
<
100
)
return
;
tick
=
GetSystemTick
();
if
(
Test_XiaoJu_flag
==
1
)
{
memset
(
&
TestXiaoJu
,
0
,
sizeof
(
StructTestXiaoJu
));
Test_XiaoJu_flag
=
0
;
ChargeError
.
Value
.
TempWarn
=
0
;
ChargeError_B
.
Value
.
TempWarn
=
0
;
ChargeError
.
Value
.
TempError
=
0
;
ChargeError_B
.
Value
.
TempError
=
0
;
ChargeError
.
Value
.
GunTempWarn
=
0
;
ChargeError
.
Value
.
GunTempError
=
0
;
ChargeError_B
.
Value
.
GunTempWarn
=
0
;
ChargeError_B
.
Value
.
GunTempError
=
0
;
setDcMoudleVoltChkCnt
(
0
);
CemMsg
.
Cem
.
Value
.
Bcp
=
0
;
ChargeError
.
Value
.
Bcp
=
0
;
CemMsg_B
.
Cem
.
Value
.
Bcp
=
0
;
ChargeError_B
.
Value
.
Bcp
=
0
;
ChargeError
.
Value
.
Bsm
=
0
;
ChargeError_B
.
Value
.
Bsm
=
0
;
InformainReport_A
.
InfRe
.
DCModPhas
=
0
;
InformainReport_A
.
InfRe
.
DCModOutCuHi
=
0
;
PillarError
.
Value
.
DCmodError
=
0
;
InformainReport_B
.
InfRe
.
DCModPhas
=
0
;
InformainReport_B
.
InfRe
.
DCModOutCuHi
=
0
;
PillarError_B
.
Value
.
DCmodError
=
0
;
ChargeError
.
Value
.
DrainError
=
0
;
ChargeError_B
.
Value
.
DrainError
=
0
;
ChargeError
.
Value
.
DCMoudleOnTimeOut
=
0
;
ChargeError_B
.
Value
.
DCMoudleOnTimeOut
=
0
;
ChargeError
.
Value
.
VoltOutError
=
0
;
ChargeError_B
.
Value
.
VoltOutError
=
0
;
InformainReport_A
.
InfRe
.
DcVolLo
=
0
;
InformainReport_B
.
InfRe
.
DcVolLo
=
0
;
PillarError
.
Value
.
OutShort
=
0
;
PillarError_B
.
Value
.
OutShort
=
0
;
PillarError
.
Value
.
UniContactor
=
0
;
PillarError
.
Value
.
UniContactor1
=
0
;
PillarError
.
Value
.
UniContactor2
=
0
;
PillarError_B
.
Value
.
UniContactor
=
0
;
PillarError_B
.
Value
.
UniContactor1
=
0
;
PillarError_B
.
Value
.
UniContactor2
=
0
;
PillarError
.
Value
.
Contactor
=
0
;
PillarError
.
Value
.
Contactor1
=
0
;
PillarError
.
Value
.
Contactor2
=
0
;
PillarError_B
.
Value
.
Contactor
=
0
;
PillarError_B
.
Value
.
Contactor1
=
0
;
PillarError_B
.
Value
.
Contactor2
=
0
;
}
if
(
TestXiaoJu
.
Temp
==
1
)
{
//过温故障
ChargeError
.
Value
.
TempError
=
1
;
ChargeError_B
.
Value
.
TempError
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
else
if
(
TestXiaoJu
.
Temp
==
2
)
{
//过温告警
ChargeError
.
Value
.
TempWarn
=
1
;
ChargeError_B
.
Value
.
TempWarn
=
1
;
}
if
(
TestXiaoJu
.
GunTemp
==
1
)
{
//过温故障
ChargeError
.
Value
.
GunTempError
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
else
if
(
TestXiaoJu
.
GunTemp
==
2
)
{
ChargeError
.
Value
.
GunTempWarn
=
1
;
}
if
(
TestXiaoJu
.
GunTemp_B
==
1
)
{
//过温故障
ChargeError_B
.
Value
.
GunTempError
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
else
if
(
TestXiaoJu
.
GunTemp_B
==
2
)
{
ChargeError_B
.
Value
.
GunTempWarn
=
1
;
}
if
(
TestXiaoJu
.
accIn
==
1
)
{
//交流输入过压
setDcMoudleVoltChkCnt
(
5
);
}
else
if
(
TestXiaoJu
.
accIn
==
2
)
{
//交流输入欠压
setDcMoudleVoltChkCnt
(
-
5
);
}
if
(
TestXiaoJu
.
Bcp
==
1
)
{
//超时
CemMsg
.
Cem
.
Value
.
Bcp
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
else
if
(
TestXiaoJu
.
Bcp
==
2
)
{
//异常
ChargeError
.
Value
.
Bcp
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
Bcp_B
==
1
)
{
//超时
CemMsg_B
.
Cem
.
Value
.
Bcp
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
else
if
(
TestXiaoJu
.
Bcp_B
==
2
)
{
//异常
ChargeError_B
.
Value
.
Bcp
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
Bsm
==
1
)
{
//超时
ChargeError
.
Value
.
Bsm
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
Bsm_B
==
1
)
{
//超时
ChargeError_B
.
Value
.
Bsm
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
DCModPhas
==
1
)
{
InformainReport_A
.
InfRe
.
DCModPhas
=
1
;
}
if
(
TestXiaoJu
.
DCModPhas_B
==
1
)
{
InformainReport_B
.
InfRe
.
DCModPhas
=
1
;
}
if
(
TestXiaoJu
.
DCModOutCuHi
==
1
)
{
InformainReport_A
.
InfRe
.
DCModOutCuHi
=
1
;
}
if
(
TestXiaoJu
.
DCModPhas_B
==
1
)
{
InformainReport_B
.
InfRe
.
DCModOutCuHi
=
1
;
}
if
(
TestXiaoJu
.
DCModError
==
1
)
{
PillarError
.
Value
.
DCmodError
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
DCModError_B
==
1
)
{
PillarError_B
.
Value
.
DCmodError
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
DrainError
)
{
ChargeError
.
Value
.
DrainError
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
DrainError_B
)
{
ChargeError_B
.
Value
.
DrainError
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
DCMoudleOnTimeOut
)
{
ChargeError
.
Value
.
DCMoudleOnTimeOut
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
DCMoudleOnTimeOut_B
)
{
ChargeError_B
.
Value
.
DCMoudleOnTimeOut
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
DcVol
==
1
)
{
ChargeError
.
Value
.
VoltOutError
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
else
if
(
TestXiaoJu
.
DcVol
==
2
)
{
InformainReport_A
.
InfRe
.
DcVolLo
=
01
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
DcVol_B
==
1
)
{
ChargeError_B
.
Value
.
VoltOutError
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
else
if
(
TestXiaoJu
.
DcVol_B
==
2
)
{
InformainReport_B
.
InfRe
.
DcVolLo
=
01
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
OutShort
==
1
)
{
PillarError
.
Value
.
OutShort
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
OutShort_B
==
1
)
{
PillarError_B
.
Value
.
OutShort
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
Contactor
==
1
)
{
PillarError
.
Value
.
Contactor
=
1
;
PillarError
.
Value
.
Contactor1
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
else
if
(
TestXiaoJu
.
Contactor
==
2
)
{
PillarError
.
Value
.
Contactor
=
1
;
PillarError
.
Value
.
Contactor2
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
Contactor_B
==
1
)
{
PillarError_B
.
Value
.
Contactor
=
1
;
PillarError_B
.
Value
.
Contactor1
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
else
if
(
TestXiaoJu
.
Contactor_B
==
2
)
{
PillarError_B
.
Value
.
Contactor
=
1
;
PillarError_B
.
Value
.
Contactor2
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
UniContactor
==
1
)
{
PillarError
.
Value
.
UniContactor
=
1
;
PillarError
.
Value
.
UniContactor
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
else
if
(
TestXiaoJu
.
UniContactor
==
2
)
{
PillarError
.
Value
.
UniContactor
=
1
;
PillarError
.
Value
.
UniContactor
=
1
;
TCUCurChgRecd
.
TCUChargeEnable
=
0
;
}
if
(
TestXiaoJu
.
UniContactor_B
==
1
)
{
PillarError_B
.
Value
.
UniContactor
=
1
;
PillarError_B
.
Value
.
UniContactor
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
else
if
(
TestXiaoJu
.
UniContactor_B
==
2
)
{
PillarError_B
.
Value
.
UniContactor
=
1
;
PillarError_B
.
Value
.
UniContactor
=
1
;
TCUCurChgRecd_B
.
TCUChargeEnable
=
0
;
}
}
#endif
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论