.. _libraries_and_model_references: Model Referencing ================= OpenECU provides limited support for model referencing. * Shared utility source and model references are only supported in Embedded Coder. * The model reference blocks currently only support native Simulink blocks and the **put_Identification** block. * The reference models do not require a Model Identification block in order to build. * Reference models can contain Data Dictionary calibrations and displayables if only one instance of a reference model is used in the parent model. If multiple instances exist then there will be a namespace clash. In the model configuration options, there are parameters for the OpenECU target settings which are stored in the Configuration Set of the model. These parameters can be modified using the **put_Identification** blick in the top-level model and then propagated to each reference model by either: 1. Clicking the "Propagate settings to Model References" button on the OpenECU target settings tab of the Real-Time Workshop Configuration Parameters menu. 1. Running the MATLAB script ``oe_propogate_target_settings(bdroot)``. ---- Simulink Library Models ======================= OpenECU blocks can be used in library blocks. It is common to separate a Simulink model into components using Library models, which are then linked into the main model. This can cause some problems if there are OpenECU blocks in the library files. When the model initializes (when it's opened), the OpenECU blocks look for the **put_Identification** block. This is needed by some blocks in order to populate the dropdown menu options (typically I/O blocks which have a channel selection based on the type of ECU). If the Model Identification block cannot be found, then the dropdown menu will be populated with all of the options, which can cause the selected channel to be changed.