Effacer les filtres
Effacer les filtres

How can I update Simulink Blocks from command without compiling the model?

3 vues (au cours des 30 derniers jours)
Luca Murolo
Luca Murolo le 8 Mar 2022
Hello all,
For my SimEvents / Simulink model, I am adding a lot of blocks via different Matlab commands (add_block, Simulink.BlockDiagram.copyContentsToSubsystem).
I use
set_param(Model, 'SimulationCommand', 'update')
to update the blocks.
Problem:
It compiles and gives me various errors as for example many of the blocks are not connected, but I can also connect them through Matlab Commandos only when they would have been updated in advance.
An important example is a function-call "Simulink Function Block". As soon as I copy the function-call block from another model using the Simulink.BlockDiagram.copyContentsToSubsystem command and import it into my actual model, the "f()" does not update, even though the function name is entered correctly.
Another big problem is with the "Entity Selector" block. When updating, an error is always issued, because there are no connections at the input ports that contain the corresponding attributes (since these are only built in later on).
To my question:
Is there a possibility to update model blocks. Is there a way to update subsystems and Simulink functions without "compiling" them?
Thank you and best regards
Luca

Réponses (1)

Zhihui
Zhihui le 1 Sep 2022
same question here

Catégories

En savoir plus sur Discrete-Event Simulation dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by