Simulink Real-Time App Generator
Generate instrument panel app to interact with target computer and real-time application running on target computer
Since R2022a
Description
Simulink® Real-Time™ App Generator helps you generate an instrument panel app that interacts with the Speedgoat® target computer and real-time application running on the target computer. You can select signals and parameters in your model to represent as instrument panel controls and configure the controls before generating the app.
To use the Simulink Real-Time App Generator, open the App Generator from the Real-Time tab in the Simulink Editor or open the App Generator from the MATLAB® or Simulink Apps tab.
Use the App Generator for these tasks:
Open a model file SLX or real-time application file MLDATX, and create an instrument panel app.
Select signals and parameters to add to an instrument panel app.
Configure controls for instrument panel app.
Validate instrument bindings against real-time application MLDATX file.
Create instrument panel app.
Save an App Generator session file MAT, and open it in a future App Generator session.
By using the parts of the Simulink Real-Time App Generator, you can instrument signals and parameters from your real-time application, binding them to controls in a generated instrument panel. The generator lets you configure options for generating the instrument panel and configure the properties of the instrument panel controls. Use these parts of the App Generator to configure and generate an instrument panel:
Designer Toolstrip Operations
The App Generator controls on the Designer toolstrip let you add, remove, edit, and validate signal and parameter bindings between the real-time application to controls in the generated instrument panel app.
| Controls | App Generator Operations |
|---|---|
| Use the Layout button to open the Layout Options dialog box. From this dialog box, you can add or remove tabs in the generated app. Also, this dialog box lets you select grid usage for layout and choose whether the tabs open as windows in the generated app.
|
| Use the Options button pull down menu to configure options for instrument panel app generation. The options include:
|
| Use the Target Events button to add callback code for target computer events. The App Generator adds the callback code for events when generating the app, and you can edit the callback code further by using the Code View in the App Designer. For more information, see Add Callbacks for Target Computer Events. |
| Use the Add From Model button to open a model in bind mode and use the model to select signals and parameters for the generated instrument panel. The App Generator Bind Mode message box remains active until you close bind mode for the model in the Simulink Editor. |
| When you select a single signal or a parameter from the Bindings tab, you can highlight that selected item in the model. If you select a workspace variable from the Bindings tab, clicking the Highlight in Model button opens the model base workspace in Model Explorer. |
| When you select multiple signals or parameters from the Bindings tab, you can use the Mass Edit button to edit the instrument binding configurations for the selected items. You can change the control type, change the control name, select whether to make the control name unique, and change tab placement of the control in the generated app.
|
| Use the Remove button to delete the selected instrument bindings from the Bindings tab for instrument panel generation. |
| For the real-time application MLDATX file, use the Validate button to check the instrument binding configurations in the Bindings tab. If the MLDATX file is not available, the App Generator issues an error. |
| Use the Generate App button to create an App Designer instrument panel for the real-time application by using the instrument binding configurations from the Bindings tab and by using the selected instrument panel options from the Options button. |
| After generating an App Designer instrument panel MLAPP file, you can update instrument bindings with their controls to the instrument panel. To use the Update App button:
During the update, you have access to consider changes to all of the app bindings for updating the app. You can add bindings, remove bindings, or change the control type for bindings in the app. Tip The Update App workflow helps you add or remove instrument bindings with their controls to a generated instrument panel. This approach lets you add to a generated instrument panel that you have customized in App Designer. |
Signals and Parameters Pane Operations
The Signals and Parameters pane helps you instrument the signals, parameters, and data in a real-time application. The tree hierarchy in the pane divides into Model and External Data, Named Signals, and the real-time application model signals and parameters. To add signals, parameters, or data to the instrument panel, select items from the Signals And Parameters pane, and click the Add selected button.
At the top of this pane, the filter box and filter options help you search for signals
and parameters. The figure shows a search for signals in the
slrt_ex_sf_car model that contain the text
torque.

Bindings Tab Operations
When you select a signal, parameter, or variable in the Bindings tab, the Parameter or Signal configuration pane opens. This pane lets you configure the App Designer control in the instrument panel for the selected item. If you select multiple signals or parameters, you can use the Mass Edit button to configure the controls for the group of selected items.
Property Panel Operations
When you select a signal, parameter, or variable in the Bindings tab, the Parameter or Signal property panel opens. This panel lets you configure the App Designer control in the instrument panel for the selected item. You can change the displayed fields in the Parameter or Signal property panel by using the selection for the Control Type field.
About MLDATX and SLX Files
You can develop an instrument panel app in the App Generator from a model SLX file (if you start the App Generator from the Real-Time tab in the Simulink Editor) or from a real-time application MLDATX file. It is recommended that you develop the instrument panel based on the MLDATX file, because—when developing from the MLDATX file—the App Generator only lists the signals and parameters that are present in the generated code. If you develop the instrument panel based on the SLX file, the App Generator can list more signals than are present in the generated code. These signals include virtual signals and signals to Scope blocks.
Open the Simulink Real-Time App Generator App
From the Simulink Editor, in the Real-Time tab, select Review Results > App Generator. Or, in the MATLAB Command Window, type:
slrtAppGenerator
If you open the App Generator from a model, the App Generator populates the Signals and Parameters pane with information from the model.
Examples
Related Examples
Parameters
No parameters are available for this application.
Programmatic Use
Version History
Introduced in R2022aSee Also
slrtAppGenerator | slrtExplorer | slrtLogViewer | slrtTETMonitor | slrealtime.ui Properties



