Simulink model reference model argument values
A model becomes a referenced model when a Model block in another model references it. Any model can function as a referenced model and can continue to function as a separate model.
To reference an existing model in another model:
- If the folder that contains the model you want to reference is not on the MATLAB ® path, add the folder to the MATLAB path. For more information, see What Is the MATLAB Search Path?
- If you plan to reference the model once at most in a model hierarchy, in the configuration set of the referenced model, set Total number of instances allowed per top model to One . Otherwise, use the default value Multiple , which lets you reference the model more than once in a model hierarchy.
- To reference another model, add a Model block. The new block is initially unresolved because it does not specify a model to reference.
block with red corners and text that says, "Unspecified Model Name"" width="164" height="67" />
Block Parameters dialog box for Model block." width="424" height="375" />
Connect Model Block Ports
The Model block displays a port for each root-level input and output port of the referenced model. When you connect a signal to a Model block port, you connect the signal to the corresponding port of the referenced model.
The port of the referenced model determines what connections the Model block supports. For example, a port might require a bus or a signal with a data type of uint8 .
For more information about model reference interfaces, see Define Model Reference Interfaces.
Configure Model Block Parameters
You can use Model block parameters to specify:
- Simulation mode
- Code interface
- Model events, such as initialize, reinitialize, reset, and terminate events
- Scheduling via periodic event ports or the Schedule Editor
- Instance-specific parameter values for model arguments
- Local solver
For information about the block parameters and the values they support, see Model .
When a Model block references another model, double-clicking the Model block opens the referenced model, not the Block Parameters dialog box.
To access block parameters, select the Model block. Then, open the Property Inspector or Block Parameters dialog box.
- Property Inspector — In the Simulink ® Toolstrip, on the Modeling tab, in the Design gallery, select Property Inspector.
- Block Parameters dialog box — In the Simulink Toolstrip, on the Model Block tab, click Block Parameters.
Related Topics
- Inspect Model Hierarchies
- Model Reference Requirements and Limitations
- Reference Protected Models from Third Parties
- Convert Subsystems to Referenced Models
- Conditionally Execute Referenced Models