Borrar filtros
Borrar filtros

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

3 visualizaciones (últimos 30 días)
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

Respuestas (1)

Zhihui
Zhihui el 1 de Sept. de 2022
same question here

Categorías

Más información sobre Discrete-Event Simulation en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by