Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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.

Open the Compiler

Open the Compiler with the MATLAB command deploytool. Click "Application Compiler" to build a standalone application.

Create the Deployment Project

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

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 the plus icon to add the main file on the toolstrip.

  • Select demoVNT_ManageCANMessageGUIFig.m.

Add the Supporting Files to the Deployment Project

Set the other files to be included in the project:

  • Click the plus icon under "Files required for your application to run".

  • 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.

Save and Build the Deployment Project

Save the project to a location of your choosing. On the toolstrip, click "Package" 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 "for_testing" 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 example Manage CAN Message Data in a GUI.

Was this topic helpful?