why the Bus Status transit from 'ErrorActive' to 'BusOff' when use VNT to send message

5 次查看(过去 30 天)
Hello,
I created a GUI based on canTool currently to receive and send CAN message by VNT.
It works well when I only reveive messages with the bus status is 'ErrorActive'. The channel information displays as below:
Summary of CAN Channel using 'Vector' 'VN1610 1' Channel 1.
Channel Parameters: Bus Speed is 500000.
Bus Status is 'ErrorActive'.
Transceiver name is 'On board CAN 1051cap(Highspeed)'.
Serial Number of this device is 57811.
Initialization access is not allowed.
'AEVE_CCAN_ALLNEW.dbc' database is attached.
Status: Online.
14134 messages available to receive.
0 messages transmitted since last start.
22559 messages received since last start.
But the bus status transits to 'BusOff' after transmitted a few messages, such as 3~ 80 messages randomly, with the channel info as below:
Summary of CAN Channel using 'Vector' 'VN1610 1' Channel 1.
Channel Parameters: Bus Speed is 500000.
Bus Status is 'BusOff'.
Transceiver name is 'On board CAN 1051cap(Highspeed)'.
Serial Number of this device is 57811.
Initialization access is not allowed.
'CCAN_ALLNEW.dbc' database is attached.
Status: Online.
0 messages available to receive.
6 messages transmitted since last start.
44717 messages received since last start.
The transmit scripes is as below and it is callback in updateDisplay(obj, ~, ~)
msgBalCmd = canMessage(obj.Database,'B2C_CsuCtrl');
csuIdx = uint8(mod(obj.updatePeriodTimes,6)+1);
msgBalCmd.Signals.CsuIndex = csuIdx;
msgBalCmd.Signals.CSU_1_8_Cmd = obj.Cell1_8_bal(:,csuIdx);
msgBalCmd.Signals.CSU_9_16_Cmd = obj.Cell9_16_bal(:,csuIdx);
msgBalCmd.Signals.CSU_17_24_Cmd = obj.Cell17_24_bal(:,csuIdx);
transmit(obj.Channel,msgBalCmd);
Can you tell me why the Bus Status transit from 'ErrorActive' to 'BusOff' when send message and how to modifiy it to make the CAN bus transmition properly?
Thank you
GAO

采纳的回答

gao
gao 2019-10-28
It seems I got the reason why the bus transit from 'ActiveError' to 'Busoff'. The reason is there are 2 nodes which send the SAME ID to the bus. The bus will off after a while.
Anyway, Thanks!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Vehicle Network Toolbox 的更多信息

标签

产品


版本

R2015b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by