Why can't I promote the "file name" field of a subsystem reference to the mask of a subsystem containing this block?

조회 수: 4 (최근 30일)
Hi,
I have a subsystem containing a subsystem reference. I would like to specify the file name using the mask of the main subsystem. I tried the following two things:
  • promote the field to the mask using the promote object (worked fine for a model reference, but using a model reference is unsuitable for a number of reasons, most importantly because I want the referenced subsystem to be calculated by the same solver options as the main model). Although many parameters of the subsystem reference are promotable the file name appears not to be so.
  • fill the file name field with a variable name of a mask parameter. Just like using mask parameters in gain blocks and the like I tried using a mask parameter to fill the file name field. This just results in an error in the subsystem reference saying "not found".
Is there any solution or workaround for my problem?
Thanks in advance you for your support.
Kind regards,
Martin Silge

채택된 답변

Shubh Sahu
Shubh Sahu 2020년 2월 4일
As far as the 19b workflow is considered, a simple filename promotion is not possible to the mask of the subsystem. Either you can use variant subsystem instead or you can workaround attach in 3 files.
In main model a Subsystem is there and with in that a Subsystem refrence. keep all the files inside Subsystem refrence and promote Label mode active choice on subsystem.
Hope this will help you.
  댓글 수: 1
Martin Silge
Martin Silge 2020년 2월 12일
That's not really a "perfect" workaround for my target application but I acknowledge that technically this would work and kind of solve the problem.
I will however keep using model reference blocks instead because they are easier to use and just accept some shortcomings.
FYI: I suggested fixing this issue in a future release to the matlab support and they said they are going to look into it. So, probably, some day there might be a good solution.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by