Matching the popup of main mask to popup of submask
4 次查看(过去 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!