Main Content

addParamSet

Add a parameter set to a real-time application

    Description

    addParamSet(app_object,parameter_set) adds a ParameterSet object to a real-time application MLDATX on the MATLAB® development computer. When the real-time application is loaded or installed on the Speedgoat® target computer, the parameter sets added to the application appear on the target computer for the application.

    example

    Examples

    collapse all

    To add a ParameterSet object to a real-time application, use the addParamSet function.

    Create a Simulink Real-Time application object for the slrt_ex_osc_outport model.

    tg = slrealtime;
    modelSTF = getSTFName(tg);
    modelName = "slrt_ex_osc_outport";
    openExample(modelName);
    set_param(modelName,"SystemTargetFile",modelSTF);
    slbuild(modelName);
    myAppObj = slrealtime.Application(modelName);
    

    Get default parameter set from the application.

    paramSetObj = getParamSet(myAppObj);
    paramSetObj = 
    
      ParameterSet with properties:
    
        filename: 'paramInfo'

    Change the file name of the parameter set by using the filename property and create a new parameter set from the default parameter set.

    paramSetObj.filename = "myParamSet1";
    addParamSet(myAppObj,paramSetObj);

    Get the newly added parameter set.

    myParamSet = getParamSet(myAppObj,"myParamSet1");
    myParamSet = 
    
      ParameterSet with properties:
    
        filename: 'myParamSet1'

    Input Arguments

    collapse all

    Provides access to methods that manipulate the real-time application files.

    The ParameterSet object that was created from the real-time application in the importParamSet command.

    Example: myParamSet

    Version History

    Introduced in R2021a