How to Specify Units in Block Dialogs
Simscape™ block dialogs and Property Inspector have drop-down combo boxes for units next
to a parameter value. For example, if you open the Translational
Friction block dialog box, the drop-down list for the Breakaway
friction force parameter contains
lbf. Likewise, the drop-down list for the Breakaway friction
velocity parameter, besides the default
m/s, contains other
unit expressions commensurate with distance over time, such as
mph, and so on.
You can either select a unit from the
drop-down list, or type a commensurate unit name (or a mathematical expression with unit
names) directly into the unit combo box. You can use the abbreviations for the units defined
in your registry, or any valid mathematical expressions with these abbreviations. For example,
you can specify torque in newton-meters (
N*m) or pound-feet
lbf*ft). To specify velocity, you can use one of the defined unit
fps), or an
expression based on any combination of the defined units of length and time, such as
m/s), millimeters/second (
in/min), and so on.
Affine units (such as Celsius or Fahrenheit) are not allowed in unit expressions. For more information, see About Affine Units.
The following operators are supported in the unit mathematical expressions:
|Plus — for exponents only
|Minus — for exponents only
|Brackets to specify evaluation order
Metric unit prefixes, such as kilo, milli, or micro, are not supported. For example, if you want to use milliliter as a unit of volume, you have to add it to the unit registry:
pm_addunit('ml', 0.001, 'l');
The drop-down lists next to parameter names are automatically populated by those units that are commensurate with the unit of the parameter. If you specify the units by typing, it is your responsibility to enter units that are commensurate with the unit of the parameter. The unit manager performs error checking when you click Apply in the block dialog box and issues an error if you type an incorrect unit.
By default, changing a value in the block dialog box immediately applies the new value. For better control, it is recommended that you clear the Auto Apply check box in the upper-right corner of the block dialog box to enable the Reset and Apply buttons.
In the Simulink-PS Converter and the PS-Simulink Converter block dialog boxes, the drop-down lists are prepopulated with some common input and output units, and it is your responsibility to select or type a unit expression commensurate with the expected input or output units. The error checking for the converter blocks is performed at the time of simulation. See Model Validation for details.