Is there a way to search for library blocks that need to be updated?

조회 수: 5 (최근 30일)
Justin Griffiths
Justin Griffiths 2025년 4월 22일
댓글: Justin Griffiths 2025년 5월 8일
One of the early steps in starting a simulation is library blocks are checked for whether they need to be updated. As I understand it, this is because the library block contents are saved with the containing model file like a snapshot of the library at the time of the save. If the library doesn't change between uses of the model then nothing needs to occur. If the library has changed then the containing model in memory will change at model update or start of simulation. With many thousands of library references split among hundreds of subsystem references and model references its possible to get lots of variation of which models have saved the new version of the library and which have not. I'd like to be able to search for library references that need updating so I can update those models permanently in version control. This will save time at model update or simulation by avoiding lots of library reference updates.

답변 (1개)

Jaskirat
Jaskirat 2025년 4월 25일
편집: Jaskirat 2025년 5월 8일
I understand that you want a way to check for updates in Simulink library blocks. This can be done using the “libinfo” command. You can refer to the following links for more details on this:
Further, in order to automatically check your entire model, the following steps may be helpful:
1)Create new project from your model by clicking the on the down arrow on the “New” button
2)On the “Project” tab, click the down arrow and select “Upgrade Project”.
Refer to the following link for more information regarding updating your model using Simulink Project:
Hope this helps!
  댓글 수: 2
Walter Roberson
Walter Roberson 2025년 5월 8일
libinfo is capable of populating LinkStatus information... but I do not see anything in LinkStatus information that indicates that the block needs to be recompiled ?
Justin Griffiths
Justin Griffiths 2025년 5월 8일
Perhaps the library version will help but if my memory serves that needs to be manually managed by the person who updated the library for the version to be useful. I'll check that today to see if that parameter of the library auto updates. What I'm looking for is what I suspect is happening in the background during a model update where all the library blocks are checked via a checksum against their library references to know whether the contents of the block needs to be refreshed with the contents of the library. This check only occurs if the LinkStatus is "resolved".

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by