User`s guide
3 Signals and Parameters
3-54
• You have parameters you would like to save for reuse. See
- “Parameter Tuning with MATLAB” on page 3-47
- “Parameter Tuning with Simulink External Mode” on page 3-50
- “Parameter Tuning with a Web Browser” on page 3-53
Saving the Current Set of Target Application Parameters
To save a set of parameters to a target application, use the saveparamset
method. The target application can be stopped or running.
1 Identify the set of parameter values you want to save.
2 Select a descriptive filename to contain these values. For example, use the
model name in the filename. You can only load parameter values to the same
target application from which you saved the parameter values.
3 In the MATLAB window, type either
tg.saveparamset('xpc_osc4_param1') or
saveparamset(tg,'xpc_osc4_param1')
xPC Target creates a file named xpcosc4_param1 in the current directory of
the target PC, for example,
C:\xpcosc4_param1.
For a description of how to restore parameter values to a target application, see
“Loading Saved Parameters to a Target Application” on page 3-54. For a
description of how to list the parameters and values stored in the parameter
file, see “Listing the Values of the Parameters Stored in a File” on page 3-55.
Loading Saved Parameters to a Target Application
To load a set of saved parameters to a target application, use the loadparamset
method. You must load parameters to the same model from which you save the
parameter file. If you load a parameter file to a different model, the behavior is
undefined.
This section assumes that you have a parameters file saved from an earlier run
of
saveparamset (see “Saving the Current Set of Target Application
Parameters” on page 3-54).
1 From the collection of parameter value files on the target PC, select the one
that contains the parameter values you want to load.