Customized Library version management

조회 수: 6 (최근 30일)
Jannik Heuermann
Jannik Heuermann 2022년 7월 14일
댓글: Jannik Heuermann 2022년 7월 16일
Hello,
I would like to create a library in Simulink with the possibility of version management of the individual blocks in the library.
I have already implemented a library. However, if I make a change to one block, it immediately affects all my models. But I don't want this to happen automatically. I would like to be able to decide whether the block in my model should apply the change or not. In the library itself, however, I only want the latest version to be displayed.
So my question is whether anyone already has experience with the Simulink library and versioning and can give me a tip.

채택된 답변

Benjamin Thompson
Benjamin Thompson 2022년 7월 14일
편집: Benjamin Thompson 2022년 7월 14일
Simulink libraries just have one version number for the whole thing just like Simulink model files. You can not version each block in a library separately. If you have a model using a library block, you can disable that library link and modify the block in the model using it. Then Simulink will have a push or restore option that you can choose when it comes times to decide whether to have your model continue using the modified library block, push that modified block to the library to make the change permanent, or revert the change to use the library block.
  댓글 수: 3
Benjamin Thompson
Benjamin Thompson 2022년 7월 15일
You can lock links to a library, but not to a specific block in the library. Or, make the block in a library on its own.
Are you trying to prevent users from making changes or from seeing the block implementation at all?
Jannik Heuermann
Jannik Heuermann 2022년 7월 16일
Yes, I know that I can lock a library.
I want to prevent users from making changes.
But that is not my main problem. My main problem is that the library blocks in all models will be updated when you change the library block.
For example:
I have a library with block X. I want this library to be "link-locked" so that the user cannot change the block manually. Maybe in some time I would like to implement a new and changed version of the block X. Version 2.0, if you like. In the library I would like to replace the old version of Block X with the new one. In my old models, in which the old version of Block X is installed, I don't want these blocks to be updated automatically. I would like to keep the old version in the old models.To "disable link" would be a solution, but I don't want that, because it would allow the user to change my library block as well.
My hope was that MATLAB has a solution for this. But now I think I need to have several versions (1.0, 2.0 ...) of the particular blocks in the library and program a custom function that has the ability to update old models by replacing the old blocks with the latest version available.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by