MATLAB: Vehicle Networking Toolbox setup

canmexusbvehicle network toolbox

I have the Vehicle Networking toolbox for MATLAB and I am trying to make it recognize a Vector CANcaseXL. I have installed the necessary drivers for the CANcaseXL. However, I cannot establish an open channel between the toolbox and the CANcase. Here is the warning message that I received in the Matlab Command window:
>> info = canHWInfo
CAN Devices Detected:
Kvaser Devices:
Virtual 1 Channel 1
To connect, use - canChannel('Kvaser', 'Virtual 1', 1)
Virtual 1 Channel 2
To connect, use - canChannel('Kvaser', 'Virtual 1', 2)
Use GET on the output of CANHWINFO for more information.
>> canch1 = canChannel('Vector','CANcaseXL 1',1)
Warning: The following error was caught while executing 'can.vector.Channel' class destructor:
Invalid MEX-file 'C:\Program
Files\MATLAB\R2010bSP1\toolbox\vnt\vnt\mexVectorXLDriverLibrary.mexw32': The specified
module could not be found.
I checked the C:\Program Files\MATLAB\R2010bSP1\toolbox\vnt\vnt\ directory and found the right file (mexVectorXLDriverLibrary.mexw32) that needs to be there. If everything was working properly this is what I would see:
>> info = canHWInfo
CAN Devices Detected:
Vector Devices:
CANcaseXL 1 Channel 1 (SN: 24365)
To connect, use - canChannel('Vector', 'CANcaseXL 1', 1)
CANcaseXL 1 Channel 2 (SN: 24365)
To connect, use - canChannel('Vector', 'CANcaseXL 1', 2)
Virtual 1 Channel 1
To connect, use - canChannel('Vector', 'Virtual 1', 1)
Virtual 1 Channel 2
To connect, use - canChannel('Vector', 'Virtual 1', 2)
Kvaser Devices:
Virtual 1 Channel 1
To connect, use - canChannel('Kvaser', 'Virtual 1', 1)
Virtual 1 Channel 2
To connect, use - canChannel('Kvaser', 'Virtual 1', 2)
Use GET on the output of CANHWINFO for more information.
I called Matlab technical support and they said that this is a Vector driver setup issue. Then I called Vector and they said it was a Matlab issue, help!

Best Answer

Which drivers are you using? What operating system? Some suggestions:
  1. Make sure that you are using the latest drivers from the Vector website.
  2. Make sure to download the latest XL Driver library.
  3. Make sure that vxlapi.dll is on the system path by adding C:\XL Driver Library\bin to the system path in the Environment Variables.
  4. In the control panel, make sure that the hardware under Vector Hardware is listed and working properly, and that the driver is pointing to the right location.
Also, how old is your CANcase XL? Are using USB 2.0 or 3.0 on your machine? Some older CANcaseXL only work with USB 2.0 and so won't work properly on newer machines. Vector can provide a flash update that updates the boot code in the CANCaseXL to work with both USB 2.0 and 3.0.
HTH,
Arnaud