Main Content

Simulink Real-Time Explorer

Interact with target computer and real-time application running on target computer

Since R2020b

Description

Simulink Real-Time Explorer provides a single point of contact for viewing connection status and interacting with a real-time application. You can visualize real-time signals, tune parameters, and stream real-time signals to the Simulation Data Inspector.

Note

Do not use Simulink external mode while Simulink Real-Time Target Explorer is running. Use only one interface or the other.

Use Simulink Real-Time Explorer for these tasks:

  • Connect the MATLAB® development computer and Speedgoat® target computer.

  • Load, start, and stop a real-time application on target computer.

  • View real-time application parameters and signal hierarchy.

  • Select real-time application signals for streaming to the Simulation Data Inspector.

  • Set real-time application stop time.

  • View task execution time (TET).

For examples, click the links in the More Information column.

Target Computer Configuration

CapabilityMore Information

Configure target computer configuration settings. View target computer disk usage.

Target Computer Settings

Real-Time Application Access and Control

CapabilityMore Information
  • Connect target computers to a development computer, and then disconnect them.

  • Load a prebuilt real-time application into a target computer.

  • Start and then stop running a real-time application that you downloaded to the target computer.

  • Display execution time, task execution time, and other properties of the real-time application.

  • Change stop time without regenerating code.

  • Start and stop signal logging and streaming by using Start Recording and Stop Recording buttons.

  • Import file logs from the target computer by using the Import File Log button.

Real-Time Application Management

CapabilityMore Information

By using Configuration tab or right-click menu in Targets tree:

  • View real-time applications available on target computer, including detailed properties.

  • Delete real-time applications from target computer.

  • Select a real-time application as startup application.

Connect, Load Application, and Start

Signal Access

CapabilityMore Information

Filter and group hierarchical signals.

Filter Hierarchical List of Signals and Parameters in Simulink Real-Time Explorer

Visualize signals.

Create, save, and load signal groups.

Export and Import Signals in Instrument by Using Simulink Real-Time Explorer

Copy signal block paths, add to instrument list, highlight in model, add to signal table, or add to axes.

See Simulink Real-Time Explorer, Signals Tab, Signal Context Menu.

Simulink Real-Time Explorer, Signals Tab, Signal Context Menu

Right click on signals that you select in the Signals tab to access the Signal context menu.

Parameter Tuning

CapabilityMore Information

Filter and group hierarchical parameters.

Filter Hierarchical List of Signals and Parameters in Simulink Real-Time Explorer

Display and tune parameter values while the real-time application is running.

When the ECU page and XCP page selections do not match, the mismatch disables the explorer Parameter table. You can enable parameter table operation by coordinating ECU page and XCP page selection in the real-time application. Use the explorer Enable Parameter Table button. This button is context sensitive and appears when explorer detects a page selection mismatch.

Refresh cached parameter table values by clicking the Refresh Values button.

Use the Refresh Values button for instances in which the parameter table data becomes disabled (for example when page switching occurs),

Use the Hold Updates button and Update All Parameters button to change multiple parameter values simultaneously. These buttons in Explorer operate in the same way as these buttons on the Real-Time tab in the Simulink Editor.

Tune Parameters by Using Hold Updates and Update All Parameters in Tune Parameters by Using Simulink® External Mode

Use the Save Param Set or Load Param Set buttons on the Parameters tab to save or load a parameter set file for the current real-time application. You can save or load the parameter set file from the development computer or target computer. See the figure.Save and Reload Parameters by Using Simulink Real-Time Explorer

Observe Task Execution Time and Target Computer Status

CapabilityMore Information

Open the TET Monitor tab and monitor task execution time.

Open the System Log Viewer tab and observe the target computer system messages.

Open the System Log Viewer tab and use the log controls to filter messages, clear the display, clear the messages, or retrieve messages from the target computer.

The Simulink Real-Time Explorer app provides a UI to access a real-time application.

Open the Simulink Real-Time Explorer App

From the Simulink Editor, in the Real-Time tab, select Prepare > SLRT Explorer. Or, from the MATLAB Command Window, type:

slrtExplorer

Examples

expand all

This example shows how to change the IP address of the target computer, update the target computer software, and reboot the target computer.

Configure the target computer by using the Target Configuration tab in Simulink Real-Time Explorer.

  1. Open the Simulink Real-Time Explorer.

  2. Select the target computer in the Targets Tree panel.

  3. To change the IP address of the target computer, click the Change IP Address button.

  4. To update the target computer software, click the Update Software button.

  5. To reboot the target computer, click the Reboot button.

