Model
Model-link to create a hierarchy of models.
blockType: ModelReference
Path in the library:
|
Description
The Model block references the specified model (model-reference). It displays input and output ports corresponding to the top-level input and output ports of the reference model. These ports allow the reference model to be connected to other blocks of the parent model (block Model).
The Model block displays a representation of the contents of the reference model. To view its contents, double-click the Model block.
The input port properties (block In1) of the reference model are not inherited from the parent model, but are extracted from the input ports of the reference model itself. A mismatch between the properties of the input ports of the reference model and the parent model will result in an error. Therefore, manual setting of parameters is required for each input port of the reference model.
To open the properties of an input port, double click on it with the left mouse button:
Therefore, you must manually specify for each input port of the reference model:
-
Sample Time (sampling period), Main tab;
-
Output data type, Signal Attributes tab;
-
Port dimensions, Signal Attributes tab;
-
Signal type (signal type), Signal Attributes tab.
To display information about some signal attributes in the model, open Settings ![]() |
|
Ports
Input
Port_1 - model input
scalar
| vector
| matrix
| array
| bus
The Model block has an input port for each input port of the model-reference. Each input port of the Model block is a top-level input of the reference model.
The input port name of the Model block is the same as the corresponding input port name of the reference model.
The input port can read duplicated model-reference ports (e.g., using block In1):
Output
Port_2 - model output
scalar
| vector
| matrix
| array
| bus
The Model block has an output port for each model-reference output port. Each output port of block Model is a top-level model-reference output, e.g., an output through block Out1.
The name of the output port in the Model block is the same as the name of the corresponding model-reference output port.
Parameters
Basic
Select model - name of the model-reference file
no by default
Specify the name of the reference model file. To select a model reference, click Select Model in the block setup menu and select the model by its name. To view the specified model, click on the path to the selected model in the same menu or double-click on the block Model.
Update Connectors - updates the input/output ports of the model
`no by default'
Update the input/output ports of the Model block after making changes to the model-link. To display the changes in the Model block, save the model-reference beforehand.