Control Fixed-Point Instrumentation and Data Type Override

The conversion of a model from floating point to fixed point requires configuring fixed-point instrumentation and data type overrides. However, leaving these settings on after the conversion can lead to unexpected results. If you do not have Fixed-Point Designer™, you can work with a model containing Simulink® blocks with fixed-point settings by turning off fixed-point instrumentation and setting data type override to scaled doubles.

Control Instrumentation Settings

The fixed-point instrumentation mode controls which objects log minimum, maximum, and overflow data during simulation. Instrumentation is required to collect simulation ranges using the Fixed-Point Tool. These ranges are used to propose data types for the model. When you are not actively converting your model to fixed point, disable the fixed-point instrumentation to restore the maximum simulation speed to your model.

To enable instrumentation outside of the Fixed-Point Tool, at the command line set the MinMaxOverflowLogging parameter to MinMaxAndOverflow or OverflowOnly.

set_param('MyModel', 'MinMaxOverflowLogging', 'MinMaxAndOverflow')

Instrumentation requires a Fixed-Point Designer license. To disable instrumentation on a model, set the parameter to ForceOff or UseLocalSettings.

set_param('MyModel', 'MinMaxOverflowLogging', 'UseLocalSettings')

Control Data Type Override

Use data type override to simulate your model using double, single, or scaled double data types. If you do not have Fixed-Point Designer software, you can still configure data type override settings to simulate a model that specifies fixed-point data types. Using this setting, the software temporarily overrides data types with floating-point data types during simulation.

set_param('MyModel', 'DataTypeOverride', 'Double')

To observe the true behavior of your model, set the data type override parameter to UseLocalSettings or Off.

set_param('MyModel', 'DataTypeOverride', 'Off')

Related Topics