www.gusucode.com > vnt 源码程序 matlab案例代码 > vnt/demoVNT_DeployCANMessageGUI.m

    %% Deploy a CAN Message GUI
% This example shows you how to use Vehicle Network Toolbox(TM) and the 
% MATLAB Compiler to deploy a GUIDE GUI capable of sending and receiving 
% CAN messages.
% 
% Copyright 2011-2016 The MathWorks, Inc.

%%  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 <docid:vnt_examples.example-ex32953163>.