Matching the popup of main mask to popup of submask
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello,
Does anybody know what is the way of macthing the popup of the main mask with popup of the submask (under the main mask) in Simulink ? I have created the popup in the main mask for a transformer configuration using the same values of the popup in the submask ( values : Y, Yn, Yg). And I would like to tune this popup from the main mask.
Thank you very much in advance,
댓글 수: 0
채택된 답변
Sugandhi
2023년 2월 16일
Hi,
As per my understanding, you were trying to tune values for block parameters underneath the subsystem block of the sub mask from the main mask.
Values can be assigned to the block parameters underneath the subsystem block either by promoting the block parameter to the mask or adding an edit parameter in Mask Editor.
One should ensure that the same variable is set as a parameter in the mask editor and in the block parameter dialog box to have correspondence between edit parameters on the mask and block parameters in the subsystem. Block parameter values can be set by using mask initialization code in the mask editor using
set_param(object,parameter1,value1,...,parameterN,valueN)
One can get the parameter values of an object using
get_param(object,parameter)
Mask can also be controlled programmatically using 'Simulink.Mask.<property>'.
You can control parameters in your sub mask from your main mask by using call-back functions along with set and get param commands. An Object can be a Model, Subsystem, Library, Block, Line, Port or Bus element port element.
I hope this helps you. For more information regarding masks, callbacks, mask editor and set/get parameters, kindly go through the following links.
Set parameters -https://www.mathworks.com/help/simulink/slref/set_param.html?s_tid=doc_ta#btuf9mn-1-Object
Get parameters- https://www.mathworks.com/help/simulink/slref/get_param.html?s_tid=doc_ta#btqy0ez-Object
Mask Callback Code-https://www.mathworks.com/help/simulink/ug/mask-code-execution.html
Create Block Masks – https://www.mathworks.com/help/simulink/block-masks.html?searchHighlight=mask&s_tid=srchtitle_mask_1
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Author Block Masks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!