This example shows how to connect to the target computer, load the real-time application, set the stop time, and start the real-time application.

Access parameter values by using the Parameters tab in Simulink Real-Time Explorer.

  1. Open the Simulink Real-Time Explorer.

  2. Select the target computer in the Targets Tree panel.

  3. To connect to the target computer if not already connected, click Disconnected toggling it to Connected.

  4. To select and load a real-time application, click Load Application and select the MLDATX file.

    Note

    You can select and load a real-time application by using the context menu. Right-click on the application and select Load.

    Right click on a real-time application to access the application context menu.

  5. To select the application stop time, type a value (in seconds) in the Stop time field.

  6. To start the application, click the Start button.

    In Explorer, clicking the Start button is equivalent to executing this command for target object tg:

    start(tg, 'ReloadOnStop', true, 'AutoImportFileLog', true)

    Note

    To change the ReloadOnStop and AutoImportFileLog operation of the Start button, you can:

    • Select Start > ReloadOnStop

    • Select Start > AutoImportFileLog.

    Note

    To change the AutoImportFileLog operation of the Stop button, you can:

    • Select Stop > AutoImportFileLog.

  7. To stop the real-time application, click the Stop button.

This example shows how to filter the messages displayed by the System Log Viewer tab. You also can clear the log display in explorer, clear the log messages from explorer, or retrieve the log messages from the target computer. The tab provides filter selections for message severity and buttons that let you Clear Display, Retrieve Logs, or Clear Logs. These operations also are available in a right-click context menu for the message area of the tab.

The System Log Viewer tab provides controls to filter, clear, or retrieve log messages.

  1. Open the Simulink Real-Time Explorer.

  2. Connect to a target computer. Load and run a real-time application. For more information, see Connect, Load Application, and Start.

  3. Select the System Log Viewer tab.

  4. Use the tab controls to filter the system log message display by message severity.

    While the target computer status is 'loaded', 'loading', or 'running', you can clear the display of log messages or retrieve log messages from the target computer.

    While the target computer status is 'stopped', you can clear the log messages from the System Log Viewer.

  5. Right click on a message in the System Log Viewer, and use the right-click context menu to clear the display, retrieve logs, or clear logs.

This example shows how to connect to the target computer, load the real-time application, select signals for a signal list, start the real-time application, and view the streaming data in the Simulation Data Inspector.

Select signal from the Signals tab in Simulink Real-Time Explorer.

  1. Open the Simulink Real-Time Explorer.

  2. To connect to the target computer if not already connected, click Disconnected toggling it to Connected.

  3. To select and load a real-time application, click Load Application and select the MLDATX file.

  4. To select signals for streaming, click the application name, select signals from the Signals tab, and click the Add selected signals button.

  5. To run the application and generate data for streaming, click the Start button.

  6. To stream the signal data, select the signals in the Signals in instrument list and click the Add Instrument button.

  7. To view the streaming signals, click the Data Inspector button.

  8. To stop streaming and logging signal data, click the Stop Recording button. This button also stops signal logging.

  9. After viewing the data, to stop the real-time application, click the Stop button.

To customize the instrumentation display in explorer, use the Instrumentation button to:

  • Add signal tables, parameter tables, and axes as custom instrumentation tabs in explorer.

  • Bind signals and parameters to the custom instrumentation tabs by using the Signal Selector button and the Parameter Selector button.

  • Configure the display of signals that you bind to custom axes.

  • Add a task execution time (TET) monitor tab to explorer.

  • Export or import custom instrumentation display configurations in explorer.

This example shows how to add and configure custom instrumentation (an axes display).

Configure axes by using the Custom Axes tab in Simulink Real-Time Explorer.

  1. Open the Simulink Real-Time Explorer.

  2. Select the target computer in the Targets Tree panel.

  3. To connect to the target computer if not already connected, click Disconnected toggling it to Connected.

  4. To select and load a real-time application, click Load Application and select the MLDATX file.

  5. To add an Axes tab, pull down the options for the Instrumentation button and select the Axes button.

  6. Use the controls in the Axes tab to name the tab and set features for the axes. Bind signals to the axes by using the Signal Selector button.

  7. To export the custom instrumentation configuration, pull down the options for the Instrumentation button and select the Export Configuration button.

  8. To import the custom instrumentation configuration in another explorer session, pull down the options for the Instrumentation button and select the Import Configuration button.

Programmatic Use

expand all

slrtExplorer opens the Simulink Real-Time Explorer. Operations in the Simulink Real-Time Explorer UI correspond to Simulink Real-Time commands. For example, the explorer Start button corresponds to the start function.

Version History

Introduced in R2020b

expand all