필터 지우기
필터 지우기

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 CenterFile Exchange에서 Discrete-Event Simulation에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by