How to set to 'none' the UnitsInconsistencyMsg

7 ビュー (過去 30 日間)
Marco Ranieri
Marco Ranieri 2023 年 11 月 7 日
コメント済み: Marco Ranieri 2023 年 11 月 17 日
Hi,
I have defined some unit of measure in bus objects, using the bus editor, but whenever I run a simulation I get the following message:
Warning: The units 'm3' specified on block 'Controls/Engine Control Module/ECM model variant/ Internal ECM' are not defined in the Simulink
unit database. Investigate <b>52 similar inconsistencies</b> on Model Advisor Report.
If you cannot use a unit that exists in the database, consider suppressing all units inconsistency warnings by setting the configuration parameter
<sldiag objui="configset" objparam="UnitsInconsistencyMsg">'Units inconsistency messages'</sldiag> to 'none'.
I know this is the wrong way to define m3, and the correct way is m*m*m, but I need to define it like this to have another software correctly reading the unit when importing the simulation outputs from Simulink.
I'm using MATLAB R2017b and I could not find a way to set the Units incosistency messages to 'none'. How is this done?

採用された回答

Jaynik
Jaynik 2023 年 11 月 16 日
Hi Marco,
I understand that you want to set the “Units Inconsistency messages” as “none” in MATLAB R2017b.
The above can achieved by following the below steps:
  1. Open “Model Configuration Parameters” from Simulink > Simulation > Model Configuration Parameters or by using the shortcut ctrl + E.
  2. Go to Diagnostics tab.
  3. Open Advanced parameters tab below all the solver options if not open already.
  4. The “Units Inconsistency messages” can be set to “none” here to ignore units warning.
Alternately, you can use the MATLAB command window to set the parameter by using the following command:
set_param('your_model_name', 'UnitsInconsistencyMsg', 'none');
You can refer the following link to learn more about "set_param":
Hope this helps!
  1 件のコメント
Marco Ranieri
Marco Ranieri 2023 年 11 月 17 日
yes this solved, my issue, thank you very much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSubsystems についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by