One possibility to set the value of an actual model instance parameter is to link it with a formal parameter of the model in which the model instance is embedded.
Linking means that the values of the model parameter are used as parameter values of model instances. In this way, you can pass parameter values from the system model level down to the primitive model level. Linking is realized using the parameter names, that is, if an actual parameter value expression of a model instance contains the name of a formal parameter of the model that embeds the model instance.
Here you see an example of linked actual parameter expressions. This is a parameter linking in the SinusGenerator module that can be found in the MLD Libraries→DEMO→SDF Demo→Basic→sinMod system model. In this example the model defines the formal parameter SampleRate, Frequency, and Phase. The values of these formal parameters are used to set the actual parameter values of the Ramp primitive instance. The example shows two kinds of linking:
The former case is called indirect linking whereas the latter case is called direct linking. Direct linking is indicated by a green arrow in the parameter value field.
To create a direct link you can either export the actual model instance parameter as a new formal model parameter (see Creating and deleting parameters), or you can link the actual model instance parameter to an existing formal model parameter. In the latter case, select the model instance of the actual parameter to link to and activate the Instance Properties plane. Right-click in the property editor on the parameter entry, point to Link to, and then click the item in the list of existing formal parameters that you want to create the link to. You will then see a green arrow indicating that a link exists.