CAN-FD Example

This CAN-FD sample project calculates the CRC according to AUTOSAR End-to-End-Profile 2. In this profile, special Data-IDs are included in the .dbc file. These are used to calculate the CRC depending on the counter value and the Data-ID.

To deploy this example, you must connect automotive CAN Flexible Data-Rate hardware to your system.

You must use two interconnected CAN ports. Configure their names in NI-MAX as CAN1 and CAN2.

You can find a list of CAN interface instruments on the NI store page for CAN hardware at ni.com/shop.

In VeriStand

How to Import the Project

After you install the toolkit, navigate to the following path to locate the example folder: %Public%\Documents\National Instruments\NI VeriStand\Examples.
Note The directory depends on the VeriStand version already installed. If more than one version of VeriStand is installed on your computer and you installed the toolkit for all VeriStand versions, the example is available for each version.
After VeriStand starts, import the example project to add it to VeriStand. Use one of the following methods to locate and import your project:
  • Click Browse.
  • Navigate to File » Open Project.
  • Press <Ctrl+O>.

Look for the project file NI-VCOM_CAN-FD_Example.nivsproj in the example folder.

Double-click the project to open the Project Explorer window. To run the project, press <F5> or click Deploy.

In the UI Manager, some signals are already available to show some of the features the toolkit has. You can import more signals by pressing <CTRL+M> and selecting a signal in the System Definition panel.
Note Starting in VeriStand 2019, you can import a complete folder by dragging it from the System Definition panel into the Workspace.

Select a Different Target

Specify the Operating System and IP Address parameters in VeriStand for your target.
Note To deploy the project on a different target, update the Operating System and IP Address parameters.

In LabVIEW

How to Open the Project

After you install the toolkit, navigate to the following path to locate the example folder: %Program Files%\National Instruments\LabVIEW\examples\Vehicle Communication Toolkit\VCOM Full Examples.

This example demonstrates how to use the API for CAN in signals single point mode. You can open the Configuration Tree Browsing.vi example in parallel to have better access to all signals. For more information, refer to Configuration Tree Browsing for LabVIEW.

A simulated ACC ECU sends the message ACC_ESP_E2E_PR2 on port CAN1 to a simulated ESP ECU on port CAN2.

To view all traffic, run the NI-XNET Bus Monitor as a subordinate session on either CAN1 or CAN2.