distinguish between reference model and reference subsystem programmatically

조회 수: 2 (최근 30일)
Greetings,
Is there a way to distinguish between the various model (block diagram level) types which type of model it is? Note I'm not talking about block level, rather model level. I can't seem to find an appropriate parameter. For instance, BlockDiagramType is model for all but libraries. find_mdlrefs returns both ref models and ref subsystem models.
Thanks,
-Chris

채택된 답변

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU 2023년 11월 3일
Hello Chris,
I understand that you are trying to distinguish between reference models and reference subsystems at the model level. Ther’s no direct function to differentiate between these two, there are certain characteristics unique to each that might be used for this purpose:
  1. Model Reference: These have fixed signal interfaces, such as data types and signal dimensions. They can also have their own Configuration Parameters and Model Workspace. These models are typically used to represent reusable components or subsystems that are referenced by other models.
  2. Subsystem Reference: The interfaces for these do not need to be fixed. They do not have their own Configuration Parameters and Model Workspace, instead inheriting these from the parent model.
By examining these characteristics, you can programmatically differentiate between reference models and reference subsystems. You can check if a block has fixed signal interfaces, Configuration Parameters, and a separate Model Workspace to identify it as a reference model. Conversely, if a block inherits its interfaces and does not have its own Configuration Parameters and Model Workspace, it is likely a reference subsystem.
I hope this helps!
  댓글 수: 1
checker
checker 2023년 11월 8일
Thanks Udaya. Currently our use of these blocks have them in a custom library with other distinguishing properties, and I use these, similar to your suggestion. From a code maintenance and portability perspective, I was hoping for something more inherent in the blocks but you've confirmed that there isn't so thanks for that.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by