Deploy a CAN Message GUI

This example shows you how to use Vehicle Network Toolbox™ and the MATLAB Compiler to deploy a GUIDE GUI capable of sending and receiving CAN messages.

Launch the Deploy Tool

Open the deploytool.

deploytool

Create the Deployment Project

Configure the settings for the project:

  • Name the project with a unique name such as "VNTExampleGUIDeployProject.prj".

  • Select a location for the deployed files.

  • Build the project type as "Windows Standalone Application".

Add the Main GUI File to the Deployment Project

Set the main file for the project as the generated MATLAB file for the GUI:

  • Click "Add main file".

  • Browse to toolbox\vnt\vntdemos.

  • Select demoVNT_ManageCANMessageGUIFig.m.

Add the Shared Resource and Helper Files to the Deployment Project

Set the other files to be included in the project:

  • Click "Add files/directories".

  • Browse to toolbox\vnt\vntdemos.

  • Add demoVNT_ManageCANMessageGUIFig.fig which is the GUI figure.

  • Add demoVNT_ManageCANMessageGUI.dbc which is the CAN database file used in the GUI to encode and decode CAN messages.

Build the Deployment Project

On the Deployment Project toolbar, click "Build" to generate the standalone executable. This process may take several minutes.

Run the GUI as a Standalone Executable

The Deployment Tool builds the project at the location specified earlier:

  • Browse to the "distrib" folder in this location to find the standalone executable.

  • Run this file to execute the GUI. Systems without MATLAB need the MATLAB Compiler Runtime Library installed.

Experiment with CAN Messaging

On the GUI, click Send Messages or Repeat Messages to generate CAN message traffic. The GUI will receive, decode, and display signal values from those messages. For more information on how the GUI was created, see the "Manage CAN Message Data in a GUI" example.

Was this topic helpful?