How can I create an App Designer app to control, tune and visualize my Simulink Real-Time application?

92 views (last 30 days)
I am interested in developing a custom GUI using App Designer to control, tune and visualize my real-time application running on my Speedgoat target computer. How can I do this?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 10 Oct 2022
Edited: MathWorks Support Team on 10 Oct 2022
Depending on the MATLAB release you are using, consider the following tips and resources:

(1) R2020b and newer releases

The following tutorials are a great place to get started:
In R2020b and newer releases, use the following objects and functions in the app code and callbacks:
Expanding App Designer support for Simulink Real-Time is an active area of development and we recommend using the most recent MATLAB release if possible.
In R2022a, we introduced Simulink Real-Time App Generator. It enables you to automatically generate an App Designer instrument panel from a model. You can then open the generated MLAPP file in App Designer for additional changes. For more information, see Create App Designer Instrument Panels by Using App Generator .
Since R2021b, the Component Library in App Designer includes a set of dedicated Simulink Real-Time components that supports common operations that interface to a real-time application. For more information, see Create App Designer Instrument Panels by Using Simulink Real-Time Components .
Also from R2021b onwards, if you have a MATLAB Compiler license, you can compile your App Designer GUI as a standalone executable to run it on a computer without a MATLAB installation/license. For more information, see Create Standalone Instrument Panel App by Using Application Compiler.

(2) R2020a and prior releases

Simulink Real-Time went through a major product update for the R2020b release, which requires different code to be used in older releases.
In R2020a and prior releases, App Designer support for Simulink Real-Time is limited, but you can try to use the following objects and functions in the app code and callbacks:
For an example that uses Simulink Data Inspector API to stream signals from the target computer, see the attached slrt_legacy_app_R2017b.zip that was designed using R2017b but should work in all releases up to R2020a.
For a documented example app that uses instrument object prototype, refer to: https://www.mathworks.com/help/releases/R2020a/xpc/ug/add-app-des-app-to-inverted-pendulum-mdl.html (works in R2019b and R2020a only)
Note: In older releases, the Simulink Real-Time Explorer was used to design instrument panels (.slrtip files). The use of this workflow is no longer recommended.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!