How can I update Simulink Blocks from command without compiling the model?
4 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete-Event Simulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!