| Simulink® | ![]() |
fxptdlg('modelname')
fxptdlg('modelname') launches the Fixed-Point Tool for the Simulink® model specified by modelname. You can also access this tool by the following methods:
From the Simulink Tools menu, select Fixed-Point > Fixed-Point Tool.
From a subsystem context (right-click) menu, select Fixed-Point > Fixed-Point Tool.
In conjunction with Simulink® Fixed Point™ software, the Fixed-Point Tool provides convenient access to
Model and subsystem parameters that control the logging mode and data type override, namely, MinMaxOverflowArchiveMode, MinMaxOverflowLogging, and DataTypeOverride (see Model Parameters).
Plotting capabilities that enable you to plot data that resides in the MATLAB® workspace, namely, simulation results associated with Scope, To Workspace, and root-level Outport blocks, in addition to logged signal data (see Logging Signals).
An interactive autoscaling feature that proposes fixed-point scaling for appropriately configured objects in your model, and then allows you to selectively accept and apply the scaling proposals.
You can launch the Fixed-Point Tool for any system or subsystem, and the tool controls the object selected in its Model Hierarchy pane. If Simulink Fixed Point software is installed, the Fixed-Point Tool Contents pane displays the name, data type, design minimum and maximum values, minimum and maximum simulation values, and scaling of each model object that logs fixed-point data. Additionally, if a signal saturates or overflows, the tool displays the number of times saturation or overflow occurred. You can display an object's dialog box by right-clicking the appropriate entry in the Contents pane and selecting Properties.
Note The Fixed-Point Tool works only for models that simulate in Normal mode. The tool does not work when you simulate your model in Accelerator or Rapid Accelerator mode (see Accelerating Models). |
Most of the functionality in the Fixed-Point Tool is for use with the Simulink Fixed Point software. However, even if you do not have Simulink Fixed Point software, you can use data type override to simulate a model that specifies fixed-point data types. In this mode, the Simulink software replaces fixed-point values with floating-point values when simulating the model. Data type override mode allows you to share fixed-point models with people in your company who do not have Simulink Fixed Point software.
To simulate a model in data type override mode:
From the Simulink Tools menu, select Fixed-Point > Fixed-Point Tool.
The Fixed-Point Tool appears.
Set the Data type override parameter to True doubles or True singles.
Note If a parameter in your model specifies a fi object, you can prevent the checkout of a Fixed-Point Toolbox™ license by setting the fipref DataTypeOverride property to TrueDoubles. See the Fixed-Point Toolbox documentation for more information. |

The Fixed-Point Tool includes the following components:
Model Hierarchy pane (see Model Hierarchy Pane)
Contents pane (see Contents Pane)
Dialog pane (see Dialog Pane)
Main toolbar (see Main Toolbar)
The Model Hierarchy pane displays a tree-structured view of the Simulink model hierarchy. The first node in the pane represents a Simulink model. Expanding the root node displays subnodes that represent the model's subsystems, Embedded MATLAB™ Function blocks, Stateflow® charts, and referenced models.

The Fixed-Point Tool's Contents pane displays elements that comprise the object selected in the Model Hierarchy pane. The Dialog pane provides parameters for specifying the selected object's data type override and logging mode. Objects that control the Logging mode parameter display a red flag on their icons, while those that control the Data type override parameter display a green flag. The Model Hierarchy pane indicates the value of these parameters by displaying the following abbreviations next to the object name:
| Abbreviation | Parameter Value |
|---|---|
Logging mode | |
| mmo | Minimums, maximums and overflows |
| o | Overflows only |
| fo | Force off |
Data type override | |
| scl | Scaled doubles |
| dbl | True doubles |
| sgl | True singles |
| fo | Force off |
See Dialog Pane for more information about these parameters.
The Contents pane displays a tabular view of objects that log fixed-point data in the system or subsystem selected in the Model Hierarchy pane. The table rows correspond to model objects, such as blocks, block parameters, and Stateflow data. The table columns correspond to attributes of those objects, such as the data type, design minimum and maximum values, and simulation minimum and maximum values.

