Run a Simulink-Model from other Model, simulate it and close it

1 次查看(过去 30 天)
Hi everyone,
I've got a challenging problem. I have two models, "Model_1" and "Model_2". I want to call from "Model_1" (through a Subsystem) the "Model_2" simulate it and close it (see attached Image). All necessary m-files for the model_2 are already defined in the Call-Back "PreLoadfcn" in "Model_2".
After i click on the Subsystem "Call Modle_2" the Model_2 opens and the functions run automatically (see attached Image 2). But I'm then forced to manually press the button to start the simulation and close Model_2.
Ive tried to find a way around this with callback but it doesnt seem to work :( Can someone please advise whether I can automate this process ? Finally, to make my Programm more efficient, I would like to call the GUI after the Model2 is closed. How is this done?
I am thankful for every help Jay

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by