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