The NI-VCOM Toolkit includes LabVIEW and C examples using various automotive communication protocols.

To locate examples, launch the NI Example Finder for LabVIEW and search for VCOM or navigate to the following location: %Program Files%\National Instruments\LabVIEW\examples\Vehicle Communication Toolkit.

The examples require you to activate the NI-VCOM Toolkit with an appropriate license.

Demo ECU

Navigate to the following path to locate the Demo ECU Simulator: %Public%\Documents\National Instruments\NI-VCOM\Examples\Demo ECU.

The simulator is a LabVIEW application that demonstrates the following features of the NI-VCOM Toolkit:
  • Read and write operations for signals and messages with various automotive communication protocols.
  • Support of CAN, LIN and Automotive Ethernet protocols.
  • Support of AUTOSAR XML, DBC and LDF Network Descriptors.

To launch the Demo ECU Simulator, double-click ECU Simulator.exe.

Running C Examples

Navigate to the following path to locate the C example: %Public%\Documents\National Instruments\NI-VCOM\Examples\MS Visual C.

You must install the following tools:
  • CMake for Windows
  • C++ Compiler and Build Toolchain – For Windows, you can use Build Tools for Visual Studio. The version most recently tested is Build Tools for Visual Studio 2022. This version comes by default if you have already installed the appropriate Visual Studio version. If you choose to use VS Code instead, you must install the build toolchain manually.
Additionally, if you are using VS Code, NI recommends installing the following VS Code extensions published by Microsoft:
  • C/C++
  • CMake Tools
  • Complete the following steps to build NI-VCOM C examples using Visual Studio:
    1. Open Visual Studio and select Continue without code.
    2. Navigate to File » Open » CMake.
    3. Navigate to %Public%\Documents\National Instruments\NI-VCOM\Examples\MS Visual C and select the CMakeLists.txt file.
    4. Select Build All from the Build menu after the configuration loads.
  • Complete the following steps to build NI-VCOM C examples using Visual Studio Code:
    1. Open Visual Studio Code and select Open Folder.
    2. Navigate to %Public%\Documents\National Instruments\NI-VCOM\Examples\MS Visual C and open that folder in Visual Studio Code.
    3. Press <Ctrl+Shift+P> after the folder opens.
    4. Type CMake: Build, then select this command to start the build. You can also use <F7> for this step.
    5. Choose the appropriate x64 architecture compiler toolkit in Visual Studio Code. The NI-VCOM C examples only build the x64 target, so you must select an x64 compiler toolkit.
    6. Ensure the build starts and eventually completes with no errors. This may take a few minutes.
Find the result of the build in %Public%\Documents\National Instruments\NI-VCOM\Examples\MS Visual C\bin64. Two applications are built:
  • Demo ECU Communication—This example shows how to communicate with the shipping Demo ECU in the NI-VCOM Toolkit using the C++ API.
  • Restbus Communication—This example shows how to perform simple restbus communication between two peers/nodes from the same application using the C++ API.

To get help using the examples, execute an example application with the argument –- help from the command line.