Skip to Main Content Skip to Search
Product Documentation

Best Practices for Using the Fixed-Point Tool to Propose Data Types for Your Simulink Model

Use a Known Working Simulink Model

Before you begin automatic data typing, verify that update diagram succeeds for your model. To update the diagram, press Ctrl+D. If update diagram fails, before automatic data typing to propose data types, fix the failure in your model.

Back Up Your Simulink Model

Before using the Fixed-Point Tool, back up your Simulink model and associated workspace variables.

Backing up your model provides a back-up of your original model in case of error and a baseline for testing and validation.

Capture the Current Fixed-Point Instrumentation and Data Type Override Settings

Before changing these settings, use the Fixed-Point Tool Shortcut Editor to create a shortcut for these settings. Creating a shortcut allows you to revert to the original model settings. For more information, see Capture Current Model Settings Using the Shortcut Editor.

Convert Individual Subsystems

Convert individual subsystems in your model one at a time. This practice facilitates debugging by isolating the source of fixed-point issues. For example, see Debug a Fixed-Point Model.

Isolate the System Under Conversion

If you encounter data type propagation issues with a particular subsystem during the conversion, isolate this subsystem by placing Data Type Conversion blocks on the inputs and outputs of the system. The Data Type Conversion block converts an input signal of any Simulink data type to the data type and scaling you specify for its Output data type parameter. This practice enables you to continue automatic data typing for the rest of your model.

Use Lock Output Data Type Setting

You can prevent the Fixed-Point Tool from replacing the current data type. Use the Lock output data type setting against changes by the fixed-point tools parameter that is available on many blocks. The default setting allows for replacement. Use this setting when:

Save Simulink Signal Objects

If your model contains Simulink signal objects and you accept proposed data types, the Fixed-Point Tool automatically applies the changes to the signal objects. However, the Fixed-Point Tool does not automatically save changes that it makes to Simulink signal objects. To preserve changes, before closing your model, save the Simulink signal objects in your workspace and model.

Test Update Diagram Failure

Immediately after applying data type proposals, test update diagram. If update diagram fails, perform one of the following actions:

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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