Model Data Editor
Inspect and edit data items (signals, parameters, and states) in a table that you can sort, group, and filter
Description
The Model Data Editor enables you to inspect and edit data items such as signals, block parameters (for example, the Gain parameter of a Gain block), and data stores in a list that you can sort, group, and filter. You can then configure properties and parameters, such as data types and dimensions, without having to locate the items in the block diagram.
Use the Model Data Editor to configure multiple signals, states, and algorithmic parameters. The Model Data Editor can set only certain parameters and properties such as data types, initial values, and physical units. To work with one model element at a time, open the Property Inspector. To perform batch operations, open the Model Data Editor. For information about how to batch edit block parameter values using the Model Data Editor, see Batch Edit Parameter Values Using Model Data Editor.
For information about setting signal properties and parameters, see Signal Properties.
When creating and debugging a model, you can configure multiple data items at once by selecting the corresponding signals and blocks in the block diagram. Work with the selected items in the Model Data Editor instead of opening individual dialog boxes. Use this technique to more quickly view and compare properties of multiple signals that are close to each other in the diagram, for example, in a subsystem.
Use the Model Data Editor to configure:
Instrumentation for signals and data stores, which allows you to view and collect the simulation values. For example, you can log signals to compare data in the Simulation Data Inspector.
Design attributes such as data type, minimum and maximum value, and physical units. You can use these attributes to:
Specify the values of numeric block parameters.
Control the interaction (interface) between components through Inport and Outport blocks and data stores (see Configure Data Interfaces).
Specify the dimensions of nonscalar signals in a model.
Note
The Model Data Editor does not show information about data items in referenced models (which you reference with Model blocks). To work with data items in a referenced model, open the Model Data Editor in that model.
Columns in the Data Table
Use this table to find more information about the purpose of the columns in the Model Data Editor.
| Column Name | Purpose and More Information |
|---|---|
| Source | Shows the name of the block that defines the data item. For signals, also shows the number of the block port that generates the signal. For workspace variables, shows the name of the workspace or data dictionary that contains the variable. |
| Signal Name or Name | Sets the name of the signal, state, or data store. For information about naming signals, see Signal Names and Labels. For parameters, displays the programmatic name of each parameter. For workspace variables, sets the name of the variable. |
| Data Type | Control Data Types of Signals and Control Block Parameter Data Types |
| Min and Max | Specify Signal Ranges and Specify Minimum and Maximum Values for Block Parameters |
| Dimensions | Determine Signal Dimensions |
| Complexity | Sets the numeric complexity of the data item. |
| Sample Time | What Is Sample Time? |
| Unit | Unit Specification in Simulink Models |
| Test Point | Configure Signals as Test Points |
| Log Data | Iterate Model Design Using the Simulation Data Inspector |
| Resolve | Corresponds to the Signal name must resolve to Simulink signal object check box in the Signal Properties dialog box and similar check boxes in block dialog boxes for states and data stores. See Use Signal Objects. |
| Shared | Corresponds to the Share across model instances parameter of the Data Store Memory block. See Data Store Memory. |
| Initial Value | Sets the initial value of the state or data store. See Initialize Signal Values. |
| Value | Set Block Parameter Values |
| Argument | Configures a variable in a model workspace as a model argument. See Configure Instance-Specific Values for Block Parameters in a Referenced Model. |
| Path | Shows the location of the block in the model and provides a link to the block in the Simulink® Editor. Visible when you click the Change Scope button. |
Two Entries Per Cell in the Data Table
When a cell contains two entries (for instance, in the Data Type column), the entry on the right side of the cell indicates compiled information. The compiled information shows you the value that the data item uses for simulation.
For example, the default data type setting for most signals in a model is
Inherit: Inherit via internal rule. With this
setting, after you update the block diagram, Simulink chooses a specific data type, such as single, for
the signal to use for simulation. In the Model Data Editor, the cell in the
Data Type column shows Inherit: Inherit via
internal rule on the left side and single on the
right side.
Open the Model Data Editor
In the Simulink Toolstrip, on the Modeling tab, click Model Data Editor.
While in the Simulink Editor, press Ctrl+Shift+E.
Examples
Related Examples
Limitations
You cannot access these attributes by using the Model Data Editor:
Any settings related to code generation. Instead, use the Code Mappings editor or code mappings API.
For mask parameters:
Any settings for tunable mask parameters other than the parameter value.
Any settings for nontunable mask parameters.
Note that some built-in blocks are masked and can have tunable or nontunable mask parameters.
Any settings for parameters of Simscape™ blocks.
Any settings for data items in referenced models. Instead, open the Model Data Editor in the referenced models.
Any settings for variables that are not defined in the base workspace, a model workspace, or a data dictionary. For example, you cannot access the attributes of variables created by mask initialization code.
On the Parameters tab, the data type, minimum value, and maximum value of a Constant block. Use the Signals tab instead.
For some settings that you cannot access with the Model Data Editor, you can use the Property Inspector instead. Open the Property Inspector and select the target data item in the model, not in the Model Data Editor. For mask parameters, use the mask dialog box or the Mask Editor as described in Masking Fundamentals.
The Model Data Editor does not show Stateflow® data. However, the Model Data Editor shows the data for Simulink functions that you define inside Stateflow charts.
To manage Stateflow data, events, and messages in a chart, see Stateflow Editor (Stateflow).
On the Parameters tab, these variables are not available:
Variables used by non-tunable block parameters. For example, the minimum and maximum parameters on a Gain block or the
Sample timeon a Constant block.Variant control variables
Variables used for symbolic dimensions
Version History
Introduced in R2016b
