Main Content

saveParamSet

Save real-time application parameter values

Since R2021a

Description

saveParamSet(target_object,filename,page,options) saves the parameter values from the given memory page of the loaded real-time application into a parameter set file on the Speedgoat® target computer.

You also can save a parameter set from a real-time application from the RTOS command line. For more information, see Execute Target Computer RTOS Commands at Target Computer Command Line and Target Computer Command-Line Interface.

example

Examples

collapse all

Save parameters from the loaded application slrt_ex_osc_outport to a file named 'myParamSet'.

tg = slrealtime;
mdlSTF = getSTFName(tg);
mdlName = 'slrt_ex_osc_outport';
openExample(mdlName);
set_param(mdlName,"SystemTargetFile",mdlSTF);
slbuild(mdlName);
load(tg,mdlName);
paramSetName = 'myParamSet';
saveParamSet(tg,paramSetName,1);
myParamSet = importParamSet(tg,paramSetName);

Input Arguments

collapse all

Provides access to methods that manipulate the target computer properties.

Example: tg

Enter the name of the parameter set file from the target computer file system.

Example: 'outportTypes'

Data Types: char | string

(Optional.) Select memory page of the loaded real-time application for parameters.

Example: 0

(Optional.) If false, the saveParamSet function generates an error when overwriting an existing parameter set. If true, the saveParamSet function overwrites an existing parameter set without issuing an error.

Example: saveParamSet(tg,paramSetName,1,'overwrite',true)

Version History

Introduced in R2021a

expand all