This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Specify whether use of this S-function in a referenced model prevents the referenced model from inheriting its sample time from its parent model


void ssSetModelReferenceSampleTimeInheritanceRule(SimStruct *S,
  int_T rule)



SimStruct representing an S-Function block.


Rule for allowing referenced models containing this S-function to inherit their sample times from the parent model.


Use this macro in any callback from mdlInitializeSizes to mdlSetWorkWidths, in order to specify the rule that determines whether referenced models containing an S-function can inherit their sample times from their parent model. Use this macro only if your S-function inherits its sample time. If the S-function output is dependent on its inherited sample time, use the DISALLOW_SAMPLE_TIME_INHERITANCE rule to specify that referenced models containing the S-function cannot inherit their sample times from their parent model. Otherwise, use the USE_DEFAULT_FOR_DISCRETE_INHERITANCE rule to allow sample time inheritance.


C, C++


For more information and examples that use this function, see Inherited Sample Time for Referenced Models (Simulink Coder).

Introduced before R2006a

Was this topic helpful?