| Using Simulink | ![]() |
Model Referencing Versus Subsystems
Like subsystems, model referencing allows you to organize large models hierarchically, with Model blocks representing major subsystems. However, model referencing has significant advantages over subsystems in many applications. The advantages include:
You can reference a model multiple times in another model without having to make redundant copies and multiple models can reference the same model.
The referenced model is not loaded until it is needed, speeding up model loading (see Incremental Loading for more information).
Simulink and Real-Time Workshop create binaries to be used in simulations and stand-alone applications to compute the outputs of the included blocks. If the binaries are up-to-date, that is, the binaries are not older than the models from which they were generated, no code generation occurs when models that reference them are simulated or compiled.
Simulink provides a tool to convert atomic subsystems to stand-alone models and to reconfigure the root model by replacing the subsystems with Model blocks. For further information, see Converting Subsystems to Model References. It also provides a command, find_mdlrefs, to find all models directly or indirectly referenced by a given model.
| Referencing Models | Creating a Model Reference | ![]() |
© 1994-2005 The MathWorks, Inc.