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 with the MATLAB command
deploytool. Click "Application Compiler" to build a standalone application.
Name the project with a unique name such as "VNTExampleGUIDeployProject".
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.
Set the other files to be included in the project:
Click the plus icon under "Files required for your application to run".
demoVNT_ManageCANMessageGUIFig.fig which is the GUI figure.
demoVNT_ManageCANMessageGUI.dbc which is the CAN database file used in the GUI to encode and decode CAN messages.
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.
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.
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.