MATLAB: Do the editor windows pop up when I pause the simulation that contains Stateflow and/or Embedded MATLAB blocks in Simulink 6.1 (R14SP1)

debuggereditorembeddedemlMATLABpausesimulinkstateflowwindow

For example, in the rtwdemo_eml_aero_radar demo, when I open either of the sources, sometimes the Embedded MATLAB editor pops up. Once it pops up, the simulation will not start running again. I have to stop the simulation.

Best Answer

This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
We have verified that there is a bug in Simulink 6.1 (R14SP1) in the way that it handles being paused when Stateflow and/or Embedded MATLAB blocks are being executed. Pausing the Simulink diagram may cause the Embedded MATLAB Editor and/or Stateflow debugger to open and come into the foreground.
The Simulink state while paused in this mode is not defined. Tools that get block inputs and outputs at this time may see inconsistent values. This behavior is intermittent and is most likely to happen for Embedded MATLAB functions or Stateflow charts that execute for long periods of time.
To work around this issue, hitting continue or play from either the editor or debugger window should cause execution to resume.