How to set to 'none' the UnitsInconsistencyMsg

Illustration
Marco Ranieri - 2023-11-18T15:57:16+00:00
Question: How to set to 'none' the UnitsInconsistencyMsg

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 52 similar inconsistencies 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   'Units inconsistency messages' 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?

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

To suppress the units inconsistency warnings in MATLAB R2017b, you can set the UnitsInconsistencyMsg parameter to 'none'. Here are the steps to do this:

Method 1: Using Model Configuration Parameters

  1. Open your model in Simulink.

  2. Go to Simulation > Model Configuration Parameters (or use the shortcut Ctrl + E).

  3. In the Model Configuration Parameters dialog, go to the Diagnostics tab.

  4. Expand the Advanced parameters section (if not already expanded).

  5. Find the parameter UnitsInconsistencyMsg and set its value to `'none''.

  6. Save and run your simulation.

Method 2: Using MATLAB Command Window

Alternatively, you can set the parameter programmatically using the MATLAB command window:

matlab
set_param('your_model_name', 'UnitsInconsistencyMsg', 'none');

Replace 'your_model_name' with the actual name of your Simulink model.

Summary

By setting the UnitsInconsistencyMsg parameter to 'none', you will suppress the warnings about units inconsistencies in your model. This is useful when you need to define units in a specific way for compatibility with other software, even if they are not recognized by Simulink's unit database.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!