Unable to start channel CAN communication

11 次查看(过去 30 天)
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
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 CenterFile Exchange 中查找有关 Install Products 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by