MATLAB Vehicle Network Toolbox cannot send CAN messages on physical channels with Vector's hardware VN1610.

15 Ansichten (letzte 30 Tage)
When using the vehicle network toolbox(Matlab 2024a update 6) with the vector's hardware VN1610, if choosing to use the real physical channel instead of the virtual channel, I'm not able to turn off the canChannel.SilentMode even if the canChannel.InitializationAccess is 1, which caused the channel only able to receive messages but cannot send out any messages. I tried to turn the SilentMode off with commands below:
>> txCh_I
txCh_I =
Channel with properties:
Device Information
DeviceVendor: 'Vector'
Device: 'VN1610 1'
DeviceChannelIndex: 2
DeviceSerialNumber: 530636
ProtocolMode: 'CAN'
Status Information
Running: 0
MessagesAvailable: 0
MessagesReceived: 0
MessagesTransmitted: 0
InitializationAccess: 1
InitialTimestamp: [0×0 datetime]
FilterHistory: 'Standard ID Filter: Allow All | Extended ID Filter: Allow All'
Channel Information
BusStatus: 'N/A'
SilentMode: 1
TransceiverName: 'On board CAN 1051cap(Highspeed)'
TransceiverState: 0
ReceiveErrorCount: 0
TransmitErrorCount: 0
BusSpeed: 250000
SJW: 1
TSEG1: 10
TSEG2: 5
NumOfSamples: 1
Other Information
Database: []
UserData: []
>> txCh_I.SilentMode = false
txCh_I =
Channel with properties:
Device Information
DeviceVendor: 'Vector'
Device: 'VN1610 1'
DeviceChannelIndex: 2
DeviceSerialNumber: 530636
ProtocolMode: 'CAN'
Status Information
Running: 0
MessagesAvailable: 0
MessagesReceived: 0
MessagesTransmitted: 0
InitializationAccess: 1
InitialTimestamp: [0×0 datetime]
FilterHistory: 'Standard ID Filter: Allow All | Extended ID Filter: Allow All'
Channel Information
BusStatus: 'N/A'
SilentMode: 1
TransceiverName: 'On board CAN 1051cap(Highspeed)'
TransceiverState: 0
ReceiveErrorCount: 0
TransmitErrorCount: 0
BusSpeed: 250000
SJW: 1
TSEG1: 10
TSEG2: 5
NumOfSamples: 1
Other Information
Database: []
UserData: []
It's wierd that the channel has opened successfully but SilentMode is set to 1 defaultly, and the initial access is true but cannot change the SilentMode without giving any error or indication. When I dig the issue further, I found that this issue only happens on the hardware VN1610 with the latest Vector driver(version 24.20.10).
After rolling-back the driver to a previous version, the issue just disappeared:
Vehicle Network Toolbox has detected a supported Vector device. To connect to this device:
1. Download and install the latest device driver from the Vector website.
2. Verify device readiness with canChannelList.
>> txCh_I
txCh_I =
Channel with properties:
Device Information
DeviceVendor: 'Vector'
Device: 'VN1610 1'
DeviceChannelIndex: 1
DeviceSerialNumber: 530636
ProtocolMode: 'CAN'
Status Information
Running: 0
MessagesAvailable: 150
MessagesReceived: 0
MessagesTransmitted: 0
InitializationAccess: 1
InitialTimestamp: 28-Sep-2024 06:28:43
FilterHistory: 'Standard ID Filter: Allow All | Extended ID Filter: Allow All'
Channel Information
BusStatus: 'N/A'
SilentMode: 0
TransceiverName: 'On board CAN 1051cap(Highspeed)'
TransceiverState: 0
ReceiveErrorCount: 0
TransmitErrorCount: 0
BusSpeed: 500000
SJW: 1
TSEG1: 4
TSEG2: 3
NumOfSamples: 1
Other Information
Database: []
UserData: []
Please take a look and help check this. Thanks!

Akzeptierte Antwort

Umar
Umar am 29 Sep. 2024

Hi Yongfu Zhang,

You mentioned, When using the vehicle network toolbox(Matlab 2024a update 6) with the vector's hardware VN1610, if choosing to use the real physical channel instead of the virtual channel, I'm not able to turn off the canChannel.SilentMode even if the canChannel.InitializationAccess is 1, which caused the channel only able to receive messages but cannot send out any messages. I tried to turn the SilentMode off with commands below: …………Please take a look and help check this. Thanks!

Please see my response to your comments below. I did some research and review the documentations provided at the links listed below.

https://www.mathworks.com/help/vnt/ug/can.channel-properties.html

https://www.mathworks.com/help/vnt/ug/can.channel-properties.html

https://www.mathworks.com/help/vnt/ug/configure-silent-mode.html

I found out that the SilentMode property of the CAN channel is designed to allow observation of network traffic without sending messages. In your case, despite having InitializationAccess set to 1 (indicating that the channel should be fully controllable), you are unable to change SilentMode from 1 to 0. This issue is particularly concerning as it limits your ability to send messages through the channel. So, the potential causes could be related to several reasons listed below.

Driver Compatibility: The fact that you mentioned that rolling back the driver resolves the issue indicates a potential compatibility problem between the latest Vector driver (24.20.10) and MATLAB's Vehicle Network Toolbox. Driver updates can sometimes introduce bugs or change how properties are managed.

Device Initialization: Make sure that your device is properly initialized before attempting to modify properties. Although InitializationAccess indicates control, it is possible that other initialization steps have not been executed correctly.

MATLAB Session State: Sometimes, MATLAB may retain settings from previous sessions. It might be beneficial to clear your workspace or restart MATLAB entirely before re-initializing your CAN channel.

So, my recommendations to resolve these issues will be continue using the previous driver version until an updated version resolves the issue. Since this seems like a driver-related bug, reaching out to Vector's technical support may provide insights into whether others have reported similar issues and if there are patches or workarounds available.

Now let me address the query regarding the inability to detect the VN1630A device using either canChannelList or the CAN Explorer App can be frustrating and suggests deeper issues related to driver installation or configuration. I would recommend the following resolution steps to resolve this problem.

Driver Installation: Make sure that you have installed the correct version of the XL Driver Library and Vector drivers for Windows 10/11 as outlined in MathWorks' guidance:

  • Follow up with specific instructions for copying DLL files as mentioned in their support documentation.

Check Device Status: Use Windows Device Manager to verify that your VN1630A device is recognized by your operating system and is functioning correctly without errors.

MATLAB Configuration: After ensuring proper installation and connectivity, restart MATLAB and run:

   canChannelList

This command should now detect your device if everything is configured correctly. For more information on this command, please refer to

https://www.mathworks.com/help/vnt/ug/canchannellist.html

Consult Documentation: Reference MATLAB's documentation on [connecting hardware devices]( https://www.mathworks.com/matlabcentral/answers/891497-why-can-t-i-connect-to-my-hardware-device-from-matlab ) for any additional troubleshooting steps specific to your configuration.

Hope this helps.

  2 Kommentare
Yongfu Zhang
Yongfu Zhang am 3 Okt. 2024

I've also submitted my to Mathworks and they confirmed that there is a defect on Vector side about their latest driver.
Thanks for your quick answer!

Umar
Umar am 4 Okt. 2024
Hi @Yongfu Zhang,
Thank you for your prompt update regarding the defect confirmed by Mathworks on the Vector side. I appreciate your diligence in addressing this matter. Thank you once again for your swift response.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by