fxptdlg - Invoke Fixed-Point Tool

Syntax

fxptdlg('modelname')

Description

fxptdlg('modelname') launches the Fixed-Point Tool for the Simulink® model specified by modelname. You can also access this tool by the following methods:

In conjunction with Simulink® Fixed Point™ software, the Fixed-Point Tool provides convenient access to

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.

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:

  1. From the Simulink Tools menu, select Fixed-Point > Fixed-Point Tool.

    The Fixed-Point Tool appears.

  2. Set the Logging mode parameter to Force off.

  3. Set the Data type override parameter to True doubles or True singles.

Parameters and Dialog Box

The Fixed-Point Tool includes the following components:

Model Hierarchy Pane

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:

AbbreviationParameter Value

Logging mode

    mmoMinimums, maximums and overflows
    oOverflows only
    foForce off

Data type override

    sclScaled doubles
    dblTrue doubles
    sglTrue singles
    foForce off

See Dialog Pane for more information about these parameters.

Contents Pane

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.

The Contents pane displays columns that correspond to the following properties and controls:

Column LabelDescription

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:

Changing Column Order and Width

You can alter the order and width of columns that appear in the Contents pane as follows:

Sorting Rows by Column

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:

Hiding Columns

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.

Dialog Pane

Use the Dialog pane to view and change particular properties associated with the object selected in the Model Hierarchy pane.

The Dialog pane displays the following items:

Propose fraction lengths

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

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.

Apply accepted fraction lengths

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.

Percent safety margin

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.

Use SimMin/Max if DesignMin/Max are not available

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.

Show autoscale information for selected result

Display Autoscale Information dialog box for object selected in the Contents pane.

Exchange Active and Reference results

Click to swap the results that the Fixed-Point Tool stores as an active run with those that it stores as a reference run.

Run simulation and store Active results

Simulate a model and store results as active run, denoted by the Active label in the Run column of the Contents pane.

Logging mode

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:

Data type override

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:

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.

Overwrite or merge results

Controls the logging type:

Main Toolbar

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:

ButtonUsage

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.

Plot Interface

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

You can create the following types of plots using the Fixed-Point Tool's interface:

Signal Logging Options

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:

To access the signal logging options in the Fixed-Point Tool:

  1. 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.

  2. 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

Examples

To learn how to use the tool, see Fixed-Point Tool in the Simulink Fixed Point documentation.

See Also

autofixexp, showfixptsimerrors, showfixptsimranges

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS