Writing S-Functions    
mdlProcessParameters

Process the S-function's parameters.

Syntax

Arguments

S
   SimStruct representing an S-Function block.

Description

This is an optional routine that Simulink calls after mdlCheckParameters changes and verifies parameters. The processing is done at the top of the simulation loop when it is safe to process the changed parameters. This routine can only be used in a C MEX S-function.

The purpose of this routine is to process newly changed parameters. An example is to cache parameter changes in work vectors. Simulink does not call this routine when it is used with the Real-Time Workshop. Therefore, if you use this routine in an S-function designed for use with the Real-Time Workshop, you must write your S-function so that it doesn't rely on this routine. To do this, you must inline your S-function by using the Target Language Compiler. See The Target Language Compiler Reference Guide for information on inlining S-functions.

The synopsis is

Example

This example processes a string parameter that mdlCheckParameters has verified to be of the form '+++' (where there could be any number of '+' or '-' characters).

mdlProcessParameters is called from mdlStart to load the signs string prior to the start of the simulation loop.

For more details on this example, see matlabroot/simulink/src/sfun_multiport.c.

Languages

Ada, C, M

See Also

mdlCheckParameters


  mdlOutputs mdlRTW