Skip to Main Content Skip to Search
Product Documentation

ssSetSFcnParamTunable - Make a block parameter tunable

Syntax

void ssSetSFcnParamTunable(SimStruct *S, int_T param,
  int_T isTunable)

Arguments

S

SimStruct representing an S-Function block.

param

Index of the parameter.

isTunable

Valid values are SS_PRM_TUNABLE (true / tunable), SS_PRM_NOT_TUNABLE (false / not tunable), or SS_PRM_SIM_ONLY_TUNABLE (tunable only during simulation).

Description

Use this macro in mdlInitializeSizes to specify whether a user can change a dialog parameter during the simulation. The parameter index starts at 0 and is less than ssGetSFcnParamsCount(S). This improves efficiency and provides error handling in the event that an attempt is made to change the parameter.

If you specify the SS_PRM_TUNABLE option, you must create a corresponding run-time parameter (see Creating Run-Time Parameters). You do not have to create a corresponding run-time parameter if you specify the SS_PRM_SIM_ONLY_TUNABLE option.

Languages

C, C++

Example

See the following S-functions for examples that use this function:

See Also

ssGetSFcnParamsCount

  


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