Note The Contents pane displays information only after you simulate a system or propose fraction lengths. |
The Contents pane displays columns that correspond to the following properties and controls:
| Column Label | Description |
|---|---|
Name | Identifies path and name of block. |
Run | Indicates whether the Fixed-Point Tool stores results as an active or a reference run. |
SimDT | Data type the block uses during simulation. |
SpecifiedDT | Data type the block specifies in its parameter dialog box, e.g., the value of its Output data type parameter. |
ProposedDT | Data type that the Fixed-Point Tool proposes. |
Accept | Check box that enables you to selectively accept the Fixed-Point Tool's scaling proposal. |
DesignMin | Minimum value the block specifies in its parameter dialog box, e.g., the value of its Output minimum parameter. |
SimMin | Minimum value that occurs during simulation. |
ProposedMin | Minimum value that results from the data type the Fixed-Point Tool proposes. |
DesignMax | Maximum value the block specifies in its parameter dialog box, e.g., the value of its Output maximum parameter. |
SimMax | Maximum value that occurs during simulation. |
ProposedMax | Maximum value that results from the data type the Fixed-Point Tool proposes. |
OvfWrap | Number of overflows that wrap during simulation. |
OvfSat | Number of overflows that saturate during simulation. |
DTGroup | Identification tag associated with objects that share data types. |
DivByZero | Number of divide-by-zero instances that occur during simulation. |
LogSignal | Check box that allows you to enable or disable signal logging for an object. |
The following topics describe ways in which you can customize the Contents pane:
You can alter the order and width of columns that appear in the Contents pane as follows:
To move a column, click and drag the head of a column to a new location among the column headers.
To make a column wider or narrower, click and drag the right edge of a column header. If you double-click the right edge of a column header, the column width changes to fit its contents.
By default, the Contents pane displays its contents in ascending order of the Name column. You can alter the order in which the Contents pane displays its rows as follows:
To sort all the rows in ascending order of another column, click the head of that column.
To change the order from ascending to descending, simply click again on the head of that column.
You can select the properties that the Contents pane displays or hides by using the Customize Contents pane. When visible, the pane appears in the lower-left corner of the Fixed-Point Tool window.

To access the Customize Contents pane, from the Fixed-Point Tool View menu, select Customize Contents. A splitter divides the Customize Contents pane from the Model Hierarchy pane above it. Drag the splitter up or down to adjust the relative size of the two panes.
To hide properties from the Contents pane, in the Customize Contents pane, expand the Current Properties node and uncheck the properties that you do not want to appear.
To display additional properties in the Contents pane, in the Customize Contents pane, expand the All Properties node and select the desired properties.
Use the Dialog pane to view and change particular properties associated with the object selected in the Model Hierarchy pane.

Tip From the Fixed-Point Tool View menu, you can select Dialog View to hide the Dialog pane, making more room for the other components. |
The Dialog pane displays the following items:
Click to perform the first phase of the autoscaling procedure, in which the Fixed-Point Tool collects range data for model objects—either from design minimum and maximum values the objects specify explicitly, or from logged minimum and maximum values that occur during simulation. Based on these values, the tool proposes fraction lengths for blocks whose
Lock output scaling against changes by the autoscaling tool parameter is not selected.
Data type specifies a generalized fixed-point number.
The Fixed-Point Tool lists its scaling proposals in the Contents pane. The tool alerts you to potential scaling issues for each object in the list by displaying a green, yellow, or red icon, as shown here:
|
| The proposed scaling poses no issues for this object. |
|
| The proposed scaling poses potential issues for this object. Open the Autoscale Information dialog box to review these issues. |
|
| The proposed scaling will introduce data type errors if applied to this object. Open the Autoscale Information dialog box for details about how to resolve these issues. |
Click to perform the second phase of the autoscaling procedure, in which the Fixed-Point Tool applies the scaling proposals to the objects whose Accept check box in the Contents pane is selected.
The Fixed-Point Tool uses the Percent safety margin parameter when proposing fraction lengths. Before performing autoscaling, you must either specify design min/max values or run the simulation to collect min/max data. To learn how to do this, see Fixed-Point Tool in the Simulink Fixed Point documentation.
The min/max values are multiplied by the factor designated by this parameter, allowing you to specify a range different from that defined by, e.g., the maximum and minimum values logged to the workspace. For example, a value of 55 specifies that a range at least 55 percent larger is desired. A value of -15 specifies that a range up to 15 percent smaller is acceptable.
If selected, the Fixed-Point Tool proposes fraction lengths based on simulation minimum and maximum values, but only for blocks that do not specify minimum or maximum values using, e.g., Output minimum and Output maximum parameters. Otherwise, the Fixed-Point Tool ignores simulation minimum and maximum values when proposing fraction lengths.
Display Autoscale Information dialog box for object selected in the Contents pane.
Click to swap the results that the Fixed-Point Tool stores as an active run with those that it stores as a reference run.
Simulate a model and store results as active run, denoted by the Active label in the Run column of the Contents pane.
Controls which objects log data during simulation. The value of this parameter for parent systems controls logging for all child subsystems, unless Use local settings is selected:
Use local settings — Data is logged according to the value of this parameter set for each subsystem. Otherwise, settings for parent systems always override those of child systems.
Minimums, maximums and overflows — Minimum value, maximum value, and overflow data is logged for all blocks in the current system or subsystem.
Overflows only — Only overflow data is logged for all blocks in the current system or subsystem.
Force off — No data is logged for any block in the current system or subsystem. Use this selection to work with models containing fixed-point enabled blocks if you do not have a Simulink Fixed Point license.
Controls data type override of objects that allow you to specify data types in their dialog boxes. The value of this parameter for parent systems controls data type override for all child subsystems, unless Use local settings is selected:
Use local settings — Data types are overridden according to the value of this parameter set for each subsystem. Otherwise, settings for parent systems override those of child systems.
Scaled doubles — The output data type of all blocks in the current system or subsystem is overridden with doubles; however, the scaling and bias specified in the mask of each block is maintained.
True doubles — The output data type of all blocks in the current system or subsystem is overridden with true doubles. The overridden values have no scaling or bias.
True singles — The output data type of all blocks in the current system or subsystem is overridden with true singles. The overridden values have no scaling or bias.
Force off — No data type override is performed on any block in the current system or subsystem.
Set this parameter to True doubles or True singles to work with models containing fixed-point enabled blocks if you do not have a Simulink Fixed Point license.
Note The following Simulink blocks allow you to set data types in their block masks, but ignore the Data type override setting: Probe, Trigger, Width. The Embedded MATLAB Function block ignores the Data type override parameter if it specifies Scaled doubles. |
Controls the logging type:
Overwrite — Completely clears existing simulation results from the Contents pane before displaying new simulation results.
Merge — Merges new simulation results with existing simulation results in the Contents pane.
The Fixed-Point Tool's main toolbar appears near the top of the Fixed-Point Tool window under the Fixed-Point Tool's menu.

