ssSetModelReferenceNormalModeSupport
Specify if S-function can be used in referenced model that simulates in normal mode
Syntax
void ssSetModelReferenceNormalModeSupport(SimStruct *S, ssModelReferenceNormalModeSupport mode)
Arguments
S
SimStruct that represents an S-Function block.
mode
Flag for normal mode simulation support when the S-Function block is used in a referenced model. Options are
DEFAULT_SUPPORT_FOR_NORMAL_MODE
(0
) orMDL_START_AND_MDL_PROCESS_PARAMS_OK
(1
).
Description
Use in mdlInitializeSizes
to specify if an S-function with both
an mdlStart
and an mdlProcessParameters
method can be
used in a referenced model that simulates in normal mode. Permissible values are:
DEFAULT_SUPPORT_FOR_NORMAL_MODE
: The Simulink® engine produces an error if the S-function is in a referenced model that simulates in normal mode.MDL_START_AND_MDL_PROCESS_PARAMS_OK
: The Simulink engine allows normal mode simulation of the S-function in a referenced model and callsmdlProcessParameters
beforemdlStart
. Use this option whenmdlStart
depends on tunable parameters.TUNABLE_PARAMS_NOT_USED_IN_MDL_START
: The Simulink engine allows normal mode simulation of the S-function in a referenced model and callsmdlStart
beforemdlProcessParameters
. Use this option only whenmdlStart
does not depend on tunable parameters.
By default, the engine produces an error if it finds an S-function with both a
mdlStart
and a mdlProcessParameters
method in a
referenced model that simulates in normal mode. The default behavior is equivalent to
specifying the DEFAULT_SUPPORT_FOR_NORMAL_MODE
option for
ssSetModelReferenceNormalModeSupport
.
If the S-function is not in a referenced model, the engine always executes
mdlStart
before mdlProcessParameters
.
Languages
C, C++
Examples
See the S-function sfun_frmad.c
used in sfcndemo_frame
for an example that uses this function.
Running this model requires a DSP System Toolbox™ license.
Version History
Introduced in R2008a