Main Content

Create Standalone Instrument Panel App by Using Application Compiler

After creating an instrument panel app to serve as an interface to your real-time application, you can share a standalone executable instrument panel and installer with others, such as test engineers. For more information about developing an App Designer instrument panel for your real-time application, see Create App Designer Instrument Panels by Using Simulink Real-Time Components.

When you share a standalone executable instrument panel and real-time application, the people with whom you share it with must be using a target computer with the same version of RTOS software and configuration as you used to compile the instrument panel. This workflow uses the Application Compiler tool to package the instrument panel app.

The standalone executable application is not cross platform, and the executable type depends on the platform (for example, Windows®) on which it was generated.

Package App by Using Application Compiler

After developing a real-time application and an App Designer instrument panel app that provides and interface to the real-time application, you can use the Application Compiler to package the app.

Open MATLAB® and set the current folder to the folder in which you are creating the standalone executable instrument panel.

Select Apps > Application Compiler. For more information, see Application Compiler (MATLAB Compiler).

Populate the Application Compiler dialog box with information for the application compiler project. The image shows the example selections for project MyInstPanel_slrt_ex_osc.prj. The compiler settings are:

  • Main file: myInstPanel_slrt_ex_osc.mlapp

  • Application Name: myInstPanel

  • Author Name: J. Doe

  • Email: jdoe@mycompany.com

  • Company: MyCompany

  • Summary: This standalone application provides an interface to a real-time application.

  • Description: This standalone application provides an interface to a real-time application.

  • Default installation folder: %ProgramFiles%\MyCompany\myAppTesting\

  • Do not display the Windows Command Shell (console) for execution: Yes

Your choice of whether to select Runtime downloaded or Runtime included packaging options for the project influences the length of time for packaging and for installing the application. If the development computer that will be running the standalone executable instrument panel has internet access, select downloaded. If not, select included.

For Suggested Support Packages, select the Simulink Real-Time Target Support Package.

For Files required for your application to run, select the real-time application MLDATX file.

window-app-compiler-instrument-panel-slrt_ex_osc.png

Note: To enable downloading a real-time application to a target computer, the name of the application must be specified in the Load Button component of the instrument panel.

Save the Application Compiler project as myInstPanel.prj.

In the Application Compiler dialog box, select Package. The Package status indicates completion of the packaging stages. When completed, click Close.

The packaging process outputs folders for_redistribution, for_redistribution_files_only, and for_testing.

Install Instrument Panel Application

To install the instrument panel application, run the executable file from the for_redistribution folder.

On Windows

  • If you selected Runtime downloaded from web for the project, run installer MyAppInstaller_web.exe.

  • If you selected Runtime included in package for the project, run installer MyAppInstaller_mcr.exe.

On Linux

  • If you selected Runtime downloaded from web for the project, run installer MyAppInstaller_web.install.

  • If you selected Runtime included in package for the project, run installer MyAppInstaller_mcr.install.

For this example, installer executable file is MyAppInstaller_mcr.exe. When run, this file installs the MATLAB runtime and installs the instrument panel executable file:

C:\Program Files\MyCompany\MyInstPanel_slrt_ex_osc\application\MyInstPanel_slrt_ex_osc.exe

Tip: Make a note of the MATLAB run time path in this step. The path can be used to run the standalone application on Linux system.

To test the standalone executable instrument panel, close MATLAB and run the MyInstPanel_slrt_ex_osc EXE file.

On Windows

  • run the MyInstPanel_slrt_ex_osc EXE file

On Linux

  • run the command

./run_MyInstPanel_slrt_ex_osc.sh /usr/local/MATLAB/MATLAB_Runtime/v911

Use the instrument panel to connect to the target computer by inserting the target computer IP address (for example, 192.168.7.5) in place of the target computer name (for example, TargetPC1). Load the real-time application, and start the application. Observe that the instrument panel provides an interface to control the real-time application.

If you modify your real-time application or instrument panel app and repackage these, you do not need to send the installer to your end-users. Instead, you can send them the updated EXE file from the for_redistribution_files_only folder to replace the EXE file in their application folder.

Note: If your system uses firewall software such as the Window Defender Firewall and you have configured exceptions for MATLAB® to let Simulink® Real-Time™ communicate with the target computer through the firewall, configure exceptions for your compiled application so it can communicate with the target computer. For more information, see Troubleshoot Communication Failure Through Firewall (Windows).

See Also

|

Related Examples

More About