Simulink.sdi.getCurrentSimulationRun
Description
returns the runObj
= Simulink.sdi.getCurrentSimulationRun(mdl
)Simulink.sdi.Run
object that corresponds to
the in-progress or most recently completed simulation of the model specified by
mdl
. If you delete the Run
object that corresponds to
the most recently completed simulation, the
Simulink.sdi.getCurrentSimulationRun
function returns empty.
Examples
Input Arguments
Output Arguments
Tips
You can use the
Simulink.sdi.getCurrentSimulationRun
function to access logged data in aStopFcn
model callback function. Workspace variable data is not available when theStopFcn
callback executes, but theRun
object is available because data streams to the Simulation Data Inspector.You can use the
Simulink.sdi.getCurrentSimulationRun
function to analyze run data on parallel workers to determine whether to send the run data to the Simulation Data Inspector.
Version History
Introduced in R2020a