User`s guide

Overview of the C MEX S-Function Routines
3-29
simulation(or theReal-TimeWorkshopexternalmode)ifan attempt ismade
to change the parameter.
If your S- function outputs are discrete (e.g., can only take on the values, 1
and 2), then specify
SS_OPTION_DISCRETE_VALUED_OUTPUT.
The
ssGetPath (the Simulink full model path to the block) and
ssGetModelName (here model refers to the S-function name) are available for
use. If they are the same (that is, if
strcmp(ssGetPath(S),ssGetModelName(S))==0), then the S-function is
being executed from the MATLAB command line and is not part o f a
simulation.
In mdlInitializeS izes, you also must specify the number of sample times for
your block. There are two ways of specifying sample times:
Port-based sample times
Block-based sample times
See “SettingSample Times forC MEXS-Functions”onpage 3-36for acomplete
discussion of sample time issues.