Skip to Main Content Skip to Search
Product Documentation

ssRegDlgParamAsRunTimeParam - Register a dialog parameter as a run-time parameter

Syntax

void ssRegDlgParamAsRunTimeParam(SimStruct *S, int_T dlgIdx,
 int_T rtIdx, const char_T *name, DTypeId dtId)

Arguments

S

SimStruct representing an S-Function block.

dlgIdx

Index of the dialog parameter.

rtIdx

Index of the run-time parameter.

name

Name of the run-time parameter.

dtId

Value of type DTypeId that specifies the data type of the run-time parameter.

Description

Use this function in mdlSetWorkWidths to register the dialog parameter specified by dlgIdx as a run-time parameter specified by rtIdx and having the name and data type specified by name and dtId, respectively. This function also initializes the run-time parameter to the initial value of the dialog parameter, converting the value to the specified data type if necessary. For a list of built-in values for the data type ID dtId, see ssGetInputPortDataType.

If the data type conversion results in precision loss or data overflow, the Simulink engine takes the action defined by the Diagnostics Pane: Data Validity configuration parameters. See the Diagnostics Pane: Data Validity reference page in Simulink Graphical User Interface for a description of the data validity settings that apply to parameters.

See Run-Time Parameters for more information on run-time parameters.

Languages

C, C++

Example

See the S-function sfun_runtime3.c used in sfcndemo_runtime.mdl.

See Also

ssRegAllTunableParamsAsRunTimeParams

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS