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?

 채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 2월 21일

9 개 추천

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

댓글 수: 1

Joe
Joe 2017년 10월 4일
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')

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Lukas
Lukas 2018년 9월 21일

4 개 추천

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

Manu Madhu
Manu Madhu 2020년 6월 18일
Thank you, it works
rsating
rsating 2024년 6월 27일
Repeated "term" commands worked for me too. Thanks!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터 및 File Exchange에서 Simulink Compiler에 대해 자세히 알아보기

제품

질문:

2012년 2월 21일

댓글:

2024년 6월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by