MATLAB: CanHWInfo does not detect Kvaser Leaf Light

MATLAB: CanHWInfo does not detect Kvaser Leaf Light

canhwinfodetectdevicekvaserNetworknotreadyrestarttoolboxvehiclevehicle network toolboxvnt

When I plug in a Kvaser Leaf Light tool, MATLAB R2016a shows a message saying “Vehicle Network Toolbox has detected a supported Kvaser device. The device is ready for use. Get started with canHWInfo.”
However, I am unable to use it through the following command:
>> canChannel('Kvaser', '1', 1)
I am only able to use it if I restart MATLAB. Is it the expected behavior?

Best Answer

  • The reason why Kvaser leaf light is detected when you restart MATLAB is because not all vendor APIs work the same with MATLAB. Kvaser requires MATLAB to be restarted when devices are dynamically removed/attached. A simple restart of MATLAB or ensuring to plug the device in without MATLAB running then staring it should see the Kvaser devices detected and working properly.
    This note has been included in the documentation as of MATLAB R2017b.
  • Add a Comment

    Your email address will not be published. Required fields are marked *