Simulink® can convert units between ports when it detects discrepancies that have known mathematical relationships such as:
Conversion factors and offsets, such as
°F (Fahrenheit) to
Scaled, inverse units, such as
per gallon) and
L/km (liters per kilometer).
For example, if you connect one port with a unit of
one with a unit of
mm, Simulink can automatically
scale one unit to work with the other.
To enable Simulink to convert unit mismatches in your model automatically, select the Allow automatic unit conversions configuration parameter.
When Simulink successfully converts signal units at a block port, it displays .
When Simulink detects that an automatic conversion is not possible, it displays .
To manually convert units separated by a conversion factor or offset:
Clear the Allow automatic unit conversions configuration parameter.
Insert a Unit Conversion block between the ports whose units you want to convert.
Automatic conversion of units is a convenience. For better control of units, when Simulink detects a mismatch, consider modifying the units specified at one or the other of the two connected ports.
Simulink does not support automatic conversion:
For fixed-point and integer signals.
At an input port of a Merge block.
At any port of an asynchronous Rate Transition block.
At an input port of a function-call subsystem.
For bus signals.