User Tools

Site Tools


CAN Library


This library leverages easy use of National Instrument NI-XNET CAN-Bus devices. Functionality for operation of Unified Diagnostic Services (UDS) is included.

The libary is optimized for use with National Instruments TestStand.


A license is required to use this library. Please contact DriveTest GmbH for more information.

System Requirements

  • Windows PC. The Windows version required is determined by the availability of the required LabVIEW Run-Time Engine.
  • LabVIEW Run-Time Engine matching the target version of the DriveTest CAN Library
  • National Instruments NI-XNET driver. The library has been tested with NI-XNET 14.1. Other versions are likely to work but this is not guaranteed.
  • National Instruments NI-XNET CAN-Bus device
  • National Instruments Automotive Diagnostic Command Set Run-Time. Version 15.0 is tested, newer versions should work.

Theory of Operation

The library contains two separate functional parts. They are contained in the LabVIEW classes “CAN.lvclass” and “Diagnostics.lvclass”:

  1. CAN Bus functionality: Sending and receiving CAN frames and signals
  2. UDS functionality: Sending UDS Request and receiving UDS Responses


It is possible to send and receive CAN frames and signals in a “last value” manner. The frames and signals for sending and receiving are predetermined by creating a custom CAN database in Fibex format. DriveTest provides a tool to create a custom database from an existing database.

Custom Database

The custom database contains the two clusters “send” and “receive”. The send cluster contains all the frames and signals that you wish to send with your NI-XNET device and the receive cluster holds the frames and signals that you want to read from the CAN bus.

With the CAN Library, it is possible to work with CAN data either as a frame or as a signal. The way you access the data is determinded by adding a frame (without any signals) or a signal (part of a frame) to the custom database.

CAN Functionality

Flow of Use

CAN Flow of Use

The chart above contains functions which match VIs in the CAN class of the CAN Library. Their expected course of operation is depicted. The input (read from CAN Bus) and output (write on CAN Bus) branches run independently from each other but share initialize and shutdown functionality.

can.txt · Last modified: 2015/11/19 14:27 by fabian