Hi,
I use Model([], [], [], 'compile') to set the model in compile mode before computing some checksums. After receiving the checksums I want to close the model but I get an error that the model can't be closed since it is being compiled.
How do I turn off the compile mode?

 Respuesta aceptada

Kaustubha Govind
Kaustubha Govind el 21 de Feb. de 2012

9 votos

Run the following command to terminate simulation:
>> model([], [], [], 'term')

1 comentario

Joe
Joe el 4 de Oct. de 2017
One additional suggestion... if you ever find yourself in a situation where
model([], [], [], 'term')
does not work because Simulink "defers" the termination and you're stuck... Try the following,
set_param(gcs, 'SimulationCommand', 'stop')

Iniciar sesión para comentar.

Más respuestas (1)

Lukas
Lukas el 21 de Sept. de 2018

4 votos

If the above commands doesn't help and you still see:
model([],[],[],'term')
Warning: Termination of 'model' deferred
then just try to execute model([],[],[],'term') multiple times.
I think this helps in case model had been compiled multiple times without terminating it. For example during debugging of a function that does this.

2 comentarios

Manu Madhu
Manu Madhu el 18 de Jun. de 2020
Thank you, it works
rsating
rsating el 27 de Jun. de 2024
Repeated "term" commands worked for me too. Thanks!

Iniciar sesión para comentar.

Categorías

Más información sobre Configure and View Diagnostics en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 21 de Feb. de 2012

Comentada:

el 27 de Jun. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by