Main Content

SLDRT.RunStatus

Get simulation run status and get data from scopes and logged signals

Since R2023b

Description

The SLDRT.RunStatus object provides simulation run status and provides access to data from scopes and logged signals after the simulation run completes.

Creation

Use the SLDRT.run function to create the SLDRT.RunStatus object.

The SLDRT.RunStatus object provides simulation run status and provides access to data from scopes and logged signals after the simulation run completes. The object contains this information about the last model run:

  • Name of model

  • Running status

  • Scope block data

  • Logged signal data

Properties

expand all

Name of the model in the simulation specified as a character vector.

The simulation run status, specified as 1 if the simulation is running or 0 if the simulation is not running.

Simulation scopes data specified as an array of data from Scope blocks in the model after the simulation is complete. If the simulation is still running, ScopesData is an empty array.

Simulation logged signals data, specified as an array of data from logged signals in the model after the simulation is complete. If the simulation is still running, LoggedSignals is an empty array.

Object Functions

SLDRT.runRun model in real time by using Simulink Desktop Real-Time kernel
stopStops execution of current model simulation run and causes MATLAB to wait until execution stops
waitWait for model execution to complete

Examples

collapse all

This example runs the sldrtex_counter model in the real-time kernel with the Wait argument set to "off". The command creates a SLDRT.RunStatus object that provides information about the model run. By using the Wait option, you can check the running status while the real-time application is running.

openExample('sldrtex_counter');
myRunStatus = SLDRT.run('sldrtex_counter',Wait="off");
myRunStatus.Running
ans =

  logical

   1

Version History

Introduced in R2023b