Main Content

Set Up CAN Communication with Target Hardware

This section describes how to set up CAN communication with C2000 target hardware.

Follow these steps to set up CAN communication between the target hardware and your host computer.

  1. Make sure that the Vector Hardware is installed properly in the Windows® Device Manager.

  2. Download and install the latest version of the Vector XL Library from the Vector Web site. After installing the library, copy the file vxlapi64.dll from the installation folder (for example C:\Softwares\Vector_Driver_Setup_9_3_0\Common) to the windows root\system32 folder.

    This folder name may vary depending on the Windows OS (for example C:\Windows\Sys32).

  3. Run the vcanconf.exe in the vector driver installation.

  4. Right-click on the application and select "Add application".

    1. Name the application as ‘MATLAB’ and keep the default settings.

    2. Right-click the first CAN piggy hardware device, select MATLAB, and pick CAN 1.

    3. Right-click the first CAN piggy hardware device again and click Default baud rate to change the baud.

      This baud has to match your Simulink model CAN baud that you can change using the Target Preferences settings.

      The Vector Hardware Config window is shown.

  5. Open the model. Go to Configuration Parameters dialog box, select the desired Hardware board and verify the CAN baud rate. The default baud is 1 Mbits/sec.

    CAN communication is now set up between your host computer and the C2000 target hardware. To know more about the CAN communication using eCAN, see CAN Communication Using eCAN Blocks