Why does a ToWorkspace block in a referenced model store its data after the StopFcn callback?

1 view (last 30 days)
Matlab2012b
See attached image or run attached models.
  • There's a ToWorkspace block in the SubSys model.
  • Another model has a ModelReference block to SubSys.
  • StopFcn callbacks are added on blocks inside and outside of the SubSys model.
  • The workspace variable can only be accessed by StopFcn on blocks outside the SubSys model.
Simulink documentation states that:
StopFcn - After the simulation stops. Output is written to workspace variables and files before the StopFcn is executed.

Answers (0)

Categories

Find more on Interactive Model Editing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!