xPC Target    

Selecting a CAN Library

Before you can build a target application using CAN driver blocks, you need to select the correct CAN library. The different CAN libraries are listed and selected in the xPC Target environment setup. The xPC Target environment contains a property that allows you to control the configuration and behavior of the supported CAN boards.

It is assumed that the xPC Target environment is already set up and working correctly for models that do not use CAN drivers. If you have not already done so, please confirm that you are able to build and run a target application that does not include any CAN blocks.

You can view CAN driver settings using the function getxpcenv or using the xPC Target Setup window.

  1. In the MATLAB command window, type
  1. The xPC Target Setup dialog box opens.

  1. From the CANLibrary list, select 200ISA, 527ISA, 1000PCI, or 1000MB PCI
  1. The default value for the CAN Library list is none, which indicates that CAN devices are not enabled. If your are using CAN devices, use the CANLibrary list to select your CAN controller.

    Definition of the correct CAN library in the setup environment is crucial.

  1. After changing any selections in the xPC Target Setup window, be sure to update the xPC Target environment by clicking the Update button.

For more detailed information about using the xPC Target Setup window, see Software Environment.

Alternatively, you can select the CAN Library using the corresponding command-line functions. See Changing Environment Properties with a Command-Line Interface.


  CAN-AC2-104 CAN Library Property Values