Select Default Parameter Set for Application on Target Computer
After you have created one or more parameter set file on the target
computer, you can select one of these parameter sets as the default parameter set for
the real-time application by using the setDefaultParamSet
. The default parameter set name is added to the
real-time application MLDATX file on the target computer. When you load the real-time
application on the target computer, Simulink®
Real-Time™ loads the default parameter set.
This example loads a real-time application, creates a parameter set file, and selects the parameter set as the default parameter set for the application.
% connect to target computer; open model; build app; tg = slrealtime; modelSTF = getSTFName(tg); model = 'slrt_ex_osc_outport'; openExample(model); set_param(model,"SystemTargetFile",modelSTF); slbuild(model); % load app; save param set; load(tg,model); paramSetName = 'outportTypes'; saveParamSet(tg,paramSetName); % select default param set in app MLDATX file on target computer setDefaultParamSet(tg,model,paramSetName);
Note
The default parameter set and startup parameter set are different names for the same parameter set that Simulink Real-Time loads when loading the real-time application. The different names denote different workflows for selecting the default or startup parameter sets and the location where the parameter set is stored.
By using the
setDefaultParameSet
function, you set the default parameter set selection in the real-time application MLDATX file on the target computer.By using the
updateStartupParameterSet
function, you set the startup parameter set selection in the real-time application MLDATX file on the development computer.
For more information, see Save and Reload Parameters by Using the MATLAB Language.