set parameter in the Condenser Evaporator (2P-MA) block in app Designer

2 ビュー (過去 30 日間)
Mauricio Bassallo
Mauricio Bassallo 2021 年 8 月 25 日
回答済み: Vinayak 2024 年 5 月 24 日
Hi,
I want to set a particular parameter (number of two-phase fluid tubes ) of the block 'Condenser Evaporator (2P-MA)' from App designer using a discrete knob. I wrote a code, which is similar when I set parameters for other blocks. However, when I run the app designer code and then I set a particular value using the knob, an error message appears in the code: 'Condenser Evaporator (2P-MA) block (mask) does not have a parameter named 'Number of two-phase fluid tubes' (please, see the image).
Do you know why is that happening, considering that the name of the parameter that I want to set is such one? Or such parameter has another name? Does it has to do with the block is masked?
Thanks in advance for your comments...
Regards,
Mauricio

回答 (1 件)

Vinayak
Vinayak 2024 年 5 月 24 日
Hi Mauricio,
To list all parameters for the block, you can use the get_param command as follows:
get_param('RefrigerationSystem/Condenser','DialogParameters');
For Mask Parameters, use:
get_param('RefrigerationSystem/Condenser','MaskNames');
Note that you may need to rename the model, as spaces are not allowed in valid model names.
Alternatively, you can open the model in Simulink, double-click the block, and hover over the parameter to see its name in the tooltip.

カテゴリ

Help Center および File ExchangeVerification, Validation, and Test についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by