Tips for Creating Standalone Executable Apps
While developing an App Designer instrument panel and deploying it as a Simulink® Real-Time™ standalone executable app, it can help to consider the support limitations and dependencies that can block successful deployment.
Because some MATLAB® features are not supported in standalone executable apps, avoid using these features in apps for deployment. Also, there are best practices to follow when setting up your standalone executable app for deployment. Use these tips and best practices when developing standalone executable app for deployment.
Create Instrument Panel App by Using App Generator
Get started developing your standalone executable app for deployment by following the steps in Create App Designer Instrument Panels by Using App Generator and Create Standalone Instrument Panel App by Using Application Compiler.
Use MATLAB Features Supported by the MATLAB Compiler
Many MATLAB, Simulink, and toolbox features are supported by the MATLAB compiler. But, there are some features that the compiler cannot deploy in standalone executable apps. Before deploying your app, make sure that it uses supported, deployable features. To learn which features are supported, refer to these lists:
Stream Signals to App Designer Components for Visualization
To visualize signals, stream the signal data from the real-time application to
components in the standalone executable app. Bind the signals to the components by using
functions such as connectLine
or connectXYPlot
. The Simulation Data Inspector (SDI) is not deployable for
signal visualization.
Set Up Deployable Support for Enumeration Definitions if Needed
If the real-time application needs access to enumeration definitions, define the enum
values in a MATLAB code or program file. The MATLAB compiler does not support Simulink
data dictionary (.sldd
) files. This issue can prevent successful
deployment if your app needs to access enumeration definitions from a data
dictionary.
Configure UI Components in the App for Portability
There are special considerations for the UI components LoadButton
and TargetSelector
for standalone executable apps.
When you include a LoadButton
UI component in your app, set the Application property for this component to specify the real-time
application MLDATX file in the standalone executable app. The Load
Application button in the standalone executable app only loads the
specified MLDATX file. In the standalone executable app, the button does not support
browsing to select the real-time application. For more information, see Why can't I use the "Load Application" button in my deployed SLRT app to switch
between MLDATX files to run on my Speedgoat target?.
If your app includes a TargetSelector
UI component, make sure that every App Designer Simulink
Real-Time UI component is configured for the TargetSelector
by
using the TargetSource property. For more information, see slrealtime.ui Properties.
In standalone executable apps, the TargetSelector
drop-down list
does not support selecting a target computer. In R2022b and later, the
TargetSelector
in the standalone executable app provides an
edit field in which you enter a target computer IP address. Alternatively, you can
specify the target computer IP address in the app code by using the
slrealtime
target object. For more information, see Why do I get an "Target IP Address is empty" error when I try connect to Speedgoat
hardware from a deployed SLRT app?.
Confirm Firewall Set Up of the Environment Where the App is Run
If the development computer where the Simulink Real-Time standalone executable app is run has a firewall or antivirus software in place, it may be necessary to allow the app EXE file access through the firewall to ensure communication between the development computer and the Speedgoat target computer. For more information, see How do I configure Windows Defender Firewall for MATLAB to communicate with external hardware such as Speedgoat?.
See Also
LoadButton
| TargetSelector
| slrealtime.ui Properties
Related Examples
More About
- Application Compiler (MATLAB Compiler)
- Why can't I use the "Load Application" button in my deployed SLRT app to switch between MLDATX files to run on my Speedgoat target?
- Why do I get an "Target IP Address is empty" error when I try connect to Speedgoat hardware from a deployed SLRT app?
- Why do I encounter the error "Function requires Simulink Real-Time Target Support Package" when I run a standalone application?