フィルターのクリア

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

3 ビュー (過去 30 日間)
Luca Murolo
Luca Murolo 2022 年 3 月 8 日
回答済み: Zhihui 2022 年 9 月 1 日
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

回答 (1 件)

Zhihui
Zhihui 2022 年 9 月 1 日
same question here

カテゴリ

Help Center および File ExchangeDiscrete-Event Simulation についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by