The toolbar contains the following buttons that execute commonly used Fixed-Point Tool commands:
| Button | Usage |
|---|---|
|
| Propose fraction lengths. |
|
| Apply accepted fraction lengths. |
|
| Display autoscale information. |
|
| Exchange active results with reference results. |
|
| Simulate a model and store results as active run. |
|
| Pause a simulation. |
|
| Stop a simulation. |
|
| Create a time series plot. |
|
| Create a histogram plot. |
|
| Create a time series difference (A-R) plot. |
The Fixed-Point Tool provides plotting capabilities that enable you to plot signals for graphical analysis. The tool can access signal data that resides in the MATLAB workspace, allowing you to plot simulation results associated with
Scope blocks whose Save data to workspace parameter is selected
To Workspace blocks
Root-level Outport blocks, when the Output check box on the Data Import/Export pane of the Configuration Parameters dialog box is selected
Logged signal data (see Logging Signals)
Tip
The Contents pane of the Fixed-Point Tool
displays an antenna icon
|
You can create the following types of plots using the Fixed-Point Tool's interface:
Time series plot — Plots data as a function of time.

Histogram plot — Plots the number of data values that occur at each bit.

Time series difference (A-R) plot — Plots both the active and reference versions of a signal on the upper axes, and plots the difference between the active and reference versions of that signal on the lower axes.

The Fixed-Point Tool provides options that allow you to control signal logging in a model (see Logging Signals). Using these options, you can enable or disable logging for multiple signals simultaneously, based on signal attributes such as:
The location of signals in a model hierarchy
Whether or not signals have names
To access the signal logging options in the Fixed-Point Tool:
In the Model Hierarchy pane, right-click a node that represents either a model or a subsystem.
The Fixed-Point Tool displays a context menu for the selected node.
In the context menu, select either Enable Signal Logging or Disable Signal Logging.
The Fixed-Point Tool displays a submenu that lists a variety of signal logging options.

Choose from the following signal logging options:
Select... | To Enable or Disable Signal Logging for... |
|---|---|
All Signals in this System | All signals in the selected system |
All Signals from Here Down | All signals in the selected system and its subsystems |
Outports in this System | All Outport blocks in the selected system |
Named Signals in this System | All signals in the selected system, whose Signal name parameter specifies a value |
Named Signals from Here Down | All signals in the selected system and its subsystems, whose Signal name parameter specifies a value |
Unnamed Signals in this System | All signals in the selected system, whose Signal name parameter is empty |
Unnamed Signals from Here Down | All signals in the selected system and its subsystems, whose Signal name parameter is empty |
Note The Fixed-Point Tool does not control signal logging for Stateflow charts, referenced models, and subsystems with library links. It ignores these objects when enabling or disabling signal logging in a model hierarchy. |
To learn how to use the tool, see Fixed-Point Tool in the Simulink Fixed Point documentation.
![]() | float | gcb | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |