Reference Existing Models
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, follow these steps.
If the folder containing the model you want to reference is not on the MATLAB® path, add the folder to the MATLAB path.
In the referenced model, set Total number of instances allowed per top model to:
Oneto use the model at most once in a model hierarchy.
Multipleto use the model more than once in a model hierarchy. To reduce overhead, specify
Multipleonly when necessary.
Zeroto preclude referencing the model.
Add a Model block to the parent model. The new block is initially unresolved because it does not specify a referenced model.
To open the Block Parameters dialog box, double-click the unresolved Model block.
Enter the name of the referenced model in the Model name field. This name must contain fewer than 60 characters, exclusive of the file extension.
Click OK. If the referenced model contains root-level inputs or outputs, the Model block displays corresponding input and output ports.
Use the Model block ports to connect referenced model signals to ports in the parent model. See Define Model Reference Interfaces.
When a Model block references another model, double-clicking the Model block opens the referenced model. To open the Block Parameters dialog box for a Model block, select the Model block. In the Simulink® Toolstrip, on the Model Block tab, click Block Parameters.