User`s guide
3 Signals and Parameters
3-56
Inlined Parameters
This procedure describes how you can globally inline parameters for a model,
then specify which of these parameters you still want to be tunable. It assumes
that you are familiar with how to build target applications (if you are not, read
the xPC Target getting started documentation first). After you have performed
this procedure, you will able to tune these parameters.
• “Tuning Inlined Parameters with xPC Target Explorer” on page 3-58
• “Tuning Inlined Parameters with MATLAB” on page 3-60
The following procedure uses the Simulink model
xpcosc.mdl as an example.
1 In the MATLAB Command Window, type
xpcosc
The model is displayed in the Simulink window.
2 Select the blocks of the parameters you want to make tunable. For example,
this procedure makes the signal generator’s amplitude parameter tunable.
Use the variable
A to represent the amplitude.
3 Double-click the Signal Generator block and enter A for the Amplitude
parameter. Click
OK.
4 In the MATLAB Command Window, assign a constant to that variable. For
example, type
A = 4
The value is displayed in the MATLAB workspace.
5 In the Simulink window, from the Simulation menu, click Configuration
Parameters
.
The Configuration Parameters dialog is displayed for the model.
6 Click the Optimization node.
7 In the rightmost pane, select the Inline parameters check box.
The
Configure button is enabled.