Variant control for variant subsystems with mask parameters?

조회 수: 2 (최근 30일)
Andreas
Andreas 2013년 7월 26일
답변: Andreas 2013년 10월 28일
Hello everybody,
I'm currently working a lot with referenced and variant subsystems and I'm wondering whether you could set the block mask parameters to control the variants.
I want a similar behavior as in the simulink PID(s)-block where you can choose the controller type via drop-down menus in the block mask. I don't see any possibility yet, to use other variables then the ones from the base workspace.
Any advice would be appreciated.

채택된 답변

Andreas
Andreas 2013년 10월 28일
I think a good description can be found here: http://blogs.mathworks.com/seth/2008/08/13/dynamic-mask-dialogs/

추가 답변 (1개)

Nathan Crosty
Nathan Crosty 2013년 7월 26일
In the Variant Subsystem > Subsystem Parameters, there is a check box for "Override variant conditions and use the following variant"
Check this box and select which variant you would like to use. This will do exactly what you are asking for.
  댓글 수: 2
Andreas
Andreas 2013년 7월 26일
편집: Andreas 2013년 7월 26일
Hi Nathan,
thanks for your answer. I know this function, but my model users want to change the variants by double-clicking on the block and changing a mask parameter.
Before that, we had configurable subsystems and even right mouseclick -->block choice --> var a or b was not, what they wanted. Everything shall be in one single mask. :-/
My ideas (but don't know, how it works):
- use referenced/variant Subsystems
- use variant control parameter and no override
A: Write mask parameters automatically to Workspace
B: Access mask parameter variables from the reference model block.
Nathan Crosty
Nathan Crosty 2013년 7월 26일
편집: Nathan Crosty 2013년 7월 26일
I see. So, you can create a mask and make a parameter for variant choice. You can then use the Dialog Callback in the mask to set the following property of the variant model block: OverrideUsingVariant

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

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by