Filter löschen
Filter löschen

Block diagram window keeps popping up when running Simulink.

1 Ansicht (letzte 30 Tage)
Ron McNabb
Ron McNabb am 15 Mär. 2023
Beantwortet: Amith am 29 Mär. 2023
I am running a script that calls a Simulink model within a loop like below. Every time it calls the model the block diagram for the model pops up. This makes it difficult to do anything else since the block diagram comes to the front every 10 seconds. Is there can way I can prevent this from occurriing?
for = 1:N
...
simOutputs = sim(simIn);
...
end

Antworten (1)

Amith
Amith am 29 Mär. 2023
Hi,
As per my understanding you want to prevent the Simulink model window from popping up when your for loop runs and calls the block. To prevent this you can set the SimulationMode parameter of the Simulink model to 'accelerator' or 'rapid-accelerator'. This will run the model in an accelerated mode, which will not show the block diagram when the model is called. You can set this parameter using the following command:
set_param('model_name', 'SimulationMode', 'accelerator');
or
set_param('model_name', 'SimulationMode', 'rapid-accelerator');

Kategorien

Mehr zu Event Functions finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by