The next step in this example is the creation of parameters Frequency and SampleRate for our Sine Generator module. Switch to the Model Editor Window that contains the Sine Generator module and follow the steps below. Exporting parameters will be demonstrated for the creation of the parameters of the Sine Modulator module in Set parameters of model instances.
Add parameter Frequency to Sine Generator
- Select the Model Editor Window that contains the Sine Generator module.
- Right-click in the property editor and select the item New Parameter.
- Expand Parameter1 if necessary.
- Set the name to Frequency.
- Set the type to float.
- Set the default value to PI/50.
- Set the description to The frequency of the generated sine wave.
- Collapse the changed parameter Frequency.
Add parameter SampleRate to Sine Generator
- Right-click in the property editor and select the item New Parameter.
- Set the name to SampleRate.
- Set the type to float.
- Set the default value to 2*PI.
- Set the description to The sample rate of the module.
- Save the model using the tool button Save Model (Ignore error message).
The next step is to add model instances.