Unable to start channel CAN communication

21 ビュー (過去 30 日間)
al
al 2025 年 3 月 28 日
回答済み: Maneet Kaur Bagga 2025 年 4 月 2 日
Hi, i'm using this demo to communicate with my CAN adapter
canChannelObj = canChannel('PEAK-System', 'PCAN_USBBUS1');
start(canChannelObj);
But i constantly get this error: Unable to start channel.
In PCan View the communications start and all the drivers are installed.

回答 (1 件)

Maneet Kaur Bagga
Maneet Kaur Bagga 2025 年 4 月 2 日
Hi,
As per my understanding, you are using MATLAB to interface with a "PEAK-System PCAN-USB" using the Vehicle Network Toolbox. Please refer to the following as a possible workaround to the error :
  • The "canChannel" function requires Vehicle Network Toolbox. You can check if the toolbox is installed correctly using the following command.
ver('vehicle_network_toolbox')
  • Use MATLAB's "unload" library function to reset the interface. Refer to the following command for the same.
unloadlibrary('PCANBasic')
You can also refer to the following MathWorks documentation for better understanding the function.
  • Also, check if you have "PCAN-Basic API" installed along with "PCAN-View".
  • You adapter might be listed under a different name, run "canChannelList" in MATLAB to check the available channels.
Hope this helps!

カテゴリ

Help Center および File ExchangeInstall Products についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by