Reference another model to create model hierarchy
Simulink / Ports & Subsystems
HDL Coder / Ports & Subsystems
TheModelblock references the specified model. It displays input and output ports that correspond to the top-level input and output ports of the referenced model. These ports allow you to connect the referenced model to other blocks in the parent model.
To determine whether theModelblock is better suited for your goal than another block with similar functionality, seeChoose Among Types of Model ComponentsandCompare Capabilities of Model Components.
For instructions on how to reference a model with aModelblock, seeReference Existing Models.
By default, theModelblock displays a representation of the contents of the referenced model. For more information, see预览内容的模型组件. To see the contents of a referenced model, double-click theModelblock.
If you have a金宝app®Coder™license, you can conceal the implementation details of a referenced model by protecting the model. To protect a model, seeProtect Models to Conceal Contents(Simulink Coder). To reference a protected model, seeReference Protected Models from Third Parties.
To programmatically determine whether aModelblock references a protected model, use theget_param
function to query the read-onlyProtectedModel
parameter of theModelblock. If the referenced model is protected, the function returns'on'
. If the referenced model is unprotected, the function returns'off'
.