Unable to stop simulation to change a model

Dear,
I am getting the following error:
Cannot change the model when the simulation is running.
the line that causes the error is: delete_line(srcSignal)
I got the value of srcSignal by using get_param(portHandles.Inport, 'Line);
I had to compile the model because I needed to get the port data types. However, When it reaches delete_line(SrcSignal), it gives the error even though I wrote the simulationCommand to stop/pause/the simulation.
Any ideas to solve this?

Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 3 Dec 2017

Community Treasure Hunt

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

Start Hunting!